Page 1 of 1

Gps and Ardunio MIN ( atmega328P )

Posted: Tue Jan 03, 2012 2:56 am
by JohnyGab
I agree, I did not read all topic about GPS, but I wonder why the atmega328P could not be plugged directly thru the FTDI serial port to a GPS ( at 115200 off course ) so a regular multiwii controller could benefit of the GPS capacity.

Re: Gps and Ardunio MIN ( atmega328P )

Posted: Tue Jan 03, 2012 4:46 am
by timecop
What is a FTDI serial port?

Re: Gps and Ardunio MIN ( atmega328P )

Posted: Tue Jan 03, 2012 5:16 am
by JohnyGab
the FTDI adapter that you use to transfert the code from your pc to your arduino board. thats the port know as the FTDI, but its the serial port of the atmega328p

Re: Gps and Ardunio MIN ( atmega328P )

Posted: Tue Jan 03, 2012 7:57 am
by Alexinparis
Hi,

Yes, it's already possible. You just have to define the GPS port 0 and comment the setup line SerialOpen(0,115200);
A 328p can definitively handle of sensors + GPS option. There is enough ROM/RAM/speed for this.
But the trade of would be the lack of GUI visualization in this case (just like the Spektrum satellite option which is also possible on a 328p)

Re: Gps and Ardunio MIN ( atmega328P )

Posted: Tue Jan 03, 2012 8:00 am
by marbalon
I have board with Atmega328 and will receive GPS module in next few days. Then will try to use GPS one the same port as GUI. I browse the code and I think it is possible with some software mods. Will give you some feedback in next few days.

Regards,
Marcin.

Re: Gps and Ardunio MIN ( atmega328P )

Posted: Tue Jan 03, 2012 8:21 am
by JohnyGab
Nice, so i'll plug my gps to my osd using a software seria lib, then broadcast the gps strings to the multiwii, that will make it perfect

Re: Gps and Ardunio MIN ( atmega328P )

Posted: Tue Jan 03, 2012 8:49 am
by Waldmensch
Is it possible to make a Jumper based solution? Means jumper is set = Serial Port switched to GPS / jumper not set = Port switched to GUI

However, in the FPV Community board you can read that next time an i2C GPS will be available based on a separate arduino.

Re: Gps and Ardunio MIN ( atmega328P )

Posted: Tue Jan 03, 2012 1:35 pm
by dramida
Better, put a combo stick, with motors disarmed, throttle down, yaw center, pitch up for 2 secs - enable gps serial, pitch down for 2 secs- disable gps serial and back to gui.

Re: Gps and Ardunio MIN ( atmega328P )

Posted: Tue Jan 03, 2012 1:41 pm
by PatrikE
I made a jumper solution like
If jumper deteceted use gps else gui.

Only check the jumper in setup().

Re: Gps and Ardunio MIN ( atmega328P )

Posted: Tue Jan 03, 2012 1:51 pm
by JohnyGab
It will be so simple to enae gps when receving a string that start with "@GP"
And disable the gps when that string is not detectes in the last 5 second

Re: Gps and Ardunio MIN ( atmega328P )

Posted: Tue Jan 03, 2012 2:50 pm
by PatrikE
Problem is GUI and GPS uses different Baudrates.

Re: Gps and Ardunio MIN ( atmega328P )

Posted: Tue Jan 03, 2012 3:22 pm
by JohnyGab
There are gps running at 115200
....that way, they can be pluged directly, i understand for other baudrate, but the multiwii could try to send the proper PMTK string n each baudrate at start p in order to configure the gps to work at 115200

Re: Gps and Ardunio MIN ( atmega328P )

Posted: Tue Jan 03, 2012 8:29 pm
by Noctaro
hi,
sounds good! i also own arduino pro mini328p.
Would it be possible to just connect or disconnect the device on the serial port, like i do with the programmer?
Is there any inital communication between arduino and gui so that ardunino may be capable of detecting the difference?
I have got one of these nameless gps modules (10hz) -> http://fpvhobby.com/img/p/212.jpg
Could this one do the job?

greetings
Noctaro

Re: Gps and Ardunio MIN ( atmega328P )

Posted: Mon Apr 22, 2013 7:16 am
by felixrising
dramida wrote:Better, put a combo stick, with motors disarmed, throttle down, yaw center, pitch up for 2 secs - enable gps serial, pitch down for 2 secs- disable gps serial and back to gui.


Hi, did a combo stick solution get implemented? Any code snippets to implement a gps stick combo enable on serial 0?

EDIT: Looking at the current _shared codebase, if from def.h GPS_PROMINI is defined and in GPS.ino GPS_Present = 0, normal serial communication works, otherwise if GPS_Present = 1, then GPS serial coms work on 0... so simply plugging in the serial GPS will activate GPS on serial 0 and it will work.. at least that's what it looks like to me... so no need to implement a stick combo to toggle GPS on/off :D

Re: Gps and Ardunio MIN ( atmega328P )

Posted: Mon Apr 22, 2013 8:15 am
by PatrikE
GPS_PROMINI works great without stickcombo.
Plug in GPS and blöt mwii and it will works with GPS.
Boot without GPS connected and gui will work.

Re: Gps and Ardunio MIN ( atmega328P )

Posted: Wed Apr 24, 2013 4:01 pm
by felixrising
The only problem here is that the ublox gps when used with "#define GPS_PROMINI_SERIAL" (to auto detect when the GPS is connected) compiles too large to work on a HEX6X platform. Its small enough under a QUADX though but that doesn't help me. Is there some other way to configure MW and specifically the Aux check boxes for PH and RTH whilst skipping the additional overhead of the GPS auto-detect feature? At present I'm looking at a I2C-GPS to offload the NAV and Serial code to. I notice that the code for ublox also includes some configuration strings even though I've already configured the GPS EEPROM so it seems some additional memory is wasted on redundant code, perhaps a UBLOX_INIT define could remove this overhead?.