Hi Folks. First I'll paste some relevant links in below, such as the datasheet for the HMC6352 Compass Module.
I'm hoping some of you, maybe even Hippy, will save me some time getting this Compass working with my Autopilot.
Two compass chips arrived this morning - one to test and a spare, in case I blow it up !
I'll start with a few words to put this into context: this thread started just over two years ago, when I started the process
of moving from a Pocket PC autopilot, to one based on a single PICAXE. I had been using PICAXE as servo controllers,
long before, and had - with help from Hippy and others - solved problems like reading the GPS serial data.
This was a great success, and we were soon into tests on water. This simple GPS-Picaxe-rudder servo
has been thoroughly tested, including months of 24/7 tests, and GPS simulation across the Atlantic.
If you read my "front page" below you can amuse yourself with the details.
The "design" page goes into more detail on how it was put together. See bottom of page for mention of the compass.
Now, while waiting for a suitable launch window, I'm working on what might find it's way into a future design,
such as that used in next year's boat. If the work goes well, it may be tested on the water within days or weeks,
and - after the required few months of water tests, including 24/7 tests - it may get adopted for the next boat.
Possible benefits of using the compass, instead - or in addition to - GPS based heading, are potential reduced power consumption
and not being "confused by the tide" - although our November launch indicates this is not a problem.
There may be other spin-offs for 24/7 testing, like the boat steering in much lower wind speeds.
If the wind drops to 1 or 2 mph, the boat drifts into the bank, due to GPS based heading being too inaccurate.
This costs me petrol, going over to Bray Lake next morning, to push it out again
I'll be starting simply, with a the compass chip, PICAXE servo controller, and a servo.
If I'm lucky, it may be possible (if we have enough pins?) to interface the compass into the existing PICAXE Autopilot.
If not, we might split the system into the "GPS Navigation PICAXE" and the "Steering PICAXE".
So "how many pins" and "which pins to use" could be important decisions when I start.
I do hope G6ejd is very wrong above. Take a look at the datasheet for the Compass chip below. I intend to use this in the simple mode of outputing (maybe at 2 Hz) compass heading - not that X,Y,Z option. Also, if I'm lucky, I'm hoping to set this startup mode into the EPROM, which means I will only need one pin on the picaxe. Before you rush to talk about "tilt compensation" - I expect to test this as quickly as possible in realistic water conditions, with the boat leaning over and bobbing about.
I'll obviously be starting "on the table", with the compass connected to the PICAXE, but should then quickly progress to "walking around outside the house" between two waypoint, checking that the servo is moved correctly. Soon after that, it will be tested on Bray Lake, doing the "Bray Lake Test".
But lots of things may jump out to bite me before then
Robin
www.gpss.co.uk
www.gpss.co.uk/autop.htm - robot boat "front page" with latest news, etc. Amusing videos
www.gpss.co.uk/rbdesign.htm - what serves as a "design" page, including the picaxe based autopilot
www.sparkfun.com/datasheets/Components/HMC6352.pdf - data sheet for HMC6352 Compass Module
http://www.picaxe.com/docs/axe024.pdf - PICAXE AXE024 Servo Controller kit