Gps and Ardunio MIN ( atmega328P )

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
JohnyGab
Posts: 144
Joined: Sat Oct 29, 2011 4:41 am

Gps and Ardunio MIN ( atmega328P )

Post 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.

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: Gps and Ardunio MIN ( atmega328P )

Post by timecop »

What is a FTDI serial port?

JohnyGab
Posts: 144
Joined: Sat Oct 29, 2011 4:41 am

Re: Gps and Ardunio MIN ( atmega328P )

Post 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

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: Gps and Ardunio MIN ( atmega328P )

Post 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)

marbalon
Posts: 107
Joined: Thu Aug 18, 2011 10:59 am

Re: Gps and Ardunio MIN ( atmega328P )

Post 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.

JohnyGab
Posts: 144
Joined: Sat Oct 29, 2011 4:41 am

Re: Gps and Ardunio MIN ( atmega328P )

Post 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

Waldmensch
Posts: 31
Joined: Sat Dec 31, 2011 12:10 am

Re: Gps and Ardunio MIN ( atmega328P )

Post 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.

User avatar
dramida
Posts: 473
Joined: Mon Feb 28, 2011 12:58 pm
Location: Bucharest
Contact:

Re: Gps and Ardunio MIN ( atmega328P )

Post 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.

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: Gps and Ardunio MIN ( atmega328P )

Post by PatrikE »

I made a jumper solution like
If jumper deteceted use gps else gui.

Only check the jumper in setup().

JohnyGab
Posts: 144
Joined: Sat Oct 29, 2011 4:41 am

Re: Gps and Ardunio MIN ( atmega328P )

Post 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

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: Gps and Ardunio MIN ( atmega328P )

Post by PatrikE »

Problem is GUI and GPS uses different Baudrates.

JohnyGab
Posts: 144
Joined: Sat Oct 29, 2011 4:41 am

Re: Gps and Ardunio MIN ( atmega328P )

Post 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

Noctaro
Posts: 280
Joined: Thu Sep 08, 2011 11:15 am
Contact:

Re: Gps and Ardunio MIN ( atmega328P )

Post 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

felixrising
Posts: 244
Joined: Sat Mar 23, 2013 12:34 am
Location: Australia

Re: Gps and Ardunio MIN ( atmega328P )

Post 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

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: Gps and Ardunio MIN ( atmega328P )

Post 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.

felixrising
Posts: 244
Joined: Sat Mar 23, 2013 12:34 am
Location: Australia

Re: Gps and Ardunio MIN ( atmega328P )

Post 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?.

Post Reply