I2C-GPS NAV Navigation Board

From Wiki
Jump to: navigation, search

Introduction

GPS-1.jpg

The I2C-GPS NAV module works with all 328P-based MWC flight controllers (with magnetic reluctance) to provide functions including GPS positioning, return-to-home, automatic waypoint flight, etc. For convenience, it’s recommended to be used with the CN-06 GPS receiver and the included wires, so you don't need to change the wires. The I2C port on the module can be connected to an anti-reverse cable, thus to easy refit the flight controller. Besides, it matches with any 10Hz GPS receiver with a baud rate of 11520.

Navigation Board LED Status Indication (taking firmware 2.0 as an example):

1. Initialization: Blinks once per second, lasts about 6 times;
2. Waiting for GPS positioning: constantly brightens for 2 seconds, blinks for one second, and continues the constant lighting up, until the GPS positioning is completed.
3. GPS positioning completed: Blinks three times per second – from then on GPS-related functions are active for the flight controller, indicating at least 5 satellites are effectively connected.
Flight Controller LED Status Indication: In the locked (disarmed) mode, the LED blinks quickly when it's effectively connected to 4 satellites.
Note:
1) The Navigation Board must be used with 328P MWC Flight Controller which is equipped with magnetic reluctance (digital compass), and is better to include a barometer.
2) Before applying the Navigation Board, you need to enable the I2C-GPS function in the Multiwii firmware (recommended to use version 2.1 or above):

       #define I2C_GPS// Enable I2C-GPS

3) Before use, set the Geomagnetic offset in the MWC firmware. If you ignore this step, the scale of digital compass and the GPS compass may be different, thus will impact the accuracy of the automatic returning-to-home. The offset differs between areas, please make the setting according to the actual situation.

       E.g. #define MAG_DECLINIATION 3.96f

Test Experiment

Preparation

1 x PL2303HXD (USB-to-Serial)
2 x LED
1 x Computer
1 x I2C_GPS NAV Module
1 x I2C LCD1602 display

Testing Procedures

Wire them up

GPS-2.png

Schematic diagram:

GPS-3.png

Physical Picture
Connect the PL2303HXD to the computer with a USB cable.

Test the I2C communication

Step 1: Install the library
Open Arduino IDE, select Sketch->Including Library->Manage Libraries, search for LiquidCrystal_I2C. Click on the item searched out, and click the Install button.

GPS-4.png

Step 2: Upload the program
Open the test sketch I2C_GPS_NAV_Check.ino. Select the corresponding board (Arduino Pro or Pro Mini) and port.

GPS-5.png

Then upload the sketch to the module.
Step 3: Check the result
The navigation board transfers the signal to the display via the I2C port. Then the “SunFounder” will appear on the display and two LED lights keep blinking, which indicates both the I2C and the navigation board can work.