Ciao to everybody, just want you to know that today I finally made my EM406, ArduIMU and Ardupilot work together with a simple trick. From http://seniord.ece.iastate.edu/dec0803/manuals/EM-406%20Product_Gui... we see that the output baud rate of the infamous EM406 is 4800 bps. Adjusting the code for arduIMU, ardupilot to work at 4800 everything works very fast, ever without the "first time" GPS locking procedure. All right.
The only problem is that one might desire a higher than 4800 output rate. Argh, I am a very newbie to arduino and I am still searching for the solution.



UPDATE!

So, with the help of Hopslink, I finally got it all working.


This made my arduIMU connect with the so-hatred EM406 module without using the NMEA protocol.


If you make arduPilot communicate with arduIMU @ 38400 bps you're really done. That's it.

Views: 852

Tags: 406, arduimu, ardupilot, code, em, em406, gps, work

Comment by hopslink on June 7, 2010 at 3:58pm
iangl,

Happy to help, and thank you for the testing and feedback! Hopefully someone can look over the changes and see about adding them to the ArduIMU codebase for future users.
Comment by Tim - Arduino for Visual Studio on June 7, 2010 at 5:07pm
well done hopslink

iangle, the manual is mentioned elsewhere on this site but there are so many posts that it will be difficult to find :)

It might be a good idea for the ardupilot to use the em406 at 38400. That way the xbee settings would remain the same when switching between thermopiles and imu and there would be less confusion
Comment by Ken on June 7, 2010 at 6:26pm
hopslink,

I am a bit tired, I'll dig some more on Tuesday, but I think that you are correct -- ArduIMU 1.7 does not call init_gps for any GPS configuration.
Comment by Ken on June 7, 2010 at 6:40pm
iangl,

? "so-hatred EM406" ? Do you hate it or do you believe others do?

The EM-406 is a solid little GPS and I love it. It was the default here until the faster uBlox became available. Good price, hobbiest-easy 5v interface, well understood NMEA. I've been talking NMEA for ~15+ years and, for the slow moving vehicles I use, I don't need faster update rates and flavor of the month binary modes.

It was the uBlox that had issues with fragility, connector misalignment, voltage regulation, pre-configuration.
Comment by Greg Fletcher on June 7, 2010 at 7:44pm
jangle, the blinking led means it's in NMEA mode. Slow down and read the code. Open another browser window
here

That's how I learned. BTW, your pic freaks me out a little.

3D Robotics
Comment by Chris Anderson on June 7, 2010 at 8:06pm
Guys, I'm trying to follow along, but a little unclear about whether there is a bug in the code we need to fix, or whether it was already fixed in 1.7 (none of us use the EM406 with ArduIMU, so we might have missed something). Hopslink, is this something we need to address?
Comment by Tim - Arduino for Visual Studio on June 7, 2010 at 8:29pm
From my point of view the only confusion is that the ardupilot sets the 406 baud rate automatically and the imu does not. So I was confused by the fact that the 406 worked easily in one senerio and not another. I think others have also been confused by this.

It is also tricky to keep switching the baud rate of the xbee when using em406 on the ardupilot or via the imu.

So to my mind two things would make the confusion go away and also make life easier

1) Auto set the 406 baud rate in the imu 406 code

2) Alter the 406/serial code in the ardupilot to use the same speed as the imu (regardless of using thermopiles or imu)

This means that switching between 406/imu and 406/ardupilot is just a matter of altering the published imu/ardupilot code settings + upload

Thanks
Comment by hopslink on June 8, 2010 at 1:29am
Chris,

There are some changes required, depending on what the development team view as the best way forward.

The issue is the latest IMU 1.7 code never initialises the EM406 to binary mode (that I can see, and if it does it sets it to 57k where the IMU/AP combination is set for 38k). Code to do the setup is there but it doesn't seem to be called.

The fix supplied changes the EM406 initialisation code to set it to 38k when used with the IMU, and calls that code during IMU setup. This seems the logical way forward since it is transparent to the user, requiring no extra user settings for various data rates in the IMU/AP code. That is based on the assumption that the 57k EM406 rate is a legacy setting from old AP versions and not an absolute requirement (but it seems to be working ok).

Provided these changes do not break anything for Ublox users I would look to include them, or some better solution, in the IMU code. Obviously that is a choice for the development team.

TimL's suggestion about changing the ArduPilot EM406 rate to match seems a good idea too as it saves users having to change telemetry settings for anything other than NMEA GPS types.
Comment by Jeff on July 9, 2010 at 1:32pm
I have loaded the code that was givein in the first post but I am not able to get GPS communications on the IMU. I am pretty sure the code on my Ardupilot is correct for the 406. What am I missing?
Comment by iangl on July 9, 2010 at 1:42pm
Jeff, i had some troubles with the power source of the boards. Try powering them from the programming input (the power pins located near the pins where you attach the programmer, on both boards). If you want I can pm you also my ArduPilot code so you can have a look at that. ciao

Comment

You need to be a member of DIY Drones to add comments!

Join DIY Drones

Social Networking

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.

A list of all T3 contests is here

Groups

Advertisement

© 2013   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service