Hi,
I've built an autonomous robot for a competition in June, but I'm having trouble with my magnetometer.
The bot is very simple; an uP brain, a GPS, a magnetometer, an xBee for wireless monitoring, all contained in a Tupperware box on top of an RC car.
All was going well, the control board worked on the bench (a wire wrap prototype. I've now had a PCB made), and I have the software running with a simple PID loop controlling the steering servo with inputs from the GPS and magnetometer, controlling the car to GPS waypoints.
However, this weekend, I strapped it all to the RC car for the first time, and now it doesn't work at all ... :-(
The problem is the magnetometer. I'm just getting garbage from it, now it's on the car.
I kind of expected some interference, but I thought it would bearable. I don't need it to me too accurate. There is a big brushless motor within 20cm of it, plus a steering servo, plus all manner of batteries and wires. But it just says it's pointing the same way, irrelevant of its rotational position. I suspect it's just swamped from all the magnet on the car ?
Has anyone done this before ? Anyone got any advice ? I'm not sure I can "shield" the magnetic interference from the motor, as it will block the earths magnetic signal too, that I actually want ?
Should I move it much further away ? Perhaps on a mast above the car ? Will that help ? I imagine it wont, the magnet in the motor even at 40-60 cm is probably stronger than the earths magnetic field ? Should I use a different type of magnetometer ?
(PS, I know I can use the GPS for a heading vector, but not when stationary. I need to know which way I'm pointing at slow speeds so I can point in the right direction and speed up, at speed the GPS vector is potentially more reliable than the magnetometer ...)
Thanks in advance for any advice ...
Jon.