Boat Control Unit

Notes on a Boat Control Unit

Primarily to maintain a set speed for wakeboarding, but could also control lights and other accessories.

Most commercial units seem to use GPS and will certainly be easier than using a paddle wheel.

Here goes.....


1 comment

08 May 2010

GPS experiments

Using the LS20031 GPS module

Bought from Cool Components

Self contained unit with built in antenna and serial interface. GPS data output at 5Hz if required. I think I'll only need 1Hz so plenty of headroom if required.

Wired up as follows

1. Yellow. is +3.3v so connected to Vout from mbed

2. Orange to P9

3. Red to P10

4&5 Brown and black are GND so connected to GND on mbed

I used the following code to get data from the GPS unit through the MBED and into the PC to be displayed using Tera Term

#include "mbed.h"

Serial pc(USBTX, USBRX); // tx, rx
Serial device(p9, p10);  // tx, rx

int main () {


   device.baud(54000);
    
   while(1) {
        if(pc.readable()) {
            device.putc(pc.getc()); 
        }
            
        if(device.readable()) {
            pc.putc(device.getc());
        } 
   }  

}
The baud rate has to be fiddled with to get a data output that looks like it makes sense.

I was then able to use the MiniGPS_1.32 utility downloaded from CoolComponents to adjust settings for the data output from the GPS unit.

http://www.coolcomponents.co.uk/catalog/product_info.php?cPath=21&products_id=210

http://www.sparkfun.com/datasheets/GPS/MiniGPS_1.32.zip

MiniGPS is set up to communicate through COM6 via USB with the MBED at 9600baud. The MBED then passed data to the GPS at an appropriate baud as determined earlier, using the above program. This program passes data in both directions. The GPS sentences required, GPS to MBED baud and data freq can all be set as required. MiniGPS cannot be connected to COM6 at same time as TeraTerm so you need to switch from one to another to see the effect of any changes. Also the above program needs to be adjusted with regard to baud rate, if this is changed for the GPS.

In my initial experiments I have set sentences GGA and VTG, fix update rate is 1 and baud rate is 9600. This seems to work a treat. Taking the unit outside allows a fix. This does take several (5-10) mins for a first fix. The red LED on the GPS unit flashes when a fix is made. Seems to be working well.

Very pleased with this. Was starting to get a bit frustrated so nice to see it working.

You need to log in to post a comment