Thursday, April 4, 2013

GhettoStation : Arduino based groundstation & antenna tracker for Unmanned Aerial Vehicle

Here is my latest project, the Ghettostation.
It's an open source Arduino based groundstation with antenna tracking for UAVs.

For those who don't know, I build and fly multirotors & other toys.
Antenna tracker are usefull when you fly FPV. You need the best video stream possible and pointing reception directional antennas to your UAV is the best way to achieve it.

An antenna tracker grab on the ground your drone GPS coordinates, and move the antenna on pan & tilt axis to aim your vehicle position.


This one get GPS data from your telemetry wireless link.
For now It works with OpenPilot UAVTalk protocol & Multiwii MSP.
I'll add later NMEA , FRSky & MAVLink protocols.



Ghettostation handles any pan/tilt course capabilities. It will find it's path alone depending of your servo liberty of movement.

Current code is available here: http://code.google.com/p/ghettostation/



The software runs on  atmega 328 or more.
Any arduino suits the task.

Arduino ram & flash is almost full, but there's many way to optimise my "dirty?" code for future functionalities.


Manual:



What you need:

- an arduino 328 or more

- a serial wireless link between the tracker and the UAV ( Xbee, Oplink, RF433, etc )

- optional: a bluetooth dongle to bridge telemetry from the tracker to your GCS.

- 2 servos

- 3 push buttons

- an LCD03 I2C panel.




Wiring:

 - plug your pan signal servo wire to pin 6 and tilt to pin 9 ( you can change the pins in the config.h if needed)

 - optional: add a led to pin 13

 - Wire you Xbee/Oplink/whatever Tx pad to arduino Rx pin ( pin 2 ).

If you don't have an osd using the telemetry protocol, or a GCS running on the ground, you'll need to wire the Rx pad of the Xbee/Oplink to the Tx pad of the arduino ( pin 1 )

 - you should add a bluetooth dongle too if you want to use your groundstation software at the same time : Wire bluetooth Tx to Xbee Rx, and BT rx to Xbee Tx.

- wire the 3 buttons from pin 3, 4 , 5 to ground.
LEFT_BUTTON_PIN 4
RIGHT_BUTTON_PIN 3
ENTER_BUTTON_PIN 5


- you'll need an external 5/6v voltage regulator for the servo power. Arduino can't draw too much amp on it's own 5v line.



Scheme:



Forum threads:

Openpilot: http://forums.openpilot.org/topic/20823-ghettostation-mini-antenna-tracker-groundstation/
Multiwii: http://www.multiwii.com/forum/viewtopic.php?f=8&t=3350
 
Credits:

UATalk api from JR63 ( Minoposd : http://code.google.com/p/minoposd/ )
Multiwii MSP api from John Grouse project: http://code.google.com/p/mwp-arduino-antenna-tracker/
Bearing/Azimuth math inspired from : http://www.movable-type.co.uk/scripts/latlong.html