Difference between revisions of "I2C-GPS NAV Navigation Board"
Line 12: | Line 12: | ||
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.<br> | 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.<br> | ||
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):<br> | 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):<br> | ||
− | + | #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.<br> | 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.<br> | ||
− | + | E.g. #define MAG_DECLINIATION 3.96f | |
+ | ==Test Experiment== | ||
+ | ===Preparation=== | ||
+ | 1 x PL2303HXD (USB-to-Serial)<br> | ||
+ | 2 x LED <br> | ||
+ | 1 x Computer<br> | ||
+ | 1 x I2C_GPS NAV Module <br> | ||
+ | 1 x I2C LCD1602 display<br> | ||
+ | ===Testing Procedures=== | ||
+ | '''Wire them up'''<br> | ||
+ | |||
+ | |||
+ | |||
+ | Schematic diagram:<br> | ||
+ | |||
+ | |||
+ | |||
+ | Physical Picture <br> | ||
+ | Connect the PL2303HXD to the computer with a USB cable.<br> | ||
+ | |||
+ | |||
+ | |||
+ | ===Test the I2C communication=== | ||
+ | '''Step 1:''' Install the library <br> | ||
+ | Open Arduino IDE, select '''Sketch->Including Library->Manage Libraries''', search for LiquidCrystal_I2C. Click on the item searched out, and click the '''Install''' button.<br> | ||
+ | |||
+ | |||
+ | |||
+ | '''Step 2:''' Upload the program <br> | ||
+ | Open the test ''sketch I2C_GPS_NAV_Check.ino''. Select the corresponding board (Arduino Pro or Pro Mini) and port.<br> | ||
+ | |||
+ | |||
+ | |||
+ | Then upload the sketch to the module.<br> | ||
+ | '''Step 3:''' Check the result <br> | ||
+ | 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. <br> |
Revision as of 03:41, 8 May 2017
Contents
Introduction
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.
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
Schematic diagram:
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.
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.
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.