GPS on Crius SE board

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.

Re: GPS on Crius SE board

Postby Alexinparis » Thu Jun 07, 2012 7:50 pm

Pyrofer wrote:Why does it need to be called? Why not parse each incoming line and see if its nmea or not?
Its easy to identify each type of data and react accordingly.

There is no reason it has to "choose" one of the other, both can be supported at the same time based on the incoming data.


This is also how I see the way to share the same UART.
With the new protocol, there is a header.
So it's easy to detect either a NMEA header or a MSP header without the need to sense the presence of a GPS at the init.
just one inconvenient: the Serial speed must be the same between GUI and GPS device
Alexinparis
 
Posts: 1546
Joined: Wed Jan 19, 2011 9:07 pm

Re: GPS on Crius SE board

Postby Pyrofer » Thu Jun 07, 2012 8:07 pm

The only problem is the amount of data coming from a GPS device at 10hz.
If Multiwii output "OK" after each set of nmea data (all lines sent, would have to be detected as some GPS send different data) you could in theory attach the GUI and the GPS, the GUI would simply wait for the OK before sending its command. at 115200 baud there should be plenty of time between nmea sets to get a couple commands in and out.
You wouldn't have to do this but you would need robust checksums at each end to watch for corrupted data, if the GUI sent a command at the same time as a nmea string you could easily corrup the data, sanity checking (making sure the data wasn't vastly different to previous data) should mitigate this.

You still need a multiplexing circuit outside the chip though, some simple logic gates would do (some OR gates). If you set up the logic so both send and receive ended up on one single half duplex channel the GUI could watch the NMEA data itself to avoid collisions, and also get that data sent to it for free :)
Pyrofer
 
Posts: 178
Joined: Sat Apr 14, 2012 2:55 pm

Re: GPS on Crius SE board

Postby flyboy_____ » Fri Jun 08, 2012 12:24 am

PatrikE wrote:
flyboy_____ wrote:How do I know that GPS is locked and that is enabled for position hold and RTH?


The statusLed is normally off when card is unarmed.
With GPSFix it will start to blink fast 3-4Hz when board is unarmed.

The board only check for Gps at boot.
Crius board dont have a reset button and you must disconnect power to restart it.

Connect the comDevice of your choice and the board will detect the type at startup.
The board must be restarted every time you switch interface.

It's possible to reset the board by using a jumper.
Or connect a PushButton to the pins.


Great tip for reset. Thanks
Are those 6 pins suited to connect one AVR programmer? How to do it?
I need this help because after flashing the code to calibrate ESC's now I cant flash the normal MultiWii... I tried reseting at lots of times but it always gives me error avrdude: stk500_getsync(): not in sync: resp=0x00

Please help me

UPDATE:
Sync error fixed. Moved to a slower PC that gave me time to do the reset.
Reset should be done when sketch size appears on screen

If AVR programmer is usable for this board the we do not need to do manual reset
flyboy_____
 
Posts: 33
Joined: Thu Sep 15, 2011 10:45 am

Re: GPS on Crius SE board

Postby axskin » Mon Jun 11, 2012 8:26 pm

Hello people, i have a question, i recently bought a crius SE board, to connect a GPS

i can use the serial pins (where actualy i connect the ftdi or bluetooth) but i lost this possibility of connect on of that with gps Serial or i can use a i2c gps, but the board don't have this connector, i can add it , am i right? or not ? thank you all
axskin
 
Posts: 5
Joined: Fri May 11, 2012 12:55 pm

Re: GPS on Crius SE board

Postby Pyrofer » Mon Jun 11, 2012 8:57 pm

i2c is probably there somewhere, I have the same issue with my quad.

You would have to find the i2c bus, probably best to tap onto the end of the pullup resistors. If you have a schematic for the board not so hard. If you have a scope, not so hard.
If you have neither. good luck!
Pyrofer
 
Posts: 178
Joined: Sat Apr 14, 2012 2:55 pm

Re: GPS on Crius SE board

Postby PatrikE » Mon Jun 11, 2012 10:03 pm

Solder the i2c cabels as picture shows.
Image
PatrikE
 
Posts: 1476
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden

Re: GPS on Crius SE board

Postby haydent » Sun Jun 17, 2012 1:43 am

Upgraded MultiWii SE Flight Controller v1.0 version is now available on ebay with I2C port, not sure what else has changed though...

upgrade1.jpg
Last edited by haydent on Sun Jun 17, 2012 2:29 am, edited 1 time in total.
User avatar
haydent
 
Posts: 378
Joined: Sun Jun 17, 2012 1:35 am
Location: NSW, AU

Re: GPS on Crius SE board

Postby haydent » Sun Jun 17, 2012 2:06 am

my summary of this thread: (correct me if im wrong)

Atmega 328P based CRIUS boards can either use I2C GPS on the I2C port (one added if not available) or a non-i2c (serial) gps on the UART port, the to do this later one a code 'switch' can be added to disable loading of GUI code and enable the GPS code on the UART port. As both cannot be loaded at the same time, requiring a reboot between GPS & GUI connection.

Possibly OSD that reads its data from MWC via UART (serial) will not work also with UART connected GPS ?

Another issue becoming apparent with these 'Mini' boards is the lack of space for code additions (eg as optioned above), being pretty much full already...

Depending on your plans and needs likely its worth spending the extra $10-$30 to get a Atmega 2560 based board:
(http://www.goodluckbuy.com/mwc-multiwii ... quadx.html
http://www.rcgroups.com/forums/showthread.php?t=1648569)

Chip: 328P / 2560
Flash: 32Kb / 256Kb
EEPROM: 1024b / 4096b
SRAM: 2kb / 8kb
Max MHz: 16 / 20
# UART: 1 / 4
(this is raw chip data, and all resources may not be allocated on the multiwii boards, eg UART ports)
User avatar
haydent
 
Posts: 378
Joined: Sun Jun 17, 2012 1:35 am
Location: NSW, AU

Re: GPS on Crius SE board

Postby Rickybritish » Mon Jun 18, 2012 2:02 pm

Hi I have a neo-6m ublox GPS +nano V3.0 AVR ATmega 328+crius multiwii control board i2c GPS I connect the GPS but don't know how to get it to work,how con I conf it and where can I get the codes from,the copter is conf on 1.9 and it flight but don't know how to get the GPS to work can you help me plz.
Rickybritish
 
Posts: 1
Joined: Sat Jun 16, 2012 8:34 pm

Re: GPS on Crius SE board

Postby PatrikE » Mon Jun 18, 2012 4:01 pm

V1.9 don't do much more than show the coordinats.
You need to run a never ver. to have Gps to any real use.
Dev 120606 for example.
PatrikE
 
Posts: 1476
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden

PreviousNext

Return to Software development

Who is online

Users browsing this forum: Exabot [Bot] and 6 guests