EM406: busted!

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_Guide1.pdf 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.

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • You're most welcome, but Ken deserves the credit for that one. Cheers Ken!

    All the best!
  • I got my EM406 working with IMU first time. My trick was to put the EM406 back to factory settings before attaching it to the IMU. You can edit the EM406 settings using the SIRFdemo program. I actually connected them using Jordi's adapter board (for uBlox) which has a nice power supply and adapter.

    One weird thing when connecting the EM406 to ArduIMU using the uBlox adapter board is you need to connect OUT to IN and IN to OUT - makes sense I guess.

    So my basic observation is that IMU software is designed to deal with the EM406 "fresh from the factory"..
  • Ok, Worked like a champ!!!! Hopslink I can't thank you enough, I was pulling my hair out.........:)
  • Jeff,

    The third one should be the charm... (hopefully). Apparently binary mode configuration requires a different message format. DIYDrones' Ken has supplied code to reset to NMEA mode - here.

    Attached below is Ken's reset code as a sketch. Run that, then try the latest IMU code from the repository.

    Sorry, I can't test these properly as I don't have an EM406. If it doesn't work shout as I have found a datasheet with details of the binary protocol and it is possible to just change binary baud rate on the fly.

    EM406_reset.pde
  • I have tried the second config with no luck, seems strange that should have worked. :(
  • Jeff,

    Find attached an updated version. The last had a possible error due to me coding/uploading in haste (was on my way out of the house and keeping my better half waiting), my apologies!

    GPS_EM406_jeff2.pde
    https://storage.ning.com/topology/rest/1.0/file/get/3692066484?profile=original
  • I have tried your GPS config with no luck.
  • Jeff,

    Suspect you have hit the nail on the head. If have a lock with ArduPilot then the GPS is set for 57kbit/s binary mode, and those settings are retained until the onboard supercap discharges (up to a week).

    The IMU initialisation code assumes the GPS is in the default 4800/9600kbit/s NMEA mode. Try swapping your current GPS_EM406.pde with the one attached below, which also tries initialisation at 57kbit/s. Otherwise you may have to wait for discharge.

    Please let us know if this works or not. Thanks.

    GPS_EM406_jeff.pde
  • You should be able to get arduPilot lock.If not, try to get a lock outside a room, and again, make sure the red LED fon the gps is blinking. If it remains fixed it means that you can get no lock from your current position.
    Yes, once you set one baud rate you have to maintain it through the data flow. Hope you have good luck with this issue, it took me several weeks to get resolved! My key was the baud rate TO the gps
  • One thought, I am able to get GPS lock using just the Ardupilot? Would I still need to communicate with the GPS @ 4800 through the IMU?
This reply was deleted.