Page 1 of 1

Ghettostation: mini antenna tracker & groundstation

Posted: Wed Apr 03, 2013 12:39 pm
by kipkool
Hi guys



Here is the Ghettostation, Arduino based groundstation with antenna tracking for OpenPilot & Multiwii.
This one works with any pan/tilt course capabilities. It will find it's path alone depending of your servo liberty ofmovement.



http://code.google.com/p/ghettostation/



Image
Image
Image

Hardware:

What's in the box:

- an old gopro plastic box
- 3 joypad buttons
- an lcd03 I2C 20x4 ( will add other LCD type later )
- an arduino ( nano or any other )
- 2 standard servos( with 180° capability, most servos of the market ) , or a 360° servo (pan ) & a 90° one (tilt), or whatever you want in fact. Software will handle it.
- an oplink/Xbee/RF433 or any other RF serial link with your UAV.
- a Bluetooth dongle ( if you want to bridge the connection with your PC or Android phone for GCS use )
- a 5V ubec 5V
- a 3s lipo
- an ImmersionRC 5800 video diversity
- an SDCard video recorder.

Pan axis goes under the box, the whole cube turn itself on it's pan axis.
I used a big thrust bearing like this one:

Image

This allow to use a light servo, all the weight is handled by the bearing.

For the tilt I use a tilt axis from ServoCity.
This is just my config, but the software can handle any type of mechanic capability ( 180° pan / 180° Tilt, 360° pan / 90° tilt, 180° pan / 90° tilt, & even any personal variations ( 220° pan 160° tilt, etc )

Here we have a 180° pan / 160° tilt capability. I only send it 0-360° pan angle and 0-90° tilt angle, and it will adapt its course like here:




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.




Build:

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


Image


First config:

- add provided libraries in your arduin library folder.
- edit config.h according to your needs.
Default servo pwm endpoints & max/min angles can be setup here, you can configure this later trought the menu while running.

You can put some conservative default parameters to avoid forcing on the servo for first configuration.

Check in the config.h what those parameters means.


Compile & start.


Usage:

In the menu:
Enter = Select
Long press Enter ( >1sec ) = Go back.
LeftRight: Navigate.

- At first launch, go to CONFIG menu, and set your servos endpoints & angle capabilities.

You will now you have good endpoints values when you don't ear your servo forcing.

Then configure your servos angle limits. 90° as min& max angle for pan means you have a 180° pan config.

Once all those parameters are set, Ghettostation will now your hardware capabilities and adapt servo path to it's need.

It means if your pan servo is limited to 180° but your tilt can go almost 180° too, you can cover 360 by reversing your pan and tilt.
If you servo can go further, it'll just continue to it's own limits and then switch if needed.

If there's no path possible because your servo can go further, it will just stop & wait you come back in a covered area.

- Go to SET HOME first & wait for telemetry data.

Wait for a 3D GPS fix then save home position.
Once done you have to set the bearing.

Put your UAV 20m ahead, with the tracker pointing it, and click Enter again.

If everything is ok you can enjoy your flight now.


Project : http://code.google.com/p/ghettostation/
Code: http://code.google.com/p/ghettostation/source/checkout
Manual: http://code.google.com/p/ghettostation/wiki/Manual




Multiwii protocol is untested for now, I'd be glad if somebody could test it. I don't have any mwc alive for now.

Re: Ghettostation: mini antenna tracker & groundstation

Posted: Wed Apr 03, 2013 4:06 pm
by Sebbi
Can this support FrSky telemetry? ;-)

Re: Ghettostation: mini antenna tracker & groundstation

Posted: Thu Apr 04, 2013 9:45 pm
by kipkool
it could.Is there any frsky arduino lib somewhere ?

Re: Ghettostation: mini antenna tracker & groundstation

Posted: Fri Apr 05, 2013 11:22 am
by msev
Kipkool maybe you could get something useful out of this regarding Frsky: http://fpv-community.de/showthread.php? ... en-Tracker

Otherwise really cool project :)

Re: Ghettostation: mini antenna tracker & groundstation

Posted: Fri Apr 05, 2013 11:48 am
by kipkool
Thanks, looks exactly what's needed.
There's really good ideas on this project too. Good spot.

Re: Ghettostation: mini antenna tracker & groundstation

Posted: Fri Apr 12, 2013 6:59 am
by trello
Nice work! I really like the support for multiple protocols and different servo configurations. I'm trying to get it running with a nokia 5510 lcd instead of the LCD03 because i have nokia lcd here. Maybe we can do some fancy stuff with the graphics library and the lcd, like direction indicators, maps and stuff. I'm interested in helping out with the code.

Re: Ghettostation: mini antenna tracker & groundstation

Posted: Fri Apr 12, 2013 11:09 am
by kipkool
You're welcome trello.

I'm agree about LCD stuf should be more generic and gives ability to use different type of hardware.
Perhaps adapting Multiwii lcd implementation is the easy way to go ?

I have an i2c oled device that could fit well too here.

Re: Ghettostation: mini antenna tracker & groundstation

Posted: Fri Apr 12, 2013 3:45 pm
by msev
Will you maybe support that cheap Crius OLED?

Re: Ghettostation: mini antenna tracker & groundstation

Posted: Fri Apr 12, 2013 3:58 pm
by kipkool
I have a similar module too so would be the easier part to do.
Just need to find a bunch of spare time.

Re: Ghettostation: mini antenna tracker & groundstation

Posted: Fri Apr 12, 2013 5:12 pm
by Federico
is the tracking is gps based, right? the data are sent from the uav via the serial link to the traker?

Re: Ghettostation: mini antenna tracker & groundstation

Posted: Fri Apr 12, 2013 5:20 pm
by kipkool
yes.

There's more info on my blog: www.wedontneednasa.com

Re: Ghettostation: mini antenna tracker & groundstation

Posted: Thu Apr 18, 2013 11:22 am
by kipkool
I've added a new method to set bearing reference to north.

Now you can setup the angle manually from any external compass ( real one or your smartphone one )

Re: Ghettostation: mini antenna tracker & groundstation

Posted: Thu Apr 18, 2013 9:04 pm
by msev
This compass step eliminates the need for moving the plane 20m away from the groundstation right?

Re: Ghettostation: mini antenna tracker & groundstation

Posted: Fri Apr 19, 2013 1:18 pm
by kipkool
That's it msev.

If your antenna tracker at neutral position point to 40° reference to north, just enter 40.

Re: Ghettostation: mini antenna tracker & groundstation

Posted: Sun May 12, 2013 8:59 am
by msev
Got the parts already on the way from China from two weeks now, another week or two to go :D...

Please add Frsky protocol on the to-do list ;-) hehe

Re: Ghettostation: mini antenna tracker & groundstation

Posted: Thu Oct 09, 2014 1:34 am
by Deet
I can't seem to get any data from my board running v2.3 into the ghettoproxy

i have tried different board rates, different pole settings, and swapped rx/tx leads on ech different config but just can't get data

Re: Ghettostation: mini antenna tracker & groundstation

Posted: Thu Oct 09, 2014 1:18 pm
by kipkool
and you've set LTM protocol on the Ghettostation side ?

Re: Ghettostation: mini antenna tracker & groundstation

Posted: Thu Oct 09, 2014 11:51 pm
by Deet
YES LTM is set, at 2400 baud at both ends

I get a message saying P:LTM No GPS, 0 Sats, NO 3D FIX. If I disconnect the data between the ghettoproxy and the modem that changes to "no telemetry"
So the Link from proxy to station is working, I just cannot seem to get the data from the FC to the proxy

I am running out of serial 0
The port does work with a BT module (disconnected while running ghettoisation)
I have tried 115200 and 56700 baud rates, I have tried with #define PASSIVEMODE 1 and #define PASSIVEMODE 0
in each instance I have swapped the rx/tx wires on the input to the proxy

I just can't get comms between the two devices

Re: Ghettostation: mini antenna tracker & groundstation

Posted: Sun Oct 12, 2014 6:32 pm
by Plüschi
I have built an arduino FSK modem using the LTM protocol. Data rate is only 1000 baud, so i get only 2 GPS messages a second, which results in servos shaking twice a second.
Has ghettostation a build-in smoother for such low data rates? If yes, could you indicate where? Or is this a non-issue?

I have experimented with a fixed gain kalmann extrapolator on cartesian data for 500ms -> 50ms conversion. Result is good at hi-speed, but not good at low speed.

Not extrapolated:
http://www.youtube.com/watch?v=xxoawzEFNgQ
Extraploated (az only):
http://www.youtube.com/watch?v=LT0KA-fSjVc

Is the remaining shakes due to servo imprecision?

Re: Ghettostation: mini antenna tracker & groundstation

Posted: Sun Oct 12, 2014 10:41 pm
by brm
Plüschi wrote:I have built an arduino FSK modem using the LTM protocol. Data rate is only 1000 baud, so i get only 2 GPS messages a second, which results in servos shaking twice a second.
Has ghettostation a build-in smoother for such low data rates? If yes, could you indicate where? Or is this a non-issue?

I have experimented with a fixed gain kalmann extrapolator on cartesian data for 500ms -> 50ms conversion. Result is good at hi-speed, but not good at low speed.

Not extrapolated:
http://www.youtube.com/watch?v=xxoawzEFNgQ
Extraploated (az only):
http://www.youtube.com/watch?v=LT0KA-fSjVc

Is the remaining shakes due to servo imprecision?


you might dampen the servo changes using a 25hz pt1 element.

Re: Ghettostation: mini antenna tracker & groundstation

Posted: Mon Oct 13, 2014 3:12 am
by Plüschi
Instead of a lowpass i can reduce the extrapolator filter gain and (i think) get the same result without the additional lag. The tracker is already half a second behind the plane as-is.
Examining the data i can not see any irregularities. I guess the problem is the hysteresis of the servo. Servo movement is jerky when slow, but smooth when faster.

I guess i need a brushless gimbal ... and then mount a camera on it ... and have it auto track the plane.

Re: Ghettostation: mini antenna tracker & groundstation

Posted: Tue Oct 14, 2014 1:28 am
by Deet
I have done some testing and worked out my issue is due to the ghettoproxy not polling the MW board

The MW board I have has activity lights for the serial port. If I connect a BT module to that port and connect to the BT, the serial lights show activity. With the ghettoproxy connected to the serial port, I get no activity lights for that port.

I did a temporary connection so that I could run the BT module and the ghettoproxy off the same port. And as long as the BT module is active I get the downlink data to my ghettostation.

As mentioned I have tried both the following:
#define PASSIVEMODE 1
and
#define PASSIVEMODE 0

I also just tried leaving PASSIVEMODE 1 and changed the following line in the ghettoproxy code from

if (!PASSIVEMODE) { // query MSP packets
to
if (PASSIVEMODE) { // query MSP packets

and that still didn't make any difference

I simply can't get the proxy to poll the MW board

Re: Ghettostation: mini antenna tracker & groundstation

Posted: Tue Nov 11, 2014 10:05 pm
by UAVrules
is there a way of sending the telemetry data from the UAV via the Vrx audio line to the GCS?? similar to the EZ tracker

Re: Ghettostation: mini antenna tracker & groundstation

Posted: Tue Nov 11, 2014 11:20 pm
by Deet
Yes, thats what I am doing

there is details on the ghettostation wiki

Re: Ghettostation: mini antenna tracker & groundstation

Posted: Mon Nov 17, 2014 12:39 am
by UAVrules
Deet wrote:Yes, thats what I am doing

there is details on the ghettostation wiki


Do you have a link. I can't find any information. Have you managed to do it? I'm would like to use the naze32 full flight controller with ublox GPS. How do I get the telemetry data on the UAV to the audio in on the Vtx and then how do I get the audio with the telematry info From the Vrx to the arduino mega?

I appreciate your help and thank you in advance, I just carnt get my head around it and the information for the ghetto tracker is a bit vague. There's no complete build logs etc.

Re: Ghettostation: mini antenna tracker & groundstation

Posted: Tue Nov 18, 2014 3:52 am
by treym
kipkool wrote: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.


so, if i am correct ,the groundstation has to decode ltm ?


some demo code for a droid gs with ltm support ,

Re: Ghettostation: mini antenna tracker & groundstation

Posted: Wed Nov 19, 2014 3:31 am
by Deet
UAVrules wrote:
Deet wrote:Yes, thats what I am doing

there is details on the ghettostation wiki


Do you have a link. I can't find any information. Have you managed to do it? I'm would like to use the naze32 full flight controller with ublox GPS. How do I get the telemetry data on the UAV to the audio in on the Vtx and then how do I get the audio with the telematry info From the Vrx to the arduino mega?

I appreciate your help and thank you in advance, I just carnt get my head around it and the information for the ghetto tracker is a bit vague. There's no complete build logs etc.


initial post has the link

Ghettostation: mini antenna tracker & groundstation

Posted: Fri Nov 28, 2014 7:19 pm
by scoopdreams
Hi does anyone know where else to buy afsk modem like what aero quad sells? Apparently they don't ship to where I live.

Or is there a way I can use my minimosd to throw out an modem signal that my ghetto station can use?

Thanks!

Re: Ghettostation: mini antenna tracker & groundstation

Posted: Sat Nov 29, 2014 12:20 am
by Deet
you can make your own, the parts list, schematic and the PCB design are all available form the ghettostation download site

Re: Ghettostation: mini antenna tracker & groundstation

Posted: Wed Mar 11, 2015 8:59 am
by ardufriki
hi, Im trying to compile GhettoProxy with Arduino IDE 1.6.0, but always get the error messages (and other similar):

Code: Select all

In file included from C:\Users\p\Downloads\arduino-1.6.0-windows\arduino-1.6.0\libraries\FastSerial/BetterStream.h:16:0,
                 from C:\Users\p\Downloads\arduino-1.6.0-windows\arduino-1.6.0\libraries\FastSerial/FastSerial.h:56,
                 from GhettoProxy.ino:17:
C:\Users\p\Downloads\arduino-1.6.0-windows\arduino-1.6.0\libraries\FastSerial/../AP_Common/AP_Common.h: In function 'int strcasecmp_P(const char*, const prog_char_t*)':
C:\Users\p\Downloads\arduino-1.6.0-windows\arduino-1.6.0\libraries\FastSerial/../AP_Common/AP_Common.h:108:38: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
     return strcasecmp_P(str1, (const prog_char *)pstr);

I dont know if it is an issue with FastSerial.h and I can use another library. Any clue? Thx. :D