Thread Tools
Jul 19, 2012, 05:46 PM
Registered User
Thread OP
Discussion

CRIUS GPS with I2C


Has anyone got CRIUS CN-06 GPS receiver and I2C Nav module working with the CRIUS V0.2 SE board? I try to search in the CRIUS AIO post but information is spread out and can't make sense out of them. I did followed the r33 doc... Can someone help?

My settings are

//#define GPS_SERIAL 2 // Comment out serial gps
//#define GPS_BAUD 115200 // Comment out serial gps speed
#define I2C_GPS // Enable I2C-GPS

#define MAG_DECLINIATION 41.01f
#define NAV_CONTROLS_HEADING true
#define NAV_CONTROLS_HEADING true
#define NAV_TAIL_FIRST false
#define NAV_SET_TAKEOFF_HEADING true

#define GPS_FILTERING true
#define GPS_LOW_SPEED_F_FILTER true
#define GPS_WP_RADIUS

#define NAV_SPEED_MIN 100
#define NAV_SPEED_MAX 400
#define NAV_SLOW_NAV true
#define NAV_BANK_MAX 3000


thanks for your time.
Last edited by little nellie; Jul 19, 2012 at 09:50 PM.
Sign up now
to remove ads between posts
Jul 20, 2012, 03:23 PM
Registered User
Thread OP
I also reload the I2C board and without luck.. anyone know how to get this to work?

thanks for your time.
Jul 22, 2012, 08:29 AM
Registered User
Same problem here, did you get it to work yet?
Jul 23, 2012, 01:38 PM
Registered User
Thread OP
Quote:
Originally Posted by Baggus
Same problem here, did you get it to work yet?
Yes, I did.. a big thanks to DR.Tom at another forum who pointed out where the i2c port is located at the CRIUS SE v0.2 board. Once I connected that to the right place, it is working.

If you follow the picture posted in RCTimer on how to connect, it did not work for me.

Here is the link to DR.Tom post, His method works for me. Might want to read about the GPS not keeping config data also. That will also save you some headaches.

http://www.multiwii.com/forum/viewto...649&start=1200
Aug 01, 2012, 12:44 PM
Registered User

CRIUS CN06 and I2C-GPS Nav module


Just received mine from HongKong with a new CRIUS SE board that has the I2C port.
I first ran the boards using Multwii 2.0 GUI and the SE board worked indicating it was a hex-X .... but I saw no GPS stuff....
I then eflashed the SE board with Multiwii 2.1 and again the SE board works..(I programmed it as a Hex6- X this time)..and selected #Define I2C_GPS...
Now with Multiwii 2.1 GUI, the SE board appears OK but all GPS data shows zeroes.
The CN06 shows a steady green LED and the I2C-GPS Nav module shows a Red LED blinking on for 1 sec and off for 1 sec.
The Nav module came without FTDI pins or ISP pins so I haven't yet attempted to reflash it with EOSbandi's code.
I have not found any documentation for any of these boards.....
Has anyone else got this combination of hardware to function???

Edit: After using U-Center to setup the UBlox and then loading EOSBandi code into the Nav module. Everything worked OK!

2nd Edit: The settings go away after some time...and module reverts to 9600 Baud...have to repeat the whole process to get it back for a few hours usage.... very annoying!
Last edited by Olympian; Sep 13, 2012 at 09:49 PM. Reason: update info...
Aug 03, 2012, 12:37 PM
Registered User
The GPS has to be set to the right baudrate and Hz to work with the i2c board.
I wrote code for the i2c board to send the right settings to the gps at every boot: http://code.google.com/p/i2c-gps-nav/issues/detail?id=4
Aug 03, 2012, 02:19 PM
Registered User
vcazan's Avatar
I have the same GPS and I just got mine. I noticed that the writing was not correct for the supplied adapter. On the board the VCC and GND and beside eachother and on the GPS they are on opposite sides. Should I be switching this?
Aug 05, 2012, 05:57 AM
Registered User
I have the same problems with SE CRIUS with I2CGPS NAV port. Is there anybody, who has the same equippment. Does your GPS work? I flashed the sketch 2.1 on the SE board and and flashed correct the NAV board. My GPS does not work.

Need the suitable software for SE board and NAV board. If somebody can send to me this by email.

MY GPS: http://www.ebay.com/itm/ws/eBayISAPI...m=110787712661

MY BOARD:http://www.ebay.com/itm/ws/eBayISAPI...m=120823066061

Greetings from Carinthia (Austria)

IXUS
Last edited by ixus; Aug 05, 2012 at 06:26 AM.
Aug 05, 2012, 11:00 AM
pm1
pm1
Registered User
I have it running here...

Steps I had to do:

1. solder a connection between pin 13 and 14 of the neo-6m module -> This set's the baud rate to 38400..
2. Download the code for the i2c board from eosbandi.
3. Change the initialisation sequence
Code:
void setup() {

  uint8_t i;
  delay(3000);      //lets some time to GPS module to init
  Serial.begin(38400);
  delay(1000);
  
  //set GPS dynamic platform to "pedestrian" seems to be best for copter
  PROGMEM prog_uchar conf2[]={0xB5, 0x62, 0x06, 0x24, 0x24, 0x00, 0xFF, 0xFF, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x10, 0x27, 0x00, 0x00, 0x05, 0x00, 0xFA, 0x00, 0xFA, 0x00, 0x64, 0x00, 0x2C, 0x01, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x82};
  Serial.write (conf2,sizeof(conf2));                                                                                  
  delay(300);

  //disable all default NMEA messages
  PROGMEM prog_uchar conf3[]={0xB5, 0x62, 0x06, 0x01, 0x03, 0x00, 0xF0, 0x05, 0x00, 0xFF, 0x19};
  Serial.write (conf3,sizeof(conf3));
  delay(100);
  PROGMEM prog_uchar conf5[]={0xB5, 0x62, 0x06, 0x01, 0x03, 0x00, 0xF0, 0x03, 0x00, 0xFD, 0x15};
  Serial.write (conf5,sizeof(conf5));
  delay(100);
  PROGMEM prog_uchar conf6[]={0xB5, 0x62, 0x06, 0x01, 0x03, 0x00, 0xF0, 0x01, 0x00, 0xFB, 0x11};
  Serial.write (conf6,sizeof(conf6));
  delay(100);
  PROGMEM prog_uchar conf7[]={0xB5, 0x62, 0x06, 0x01, 0x03, 0x00, 0xF0, 0x00, 0x00, 0xFA, 0x0F};
  Serial.write (conf7,sizeof(conf7));
  delay(100);
  PROGMEM prog_uchar conf8[]={0xB5, 0x62, 0x06, 0x01, 0x03, 0x00, 0xF0, 0x02, 0x00, 0xFC, 0x13};
  Serial.write (conf8,sizeof(conf8));
  delay(100);
  PROGMEM prog_uchar conf9[]={0xB5, 0x62, 0x06, 0x01, 0x03, 0x00, 0xF0, 0x04, 0x00, 0xFE, 0x17};      
  Serial.write (conf9,sizeof(conf9));
  delay(100);


  //enable UBX messages POSLLH, SOL, STATUS and VELNED as is in EOSBandi's config file
  PROGMEM prog_uchar conf10[]={0xB5, 0x62, 0x06, 0x01, 0x03, 0x00, 0x01, 0x02, 0x01, 0x0E, 0x47};
  Serial.write (conf10,sizeof(conf10));
  delay(100);
    PROGMEM prog_uchar conf11[]={0xB5, 0x62, 0x06, 0x01, 0x03, 0x00, 0x01, 0x03, 0x01, 0x0F, 0x49};
  Serial.write (conf11,sizeof(conf11));
  delay(100);
  PROGMEM prog_uchar conf12[]={0xB5, 0x62, 0x06, 0x01, 0x03, 0x00, 0x01, 0x06, 0x01, 0x12, 0x4F};
  Serial.write (conf12,sizeof(conf12));
  delay(100);
  PROGMEM prog_uchar conf13[]={0xB5, 0x62, 0x06, 0x01, 0x03, 0x00, 0x01, 0x12, 0x01, 0x1E, 0x67};
  Serial.write (conf13,sizeof(conf13));
  delay(100);

  //set rate to 5Hz
  PROGMEM prog_uchar conf15[]={0xB5, 0x62, 0x06, 0x08, 0x06, 0x00, 0xC8, 0x00, 0x01, 0x00, 0x01, 0x00, 0xDE, 0x6A};    
  Serial.write (conf15,sizeof(conf15));


  //Init i2c_dataset

4. set #define UBLOX in config.h

5. Use Arduino 1.0 for the compilation! Please exchange twi.c und twi.h in the arduino path with the ones from eosbandi. For some unknown reason it didn't work with arduino 1.1

6. Flash the i2c adapter board with the FTDI adapter.


6. Compile MultiWii 2.1 with #define I2C_GPS (no other changes needed at first step!)

You'll find most of the steps in detail in the thread of the multiwii forum (linked a few posts above)
Last edited by pm1; Aug 05, 2012 at 02:15 PM.
Aug 05, 2012, 02:00 PM
Registered User

Hardware adaption


Thank you very much. IŽll try it tomorrow.

I must solder pin 14 and pin 15. Is it correct? You are not wrong?

The following link shows: solder Pin13 and Pin14
http://www.multiwii.com/forum/viewtopic.php?f=8&t=2124

Hope you Žll answer.
Thanks and many greetings: IXUS
Last edited by ixus; Aug 05, 2012 at 02:09 PM.
Aug 05, 2012, 02:13 PM
pm1
pm1
Registered User
Quote:
Originally Posted by ixus
I must solder pin 14 and pin 15. Is it correct? You are not wrong?
Sry, typo. 13+14 like on the picture, that is correct...
Aug 05, 2012, 02:21 PM
James not bond
jy0933's Avatar
Quote:
Originally Posted by Baggus
The GPS has to be set to the right baudrate and Hz to work with the i2c board.
I wrote code for the i2c board to send the right settings to the gps at every boot: http://code.google.com/p/i2c-gps-nav/issues/detail?id=4
isnt the i2c-nav board required 115.2k baud rate from gps chip? also,,, where should i insert your code into i2c-nav sketch?

thanks
Aug 05, 2012, 02:29 PM
pm1
pm1
Registered User
Quote:
Originally Posted by jy0933
isnt the i2c-nav board required 115.2k baud rate from gps chip? also,,, where should i insert your code into i2c-nav sketch?

thanks
Therefore you have to reflash. As you see, the code configures to 38400.

Where to insert: Find
void setup() {

I have added the first and last line of original code...
Aug 05, 2012, 02:38 PM
James not bond
jy0933's Avatar
how much diff will be 115.2k and 38.4k be? performance wide

added ...

if i mod the code to make it set gps chip to 115.2k every time... and also leave the serial baud to 115.2k.... how about it?

will this be correct?

Code:
void setup() {

  uint8_t i;

  //rctimer CN-06 gps receiver
  delay(1000); //give the GPS receiver time to boot
  Serial.begin(9600);
  byte gps10hz[] = {0xB5,0x62,0x06,0x08,0x06,0x00,0x64,0x00,0x01,0x00,0x01,0x00,0x7A,0x12,0xB5,0x62,0x06,0x08,0x00,0x00,0x0E,0x30};
  Serial.write(gps10hz,22);
  delay(500); //give the GPS receiver time to process
  byte baudrate115200[] = {0xB5,0x62,0x06,0x00,0x14,0x00,0x01,0x00,0x00,0x00,0xD0,0x08,0x00,0x00,0x00,0xE1,0x00,0x00,0x07,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0xE2,0xE1,0xB5,0x62,0x06,0x00,0x01,0x00,0x01,0x08,0x22};
  Serial.write(baudrate115200,37);
  Serial.end();
do i need to change anything that is in red for setting 115.2k baud?
( i assume if i enable the config baud code. i wont need a battery on gps board to keep eeprom?)


>> this might sound crazy... what if i use the code in mwc(2560board)? so i dont need to config the gps chip..
Last edited by jy0933; Aug 05, 2012 at 03:05 PM.
Aug 05, 2012, 03:05 PM
pm1
pm1
Registered User
Quote:
Originally Posted by jy0933
how much diff will be 115.2k and 38.4k be? performance wide

added ...

if i mod the code to make it set gps chip to 115.2k every time... and also leave the serial baud to 115.2k.... how about it?


( i assume if i enable the config baud code. i wont need a battery on gps board to keep eeprom?)


>> this might sound crazy... what if i use the code in mwc? so i dont need to config the gps chip..
You have no advantage with 115200, because 38400 is enough to get the data every 200 ms with ublox binary protocol. I have had the code modified for 115200, but if you have the battery, you never know, if you start at 38400 or 115200. So I removed the code.

We have 2 problems:
1. GPS communication at 5 Hz with NMEA protocol needs 115200.
2. Atmel 328P has not enough flash (32kB) to carry the MWC+GPS code....

If you use it with a 2560 chip, it will be fine...

This code works:
Code:
  PROGMEM prog_uchar conf1[]={0xB5, 0x62, 0x06, 0x00, 0x14, 0x00, 0x01, 0x00, 0x00, 0x00, 0xD0, 0x08, 0x00, 0x00, 0x00, 0xC2, 0x01, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC4, 0x96};
  Serial.write (conf1, sizeof(conf1));     
  delay(1000);
  Serial.begin(115200);
Last edited by pm1; Aug 05, 2012 at 03:13 PM.


Quick Reply
Message:

Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
New Product Navigatron - I2C GPS for MultiWi and Other Projects from Flytron MelihK Multirotor Drone Talk 45 Sep 14, 2012 08:21 PM
Discussion I2C and serial GPS drotek Multirotor Drone Electronics 0 Jul 17, 2012 04:19 AM
Discussion CRIUS Universal CL-06 GPS Receiver SGsoar Multirotor Drone Electronics 0 Jul 16, 2012 09:23 PM
Discussion RC Timer GPS and I2C-NAV module for MWC Foam boy Multirotor Drone 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