ImageImage
Hi Everyone,


If you are developing some GPS based applications maybe you know, GPS data protocol is serial and %90 of data is just garbage. You have to listen it every time, data parsing a headache and impossible to making other time critical applications in same time.

I'm glad to announce the Navigatron - I2C GPS solution :)

Navigatron is an Arduino based board with GPS and backup battery. It is including Atmega328, FTDI port and 16mHz clock and working with 3.3-5v (you must replace the backup battery charge diode with a blue led for 5v applications)

I wrote my own I2C codes and tried other I2C project since 1 years but they wasn't enough easy. Most of I2C GPS codes sending all values in a single stream. Then 2 month before a guy (EOS Bandit) from MultiWii forum find a simple and perfect solution. His code simulating a real I2C device and you can access each register address separately.


Navigatron is coming with EOS Bandit's firmware with MultiWii 2.0 support. It is an opensource and you can replace the firmware for your requirements.

It is also storing/calculating way points and giving the direction and distance for you. This is perfect solution for low speed microprocessor based UAV applications because just you need a magnetic compass value for finding the way to home(or waypoint)


Here is the current I2C register addresses of gps values:


I2C_GPS_ADDRESS 0x20 


I2C_GPS_STATUS 0x00 //(Read only)
---I2C_GPS_STATUS_NEW_DATA 0x01
---I2C_GPS_STATUS_2DFIX 0x02
---I2C_GPS_STATUS_3DFIX 0x04
---I2C_GPS_STATUS_WP_REACHED 0x08 //Active waypoint has been reached (not cleared until new waypoint is set)
---I2C_GPS_STATUS_NUMSATS 0xF0

I2C_GPS_COMMAND 0x01 //(write only)
---I2C_GPS_COMMAND_POSHOLD 0x01 //copy current position to internal target location register
---I2C_GPS_COMMAND_RESUME 0x02 //copy last active WP to internal target location register
---define I2C_GPS_COMMAND_SET_WP 0x04 //copy current position to given WP
---define I2C_GPS_COMMAND_ACTIVATE_WP 0x08 //copy given WP position to internal target location register
---define I2C_GPS_COMMAND_WP 0xF0 //Waypoint number

I2C_GPS_WP_REG 0x06 //Waypoint register (Read only)
---I2C_GPS_WP_REG_ACTIVE 0x0F //Active Waypoint
---define I2C_GPS_WP_REG_PERVIOUS 0xF0 //pervious Waypoint

=== Values ===
I2C_GPS_GROUND_SPEED 0x07 //GPS ground speed in m/s*100 (uint16_t) (Read Only)
I2C_GPS_ALTITUDE 0x09 //GPS altitude in meters (uint16_t) (Read Only)
I2C_GPS_TIME 0x0b //UTC Time from GPS in hhmmss.sss * 100 (uint32_t)(unneccesary precision) (Read Only)
I2C_GPS_DISTANCE 0x0f //Distance between current pos and internal target location register in meters (uint16_t) (Read Only)
I2C_GPS_DIRECTION 0x11 //direction towards interal target location reg from current position (+/- 180 degree) (read Only)
I2C_GPS_LOCATION 0x13 //current position (8 bytes, lat and lon, 1 degree = 10 000 000 (read only)
I2C_GPS_WP0 0x1B //Waypoint 0 used for RTH location (R/W)
I2C_GPS_WP1 0x23
I2C_GPS_WP2 0x2B
I2C_GPS_WP3 0x33
I2C_GPS_WP4 0x3B
I2C_GPS_WP5 0x43
I2C_GPS_WP6 0x4B
I2C_GPS_WP7 0x53
I2C_GPS_WP8 0x5B
I2C_GPS_WP9 0x63
I2C_GPS_WP10 0x6B
I2C_GPS_WP11 0x73
I2C_GPS_WP12 0x7B
I2C_GPS_WP13 0x83
I2C_GPS_WP14 0x8B
I2C_GPS_WP15 0x93
I2C_GPS_WP_NAV_PAR1 0x9B //Waypoint navigation parameter 1
---I2C_GPS_WP_NAV_PAR1_REACH_LIMIT 0x0F //lover 4 bit, waypoint reached distance
I2C_GPS_GROUND_COURSE 0x9C //GPS ground course (uint16_t)


For Schematic/Sample Codes and other details: http://www.flytron.com/sensors/180-i2c-gps-for-multiwii-and-others....


Have a nice weekend
Melih

Views: 10831

Comment by Yuan Gao on March 24, 2012 at 2:57am

Side note: the uBlox Neo-6Q that we use on Seraphim operates over I2C using the UBX protocol.  To be honest, uBlox's current implementation is a bit hax - it's a streaming protocol over I2C which still requires decoding of a serial stream, but at least the UBX messages can be individually polled or set on a timer.

Comment by Anish on March 24, 2012 at 3:33am
@melih ur awesome as usual, I hope to get my hands on one soon
Comment by Rob_Lefebvre on March 24, 2012 at 4:32am

Stick a magnetometer on the board for an all-in-one solution and you have a real winner.

Comment by Melih Karakelle on March 24, 2012 at 6:07am
Thanks guys,

Robert, i designed a board with barometer and magnetometer for compensating altitude and direction. But I didn't release because of some design problems.

You can find magnetometer and barometer from our site with same I2C pin order. You can put them together in very small space.
Comment by Machinery Max on March 24, 2012 at 7:03pm
yeah, adding a magnetometer will make this thing complete
Comment by Rob_Lefebvre on March 25, 2012 at 4:34am

I don't think the barometer will be useful for us because we already have one built on to the board and it works.  It's the Mag and GPS which both need to be mounted in a special location away from electronics, so it makes sense to stick them together.

I'd also love to see a sonar sensor on an I2C board to eliminate noise over the analog signal line.

Comment

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

Join DIY Drones

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service