arduino 2560 mega + gy-80 + gy-gps6mv2 multirotor

Post Reply
sk8amazing
Posts: 3
Joined: Sun Jun 08, 2014 7:09 pm

arduino 2560 mega + gy-80 + gy-gps6mv2 multirotor

Post by sk8amazing »

hi everybody ,
i started project to make a new quadcopter automated gps waypoint and i used arduino 2560 mega with gy-80 and bluetooth module hc-05 and ublox nego gps module gy-gps6mv2 .
everything is ok but we have some problem with gps connecting to the arduino board . multiwii gui dont show any gps signal and data . if you can help i appriciate that and when everything goes ok i will upload whole parts tutorial for the other friends who like to make a quad copter like me .

QuadBow
Posts: 532
Joined: Fri Jan 04, 2013 10:06 am

Re: arduino 2560 mega + gy-80 + gy-gps6mv2 multirotor

Post by QuadBow »

What about your config.h? A view into the GPS section would make it easier to give you hints.

sk8amazing
Posts: 3
Joined: Sun Jun 08, 2014 7:09 pm

Re: arduino 2560 mega + gy-80 + gy-gps6mv2 multirotor

Post by sk8amazing »

QuadBow wrote:What about your config.h? A view into the GPS section would make it easier to give you hints.



tnx . its my first time to use gps on quads so if there is any problem let me know plz .
here is my config file i upload


***********************************/
/*********************** GPS **************************/
/**************************************************************************************/

/* GPS using a SERIAL port
if enabled, define here the Arduino Serial port number and the UART speed
note: only the RX PIN is used in case of NMEA mode, the GPS is not configured by multiwii
in NMEA mode the GPS must be configured to output GGA and RMC NMEA sentences (which is generally the default conf for most GPS devices)
at least 5Hz update rate. uncomment the first line to select the GPS serial port of the arduino */

#define GPS_SERIAL 2 // should be 2 for flyduino v2. It's the serial port number on arduino MEGA
//#define GPS_PROMINI_SERIAL // Will Autosense if GPS is connected when ardu boots.

// avoid using 115200 baud because with 16MHz arduino the 115200 baudrate have more than 2% speed error (57600 have 0.8% error)
#define GPS_BAUD 57600

/* GPS protocol
NMEA - Standard NMEA protocol GGA, GSA and RMC sentences are needed
UBLOX - U-Blox binary protocol, use the ublox config file (u-blox-config.ublox.txt) from the source tree
MTK_BINARY16 and MTK_BINARY19 - MTK3329 chipset based GPS with DIYDrones binary firmware (v1.6 or v1.9)
With UBLOX and MTK_BINARY you don't have to use GPS_FILTERING in multiwii code !!! */


//#define NMEA
#define UBLOX
//#define MTK_BINARY16
//#define MTK_BINARY19
//#define INIT_MTK_GPS // initialize MTK GPS for using selected speed, 5Hz update rate and GGA & RMC sentence or binary settings


/* I2C GPS device made with an independant arduino + GPS device
including some navigation functions
contribution from EOSBandi http://code.google.com/p/i2c-gps-nav/
You have to use at least I2CGpsNav code r33 */
//#define I2C_GPS
// If your I2C GPS board has Sonar support enabled
//#define I2C_GPS_SONAR

/* GPS data readed from Misio-OSD - GPS module connected to OSD, and MultiWii read GPS data from OSD - tested and working OK ! */
//#define GPS_FROM_OSD

/* indicate a valid GPS fix with at least 5 satellites by flashing the LED - Modified by MIS - Using stable LED (YELLOW on CRIUS AIO) led work as sat number indicator
- No GPS FIX -> LED blink at speed of incoming GPS frames
- Fix and sat no. bellow 5 -> LED off
- Fix and sat no. >= 5 -> LED blinks, one blink for 5 sat, two blinks for 6 sat, three for 7 ... */
#define GPS_LED_INDICATOR

//#define USE_MSP_WP //Enables the MSP_WP command, which is used by WinGUI to display and log Home and Poshold positions

//#define DONT_RESET_HOME_AT_ARM // HOME position is reset at every arm, uncomment it to prohibit it (you can set home position with GyroCalibration)

/* GPS navigation can control the heading */

#define NAV_CONTROLS_HEADING true // copter faces toward the navigation point, maghold must be enabled for it
#define NAV_TAIL_FIRST false // true - copter comes in with tail first
#define NAV_SET_TAKEOFF_HEADING true // true - when copter arrives to home position it rotates it's head to takeoff direction


/* Get your magnetic declination from here : http://magnetic-declination.com/
Convert the degree+minutes into decimal degree by ==> degree+minutes*(1/60)
Note the sign on declination it could be negative or positive (WEST or EAST) */
//#define MAG_DECLINATION 3.96f //For Budapest Hungary.
#define MAG_DECLINATION 0.0f //(**)

#define GPS_LEAD_FILTER // Adds a forward predictive filterig to compensate gps lag. Code based on Jason Short's lead filter implementation

//#define GPS_FILTERING // add a 5 element moving average filter to GPS coordinates, helps eliminate gps noise but adds latency comment out to disable
#define GPS_WP_RADIUS 200 // if we are within this distance to a waypoint then we consider it reached (distance is in cm)
#define NAV_SLEW_RATE 30 // Adds a rate control to nav output, will smoothen out nav angle spikes

pihlerm
Posts: 23
Joined: Tue Dec 09, 2014 6:40 pm

Re: arduino 2560 mega + gy-80 + gy-gps6mv2 multirotor

Post by pihlerm »

Hi,

I have Crius AIO and NEO6 GPS sensor gy-gps6mv2http://www.banggood.com/GY-NEO6MV2-Flight-Controller-GPS-Module-For-Arduino-EEPROM-MWC-APM-2_5-p-915384.html.

I CAN get it working in NMEA mode, 9600 baud. It finds the sats, etc..

I cannot get it to work in UBLOX mode..Seems like it's not accepting the configuration sent from MWI via TX signal..
I'm using MWI 2.3 and also checking with dev-2.4 1729.

I've tried all baud rates for GPS_BAUD, but when I
#define UBLOX
nothing happens. Actually, using debug messaging, I discovered that GPS chip ignores all commands sent to it and happily churns out 9600 baud NMEA messages.


At first, I attached the GPS sensor directly to RX/TX ports (UART 2), but that being 5V it is possible that I fried the ublox chip?. I added a level converter later to 3.3V, I can see the signal on the chip pin using multimeter, but still nothing..

I wonder, does anybody have experience with this chip? I read it is possible to program the ublox chips directly with some software and an USB-serial connector.
I don't have such attachment .. is there some arduino code to do it?

Can you really fry the RX pin on ublox NEO6 giving it 5 volts? I've also traced the signal to chip's pin directly (so soldering seems ok).

Or is there something else I'm missing?

Thanks in advance.

QuadBow
Posts: 532
Joined: Fri Jan 04, 2013 10:06 am

Re: arduino 2560 mega + gy-80 + gy-gps6mv2 multirotor

Post by QuadBow »

Have you selected the right USART configuration in the file config.h? Here is my configuration for my Mega2560-based board at multiwii 2.3:

Code: Select all

#define GPS_SERIAL 2         // should be 2 for flyduino v2. It's the serial port number on arduino MEGA
//#define GPS_PROMINI_SERIAL   // Will Autosense if GPS is connected when ardu boots.

// avoid using 115200 baud because with 16MHz arduino the 115200 baudrate have more than 2% speed error (57600 have 0.8% error)
#define GPS_BAUD   38400

Only if GPS_SERIAL is uncommented and set to the USART the GPS is conntected to, multiwii runs the initialisation process to set up the desired baudrate and frequency.

I run a similiar GPS board at 5V, as well, without any problems.
The schematics in the link you provided show a built-in voltage regulator to 3,3V. Don't worry, most probably the chip has not been damaged.

Lastly, try to swap the RX and TX pins, since this is a common point of failure. Don't worry, you will not damage anything with a wrong wiring.

You can download u-center in order to check the function of the GPS from http://www.u-blox.com/en/evaluation-too ... enter.html .
You need to connect SERIAL/USART 0 via a FTDI module/adapter to your PC. The manual can the found under https://github.com/jlnaudin/x-drone/wik ... 9-CN-06-V2 .

The only challenge is to find a FTDI with a special plug-in for your Crius AIO board.

pihlerm
Posts: 23
Joined: Tue Dec 09, 2014 6:40 pm

Re: arduino 2560 mega + gy-80 + gy-gps6mv2 multirotor

Post by pihlerm »

Hi QuadBow, thank you for response.

Regarding voltage; the problem is not VCC but high signal from FC board's UART to GPS boards RX, which seems to be connected directly to chip's RX pin.
I have since abandoned all hope for the chip and I'm waiting for another one (original ublox with MAG, whic I need to lift from FC anyway..)

The code is sending initialisation (I've checked by debugging..), but no one is listening..
I am receiving NMEA output from GPS with no problems, on 9600 baud. Electrical connections seem OK.
I have used level adapter as well but to no avail. I suspect I have fried the RX pin on the chip with 5V (I've read on EOSBandi's blog that some chinese copies of ublox seem to be sensitive to overvoltage).

I will post here once I have the new chip.

Thanks for the info on ublox and u-center.

pihlerm
Posts: 23
Joined: Tue Dec 09, 2014 6:40 pm

Re: arduino 2560 mega + gy-80 + gy-gps6mv2 multirotor

Post by pihlerm »

Hi,

my new GPS arrived, it is a board originally made for APM 2.6 (http://www.banggood.com/Ublox-NEO-6M-GP ... 28633.html)

I see its I2C port uses 3.3 V .. and probably the serial is 3.3V as well. Does anybody have experience with the chip?
Do I have to insert level converters .. and what about SDA line .. it's bidirectional?

Any info would be GREATLY appreciated since I don't want to fry this one.

BR, matjaz

Post Reply