Difference between revisions of "AR Drone 2/GPS"

From PaparazziUAV
Jump to navigation Jump to search
(Created page with "That way we could extract the received data from the GPS and output it in our preferred format. To create our own driver, we first needed to know how to retrieve the data from …")
 
(move info from AR_Drone_2/GPS_Driver to here)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
That way we could extract the received data from the GPS and output it in our preferred format. 
{| align=right
To create our own driver, we first needed to know how to retrieve the data from the GPS. We downloaded the [http://www.usglobalsat.com/s-122-bu-353-support.aspx Linux USB Driver] and learned from the readme that you could use the GPS with the following commando:
|-
su root
|<categorytree style="float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;" mode=pages>AR Drone 2</categorytree>
|}
stty -F /dev/ttyUSB0 ispeed 4800 && cat < /dev/ttyUSB0
With this we found out that we needed to create a program that opens the /dev/ttyUSB0 device and reads it at a baud rate of 4800. We had to pick a datatype since working with several datatypes at the same time would be confusing. Therefore we had to extract the right datatype string from the data strings output by the GPS and format that string into useful information.


Later, when we were trying to integrate the GPS with paparazzi, we found out that there was already a parser for the protocol of the GPS: the NMEA. This parser (altough stated to be incomplete) provides most of the necassary data we wanted to use. We therefore ceased working on our own parser.
To fly autonomous to a certain geo coordinate a GPS is needed. Although it is theoretically possible to use the original orange Parrot GPS dongle it is not advised, the performance is just not good enough for great autonomous flights. The solution that '''is advised''' is to use an '''uBlox GPS''' module.
 
== uBlox ==
 
[[file:Ublox_gps_lea6q_top.jpg|200px]]
=== uBlox via serial ===
A FTDI TTL 232R 3V3 WE cable is used, where - WE stans for wire ended. 3V3 operates at +3.3V levels (signals only, VCC= +5V)
 
[[Image:HowtoConnectUSBHelixGPSForParrotARDrone2.jpg|thumb|left|How to connect USB to uBlox Helix GPS for Parrot ARDrone2]]
To connect a uBlox with Helix antenna via a USB to serial cable that you can just plug into your ARdrone 2
<br style="clear:both;" />
 
Example of a via USB connected uBlox Helix GPS for Parrot ARDrone2
 
==== Pinout colors ====
 
TTL - 232R - 5V, TTL - 232R - 3V3 Connector color coding
 
[[File:Ftdi_ttl_232r_3v3_we_color_coding.jpg|640px|FTDI TTL 232R 3v3 WE color coding]]
 
{|
|-
! Pin !! Color !! Abr.Color
|-
| 1 || Black ||BK
|-
| 2 || Brown ||BN
|-
| 3 || Red ||RD
|-
| 4 || Orange ||OG
|-
| 5 || Yellow ||YE
|-
| 6 || Green ||GN
|-
|}
 
==== How the connector is prepared ====
 
#A sharp knive deep in the outer end, the part where the wire come out, this will damage the first part of the wires, but that is OK, it will be cut of and not be used.
#Cut a along the whole wire till the USB connector begin
#Peel ot the wires in the begin
#Grab all the wires of the cable end stringly in your hand
#With one continuous pull, pull the wires out of the black outer plastic. With a cut alone the line this shoud go, just apply force.
# You are done!
 
=== uBlox via USB ===
complete me...
 
# load cdcacm kernel module
# change UART1_DEV to e.g. /dev/ttyACM0
 
== Parrot GPS Dongle ==
[[File:ParrotGPSOrangeFlightRecorderDongle.jpg|left|thumbnail|Parrot GPS Dongle]]
 
Use the <tt>sirf</tt> gps subsystem.
 
=== Connecting the Parrot GPS Dongle ===
When we connected the GPS Receiver (GPS) to the AR Drone 2.0 (Drone) and searched on the Drone, we found out that nothing happened. After some research we found out that there was no USB serial driver available on the Drone to recognize the GPS. From USGlobalstat, the manufacturer of the GPS, we found out that we needed an pl2303 driver. On the internet another [http://www.drone-rk.org/wiki/ARDrone project] was reported and there they were installing drivers for the Drone. We followed these steps but some errors occurred because we are using an AR Drone 2.0.
 
Once we found out that the Drone is running another version of Linux we have to change that. We had also some troubles with finding the right .config file to use. Finally we were able to make the modules, including the usbserial and pl2303, for the Drone.
 
From the make step we were getting 2 files, usbserial.ko and pl2303.ko. We put those files on the Drone by using FTP. Once the files are on the Drone we connected to the Drone by Telnet and went to the /data/video folder were the files we located. By insmodding the .ko files we installed the drivers on the linux system and we were able to connect the GPS to the Drone.  
After connecting the GPS was recognized and was mounted to /dev/ttyUSB0.
 
 
== Links ==
 
* http://forum.parrot.com/ardrone/en/viewtopic.php?id=5331
* http://www.dronetec.co.uk/quadmod.html
 
 
[[Category:AR Drone 2]]

Latest revision as of 13:17, 4 August 2015

To fly autonomous to a certain geo coordinate a GPS is needed. Although it is theoretically possible to use the original orange Parrot GPS dongle it is not advised, the performance is just not good enough for great autonomous flights. The solution that is advised is to use an uBlox GPS module.

uBlox

Ublox gps lea6q top.jpg

uBlox via serial

A FTDI TTL 232R 3V3 WE cable is used, where - WE stans for wire ended. 3V3 operates at +3.3V levels (signals only, VCC= +5V)

How to connect USB to uBlox Helix GPS for Parrot ARDrone2

To connect a uBlox with Helix antenna via a USB to serial cable that you can just plug into your ARdrone 2

Example of a via USB connected uBlox Helix GPS for Parrot ARDrone2

Pinout colors

TTL - 232R - 5V, TTL - 232R - 3V3 Connector color coding

FTDI TTL 232R 3v3 WE color coding

Pin Color Abr.Color
1 Black BK
2 Brown BN
3 Red RD
4 Orange OG
5 Yellow YE
6 Green GN

How the connector is prepared

  1. A sharp knive deep in the outer end, the part where the wire come out, this will damage the first part of the wires, but that is OK, it will be cut of and not be used.
  2. Cut a along the whole wire till the USB connector begin
  3. Peel ot the wires in the begin
  4. Grab all the wires of the cable end stringly in your hand
  5. With one continuous pull, pull the wires out of the black outer plastic. With a cut alone the line this shoud go, just apply force.
  6. You are done!

uBlox via USB

complete me...

  1. load cdcacm kernel module
  2. change UART1_DEV to e.g. /dev/ttyACM0

Parrot GPS Dongle

Parrot GPS Dongle

Use the sirf gps subsystem.

Connecting the Parrot GPS Dongle

When we connected the GPS Receiver (GPS) to the AR Drone 2.0 (Drone) and searched on the Drone, we found out that nothing happened. After some research we found out that there was no USB serial driver available on the Drone to recognize the GPS. From USGlobalstat, the manufacturer of the GPS, we found out that we needed an pl2303 driver. On the internet another project was reported and there they were installing drivers for the Drone. We followed these steps but some errors occurred because we are using an AR Drone 2.0.

Once we found out that the Drone is running another version of Linux we have to change that. We had also some troubles with finding the right .config file to use. Finally we were able to make the modules, including the usbserial and pl2303, for the Drone.

From the make step we were getting 2 files, usbserial.ko and pl2303.ko. We put those files on the Drone by using FTP. Once the files are on the Drone we connected to the Drone by Telnet and went to the /data/video folder were the files we located. By insmodding the .ko files we installed the drivers on the linux system and we were able to connect the GPS to the Drone. After connecting the GPS was recognized and was mounted to /dev/ttyUSB0.


Links