Ghettostation: mini antenna tracker & groundstation

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
kipkool
Posts: 30
Joined: Mon Jun 25, 2012 9:21 am

Ghettostation: mini antenna tracker & groundstation

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

Sebbi
Posts: 478
Joined: Sun Jul 08, 2012 1:08 am
Location: Germany
Contact:

Re: Ghettostation: mini antenna tracker & groundstation

Post by Sebbi »

Can this support FrSky telemetry? ;-)

kipkool
Posts: 30
Joined: Mon Jun 25, 2012 9:21 am

Re: Ghettostation: mini antenna tracker & groundstation

Post by kipkool »

it could.Is there any frsky arduino lib somewhere ?

msev
Posts: 186
Joined: Thu Apr 14, 2011 11:49 am

Re: Ghettostation: mini antenna tracker & groundstation

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

kipkool
Posts: 30
Joined: Mon Jun 25, 2012 9:21 am

Re: Ghettostation: mini antenna tracker & groundstation

Post by kipkool »

Thanks, looks exactly what's needed.
There's really good ideas on this project too. Good spot.

trello
Posts: 19
Joined: Wed Apr 10, 2013 1:04 pm

Re: Ghettostation: mini antenna tracker & groundstation

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

kipkool
Posts: 30
Joined: Mon Jun 25, 2012 9:21 am

Re: Ghettostation: mini antenna tracker & groundstation

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

msev
Posts: 186
Joined: Thu Apr 14, 2011 11:49 am

Re: Ghettostation: mini antenna tracker & groundstation

Post by msev »

Will you maybe support that cheap Crius OLED?

kipkool
Posts: 30
Joined: Mon Jun 25, 2012 9:21 am

Re: Ghettostation: mini antenna tracker & groundstation

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

Federico
Posts: 64
Joined: Thu Apr 05, 2012 12:32 am
Location: Italy
Contact:

Re: Ghettostation: mini antenna tracker & groundstation

Post by Federico »

is the tracking is gps based, right? the data are sent from the uav via the serial link to the traker?

kipkool
Posts: 30
Joined: Mon Jun 25, 2012 9:21 am

Re: Ghettostation: mini antenna tracker & groundstation

Post by kipkool »

yes.

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

kipkool
Posts: 30
Joined: Mon Jun 25, 2012 9:21 am

Re: Ghettostation: mini antenna tracker & groundstation

Post 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 )
Last edited by kipkool on Fri Apr 19, 2013 1:19 pm, edited 1 time in total.

msev
Posts: 186
Joined: Thu Apr 14, 2011 11:49 am

Re: Ghettostation: mini antenna tracker & groundstation

Post by msev »

This compass step eliminates the need for moving the plane 20m away from the groundstation right?

kipkool
Posts: 30
Joined: Mon Jun 25, 2012 9:21 am

Re: Ghettostation: mini antenna tracker & groundstation

Post by kipkool »

That's it msev.

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

msev
Posts: 186
Joined: Thu Apr 14, 2011 11:49 am

Re: Ghettostation: mini antenna tracker & groundstation

Post 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

Deet
Posts: 129
Joined: Sun Jul 08, 2012 1:54 am

Re: Ghettostation: mini antenna tracker & groundstation

Post 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

kipkool
Posts: 30
Joined: Mon Jun 25, 2012 9:21 am

Re: Ghettostation: mini antenna tracker & groundstation

Post by kipkool »

and you've set LTM protocol on the Ghettostation side ?

Deet
Posts: 129
Joined: Sun Jul 08, 2012 1:54 am

Re: Ghettostation: mini antenna tracker & groundstation

Post 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

User avatar
Plüschi
Posts: 433
Joined: Thu Feb 21, 2013 6:09 am

Re: Ghettostation: mini antenna tracker & groundstation

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

brm
Posts: 287
Joined: Mon Jun 25, 2012 12:00 pm

Re: Ghettostation: mini antenna tracker & groundstation

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

User avatar
Plüschi
Posts: 433
Joined: Thu Feb 21, 2013 6:09 am

Re: Ghettostation: mini antenna tracker & groundstation

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

Deet
Posts: 129
Joined: Sun Jul 08, 2012 1:54 am

Re: Ghettostation: mini antenna tracker & groundstation

Post 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

UAVrules
Posts: 2
Joined: Tue Nov 11, 2014 10:03 pm

Re: Ghettostation: mini antenna tracker & groundstation

Post 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

Deet
Posts: 129
Joined: Sun Jul 08, 2012 1:54 am

Re: Ghettostation: mini antenna tracker & groundstation

Post by Deet »

Yes, thats what I am doing

there is details on the ghettostation wiki

UAVrules
Posts: 2
Joined: Tue Nov 11, 2014 10:03 pm

Re: Ghettostation: mini antenna tracker & groundstation

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

User avatar
treym
Posts: 258
Joined: Sat Jul 21, 2012 12:28 am

Re: Ghettostation: mini antenna tracker & groundstation

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

Deet
Posts: 129
Joined: Sun Jul 08, 2012 1:54 am

Re: Ghettostation: mini antenna tracker & groundstation

Post 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

scoopdreams
Posts: 1
Joined: Fri May 30, 2014 4:06 am

Ghettostation: mini antenna tracker & groundstation

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

Deet
Posts: 129
Joined: Sun Jul 08, 2012 1:54 am

Re: Ghettostation: mini antenna tracker & groundstation

Post by Deet »

you can make your own, the parts list, schematic and the PCB design are all available form the ghettostation download site

ardufriki
Posts: 88
Joined: Thu Dec 13, 2012 4:47 pm

Re: Ghettostation: mini antenna tracker & groundstation

Post 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

Post Reply