HobbyKing.com New Products Flash Sale
Reply
Thread Tools
This thread is privately moderated by pm1, who may elect to delete unwanted replies.
Old Sep 03, 2012, 05:57 AM
pm1
Registered User
Germany, BY, Gestratz
Joined Oct 2008
244 Posts
Discussion
Recipe to get Crius GPS + I2C Nav board to work

This method modifies the software on the small i2c nav board, that it configures the GPS correctly at every power on. It is done with arduino 1.01. The connection is done via FTDI. There are no pins soldered to the i2c nav board, but the connector is there (6 pins in a row).

The gps exists in 2 versions:
V1. without the ability to store settings permanently (with the onboard battery lifetime of settings is typically fom hours to some days)
V2. can store settings permanently in an onboard eeprom. The rest should be identical

remark V2: some people reporting that rx/tx if i2c may be swapped on i2c board. If you see continously increasing i2c error or garbage data from the sensors, try to swap the two wires

Recipe for V1:
1. Download this version of firmware for i2c nav board: Download
either (Try 2a. If it does not work at every power on of copter, try version 2b, look below for reason)
2a. unmodified gps
or
2b. solder a bridge between pin 13+14 of gps board (picture included in download), set GPS_SERIAL_SPEED 38400 in I2c config.h
3. use arduino 1.01 to flash i2c_nav with downloaded version (use FTDI)
4. update fc multiwii 2.1 or later with activated #define I2C_GPS and your magnetic declination in config.h of multiwii http://magnetic-declination.com -> round up to next full degree, but consider sign
5. connect everything
6. If GPS sends valid frames, LED on I2C nav board should blink 100ms on/1s off
7. Calibrate and switch on mag! Check that that copter orientation in the gui follows exactly the direction of the copter itself.
8. Go *outside*
9. connect battery -> after about one minute (depending on reception quality), the led on i2c board starts flashing 3 times in intervals
10. it works!***

Recipe for V2:
1. Download this version of firmware for i2c nav board: Download and extract it
2. Download u-center from ublox website
3. Read manual of u-center
4. Start u-center and configure your GPS (File->GPS) with "u-config-v2.txt" of my rar archive and make settings *permanent*
GPS is now set up with ublox binary protocol and 115200 baud
5. Edit config.c of my I2c nav code:
set
#define GPS_SERIAL_SPEED 115200
comment out:
//#define NEO6_NOT_CONFIGURED_AT_POWERON
6. use arduino 1.01 to flash i2c_nav (use FTDI)
7. update fc multiwii 2.1 or later with activated #define I2C_GPS and your magnetic declination in config.h of multiwii http://magnetic-declination.com -> round up to next full degree, but consider sign
8. connect everything
9. If GPS sends valid frames, LED on I2C nav board should blink 100ms on/1s off
10. Calibrate and switch on mag! Check that that copter orientation in the gui follows exactly the direction of the copter itself.
11. Go *outside*
12. connect battery -> after about one minute (depending on reception quality), the led on i2c board starts flashing 3 times in intervals
13. it works!***

** Version 2a works, but.... some people (including me) have problems, that they have to switch power off and on again once. Doesn't work for them at first power on. I switched to version 2b. I am running this board for weeks now, no hangs at power up any more.

Extra features in this version (19.10.2012):
- configure ublox6-m to use binary mode, 5 Hz, 115200 baud, EGNOS, profile pedestrian -> changed GPS back to 5 Hz after I discovered, that it simply sends same data twice at 10 Hz.
- limit speed in Position Hold mode
- remove D term of PH rate
- inserted blink mode of LED: blink 100ms/1s indicating reception of valid frames from GPS, but still no lock
- PH and RTH were switched permanently off, when gps reception has a degration of only one measurement. Now resumes functionality, when gps signal is ok again.
- Changed default expected baud rate of gps to 9600 (GPS_SERIAL_SPEED in config.h)

Since some people including me broke off the antenna connector of the GPS, I suggest to everyone to put the GPS it in a shrink tube, works fine. No issue with reception...

Fix for bug in Multiwii 2.1+ (latest development version have now this fix):
The pids for gps navigation are transferred to i2c nav board, when this is not initialized completely. Then you are using default pids every time, changes are not recognized. You have to change the following code in GPS.ino of multiwii 2.1+ (insert lines in red).

void GPS_NewData() {
uint8_t axis;
#if defined(I2C_GPS)
static uint8_t GPS_pids_initialized;
static uint8_t _i2c_gps_status;
...
...
if (_i2c_gps_status & I2C_GPS_STATUS_NEW_DATA) { //Check about new data
if (GPS_update) { GPS_update = 0;} else { GPS_update = 1;} //Fancy flash on GUI
if (!GPS_pids_initialized) {
GPS_set_pids();
GPS_pids_initialized = 1;
}
pm1 is offline Find More Posts by pm1
Last edited by pm1; Oct 21, 2012 at 12:40 PM.
Reply With Quote
Sign up now
to remove ads between posts
Old Sep 05, 2012, 07:40 AM
n00b pilot
MikeyToo's Avatar
Brandenburg, KY, USA
Joined Dec 2005
447 Posts
Thank you

Your timing is impeccable. I just received my Crius GPS + I2C Nav board combo yesterday. Hooked them up and got the standard blinky red light and no data. Been trying to research a fix.

These FCs can get crazy complex, can't they?
MikeyToo is offline Find More Posts by MikeyToo
Reply With Quote
Old Sep 05, 2012, 09:43 AM
n00b pilot
MikeyToo's Avatar
Brandenburg, KY, USA
Joined Dec 2005
447 Posts
Quote:
Originally Posted by pm1 View Post
2b. solder a bridge between pin 13+34 of gps board (picture included in download)
Don't you mean 13 & 14?
MikeyToo is offline Find More Posts by MikeyToo
Reply With Quote
Old Sep 05, 2012, 09:47 AM
n00b pilot
MikeyToo's Avatar
Brandenburg, KY, USA
Joined Dec 2005
447 Posts
This is me being nitpicky and some other info

Quote:
Originally Posted by pm1 View Post
7 go *outside*
8. connect battery -> after about one minute (depending on reception quality), the led on i2c board starts flashing 3 times in intervals
8. it works!
No period after the "7" and two step "8".

Quote:
Originally Posted by pm1 View Post
Please, can someone confirm way 2a? Should work, but not testet by me.
I will as soon as I get some header pins soldered onto the Nav board.
MikeyToo is offline Find More Posts by MikeyToo
Reply With Quote
Old Sep 06, 2012, 11:38 PM
CD-ROM Junkie
Art Newland's Avatar
Camas, Washington, USA
Joined Apr 2001
13,756 Posts
Thanks for this info, looking forward to trying it.
Art Newland is offline Find More Posts by Art Newland
Reply With Quote
Old Sep 10, 2012, 08:27 PM
n00b pilot
MikeyToo's Avatar
Brandenburg, KY, USA
Joined Dec 2005
447 Posts
Ok, this works with the 9600bps (Step 2a).
MikeyToo is offline Find More Posts by MikeyToo
Reply With Quote
Old Sep 14, 2012, 12:46 AM
Quads!!
Dave66's Avatar
United States, NH
Joined Jul 2012
19 Posts
Quote:
Originally Posted by pm1 View Post
This method modifies the software on the small i2c nav board, that it configures the GPS correctly at every power on. It is done with arduino 1.01. The connection is done via FTDI. There are no pins soldered to the i2c nav board, but the connector is there (6 pins in a row).

Recipe:
1. Download this version of Firmware for I2C nav board: Download
either
2a. Modifiy config.h of i2c_nav set GPS_SERIAL_SPEED to 9600
or
2b. solder a bridge between pin 13+34 of gps board (picture included in download)

3. use arduino 1.01 to flash i2c_nav with downloaded version (use FTDI)
4. update fc multiwii 2.1 with activated #define I2C_GPS in config.h
5. connect everything
6. If GPS sends valid frames, LED on I2C nav board should blink 100ms/1s
7 go *outside*
8. connect battery -> after about one minute (depending on reception quality), the led on i2c board starts flashing 3 times in intervals
8. it works!

Please, can someone confirm way 2a? Should work, but not testet by me.

Extra features in this version:
- configure ublox6-m to use binary mode, 10 Hz, 115200 baud, EGNOS, profile pedestrian
- limit speed in Position Hold mode
- remove D term of PH rate
- inserted blink mode of LED: blink 100ms/s indicated receiving valid frames from GPS, but still no lock
Thank you very much, I have read many pages in this and other forums and your info was the most direct and correct. 2a does work, my solder skills on small things like the pins 13/14 aren't great, this was the first time I read you could solve the GPS problem without soldering. RTH is an amazing thing to watch.
I also made the changes in the GPS.ino you suggested so the pids update. The only problem I have left is I have to power up the quad, disconnect and repower, then it works in about 3 seconds. I can live with this.
Thanks again.
Dave66 is offline Find More Posts by Dave66
Reply With Quote
Old Sep 14, 2012, 08:06 AM
n00b pilot
MikeyToo's Avatar
Brandenburg, KY, USA
Joined Dec 2005
447 Posts
Quote:
Originally Posted by Dave66 View Post
The only problem I have left is I have to power up the quad, disconnect and repower, then it works in about 3 seconds. I can live with this.
I'm getting that too. Do we just need to add some time for the GPS to fully initialize?
MikeyToo is offline Find More Posts by MikeyToo
Reply With Quote
Old Sep 14, 2012, 09:17 AM
CD-ROM Junkie
Art Newland's Avatar
Camas, Washington, USA
Joined Apr 2001
13,756 Posts
I tried getting everything setup according to these instructions (pins soldered) but getting I2C errors. Tried various pullup values, but no joy.
Art Newland is offline Find More Posts by Art Newland
Reply With Quote
Old Sep 14, 2012, 12:08 PM
n00b pilot
MikeyToo's Avatar
Brandenburg, KY, USA
Joined Dec 2005
447 Posts
Quote:
Originally Posted by Art Newland View Post
I tried getting everything setup according to these instructions (pins soldered) but getting I2C errors. Tried various pullup values, but no joy.
Check the connections on the Nav board. Is GPS and I2C going to the proper boards? Do you have the connector to the FC board on the I2C connector? Is it reversed? Do you have more than one GPS type uncommented in the config.h files for the boards?

Please don't take the above personally. Whenever I get an issue like this a sanity check is always in order.
MikeyToo is offline Find More Posts by MikeyToo
Reply With Quote
Old Sep 14, 2012, 01:25 PM
pm1
Registered User
Germany, BY, Gestratz
Joined Oct 2008
244 Posts
Quote:
Originally Posted by Dave66 View Post
The only problem I have left is I have to power up the quad, disconnect and repower, then it works in about 3 seconds. I can live with this.
I don't know, what happens here. My neo6-m doesn't react this way. According to the multiwii forum, the GPS is sending a battery low message at power on. If you then disconnect and connect again, it works... I have no idea here, what to do...
pm1 is offline Find More Posts by pm1
Reply With Quote
Old Sep 14, 2012, 01:28 PM
pm1
Registered User
Germany, BY, Gestratz
Joined Oct 2008
244 Posts
Quote:
Originally Posted by Art Newland View Post
I tried getting everything setup according to these instructions (pins soldered) but getting I2C errors. Tried various pullup values, but no joy.
Have you connected the i2c board to the correct places at the FC? Which FC do you have?
pm1 is offline Find More Posts by pm1
Reply With Quote
Old Sep 14, 2012, 02:30 PM
CD-ROM Junkie
Art Newland's Avatar
Camas, Washington, USA
Joined Apr 2001
13,756 Posts
Quote:
Originally Posted by MikeyToo View Post
Check the connections on the Nav board. Is GPS and I2C going to the proper boards? Do you have the connector to the FC board on the I2C connector? Is it reversed? Do you have more than one GPS type uncommented in the config.h files for the boards?

Please don't take the above personally. Whenever I get an issue like this a sanity check is always in order.
I appreciate the help. It's not on a RTF FC, it's an Arduino Pro-Mini 328, with a MPU6050 and a HL5883 mag, that all works great untill I add the GPS. I've had the GPS it's self connected to my FTDI cable, and using the Ublox software seems to work properly. I get 6-7 SATs pretty quickly and get proper GPS coordinates. I did buy this equipment used, so could be faulty I suppose. I've built a few DIY Mwii before, I've also made dumb mistakes before too. I'll check everything again, maybe I'll post some pictures of video of the setup.
Art Newland is offline Find More Posts by Art Newland
Reply With Quote
Old Sep 14, 2012, 09:51 PM
Quads!!
Dave66's Avatar
United States, NH
Joined Jul 2012
19 Posts
Quote:
Originally Posted by pm1 View Post
I don't know, what happens here. My neo6-m doesn't react this way. According to the multiwii forum, the GPS is sending a battery low message at power on. If you then disconnect and connect again, it works... I have no idea here, what to do...
It doesn't matter to me, your info was the best. I plug in the batt for 2 seconds, disconnect and reconnect, 3 quick blinks in less then 5 seconds. Thanks again.
Dave66 is offline Find More Posts by Dave66
Reply With Quote
Old Sep 15, 2012, 03:34 AM
Registered User
Joined Aug 2012
276 Posts
I cannot get this to work...no matter what I do....I keep getting the red light 1 sec on and 1 sec off even if I tried the battery trick....

how would I know that the i2c board took the firmware ? how do I reset settings in the ublox gps ?

most probably its the gps unit thats faulty as when I connect to ucenter even if I see data at 115200 I dont get any satellite fix... the wire connecting the antenna had gone off and had asked a friend to resolder it back....can it be that it got damaged ?

During tests the wire connecting the antenna was soldered even though if I dont know if it was soldered on right spots


godwisper is offline Find More Posts by godwisper
Last edited by godwisper; Sep 15, 2012 at 10:26 AM.
Reply With Quote
Reply

Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion CRIUS GPS with I2C little nellie Multirotor Electronics 71 May 31, 2014 07:33 PM
Discussion FC I2C-GPS NAV Module jy0933 Multirotor Electronics 7 Mar 28, 2014 06:46 PM
Discussion Crius NEO-6M Ublox GPS+Nano Mini Board+ Multiwii Control Board I2C GPS Kit godwisper Multirotor Electronics 5 Aug 25, 2012 04:03 AM
Discussion RC Timer GPS and I2C-NAV module for MWC Foam boy Multirotor Electronics 3 Jul 16, 2012 08:41 PM
Sold ArduPilotMega autopilot board, APM IMU Sensor Shield, I2C Magnetometer and GPS pilot006 Aircraft - Electric - Multirotor (FS/W) 3 Mar 13, 2012 05:07 PM