Thursday, September 5, 2013

Ghettostation software: some big updates

I moved Ghettostation from GoogleCode to GitHub recently:

Because GitHub is cool and that's the place to be. -_-

Many improvements have been made codewise. Things still needs to be polished, but we should have a first stable release in a few.
All documentation & schemes in GoogleCode/Github are completely outdated for now.

- lots of clean-up and debugging.

- Teensy++2 support. It's the new reference platform for the project. 328P based Arduinos are still maintained, but none of the new functionalities are supported because of lack of memory & flash.
Teensy++2 have 4x more memory/eeprom/flash size, separated serial port for uart & usb & is Arduino IDE compatible ( using Teensyduino ).
I'll probably remove the 328p support. I don't want this project to finish in a #if #endif orgy.

- On field protocol change support: All supported protocols are compiled on the Teensy++2. Switch on the field from Multiwii msp protocol to UavTalk, or any other one.
I'll probably add some autodetection later.

- Added HMC5883 i2c mag support. Feeds antenna tracker heading automatically.

- Supports more open protocols: Multiwii MSP, OpenPilot/Taulabs UAVTalk, Autoquad/Ardupilot Mavlink

- Custom LightTelemetry protocol for low baudrates ( 1200 bauds or bigger ).
This is a one way only telemetry protocol.
I'm actually testing it with a Taulabs module, but will probably port it to OpenPilot & Multiwii too.
Lowering baudrate on RF Data transmission usually means bigger range. At 1200 bauds 433/915 mhz telemetry links should gives some pretty insane results.

LightTelemetry is the perfect candidate to use with FSK audio modem & your audio downlink.
I'm pretty sure it will pwns my 915mhz 3DR link range used with dipole antennas.

A dedicated article will detail this & the LightTelemetry proto when I receive those damn TCM3105 chipsets.

Meanwhile, I've also finished the hardware part :)

Field test soon.

Thursday, August 22, 2013

Virtual Bar mode is the way to go for acro

 OpenPilot / Taulabs have another flying mode than Rate & Axis Lock that is really fun for acro.

Here is how it's documented on the wiki:

This mode is different than rate mode in that it does not try to roll at a fixed number of degrees/s for each stick position, but rather applies the sticks directly to the outputs and applies a damping from the gyros.  The end result is that you can get much more aggressive rates...

 When I've tried last year on OpenPilot code, it was really hard to tune, because of missing D term in the PID loop.
James added it on Taulabs, and now it seems better. There's still a missing I term for attitude drift, but it's already really flyable and fun to play with.

The video is a jello orgy, one of my props had 1 cm missing on one side. Only saw it at the end of the flight of course.

VBAR mode or nothing

The quad was a bit too snappy, I need to lower P termst. But still really good control.

Tuesday, August 20, 2013

Heavy Duty Tracker ( part 1 )

 Hello folks.

After the 5.8ghz little antenna tracker, It's time to build a bigger one for those heavy 1.2 antennas.

- powerfull servos for handling some weight properly
- 360° pan with wires coming on the pan axis directly
- the tracker should fit in my fpv backpack with the rest of the groundstation
- modular backpack : can be used with or without antenna tracker depending of flight plans & mobility.
- still using my Ghettostation code.
- migrate from Arduino Nano to Teensy++2

Previous Ghettostation was using Atmega328P, and was almost full.
I've added some new cool features in Ghettostation code, but more flash & ram is needed.
So I've started to port the code on Teensy++2 ( 4x more ram/flash/eeprom compared to 328P ) .
This will be developped in a separated article.

- Plywood 0.5cm 
- Teensy++2
- Bluetooth Dongle
- 900 3DR telemetry module
- 5V 5A bec
- L/C filter
- Big pan& tilt servos from Servocity. Booth use reduction, pan servo allows the wire to pass trough the central axis.


 Box is made of 0.5cm plywood I've cut with a Dremmel. 5mn epoxy was used to glue the different parts.
12V from lipo is filtered with an L/C filter to avoid servo noise coming to the video RX power. Big servo are known for generating some craps in the power lineand that's not good for the video feed.
A 5amp 5V bec will power servos / micro-controller / Bluetooth & RF modules.
Pan servo will fit inside the box.

Used some good quality gold cinch connector for video/audio, and added the 3 needed buttons ( will replace them later, they sucks ).

Now with better buttons :)

Here is what it will look once closed. You can see the wires going trought the pan axis, this will prevent wire twists with 360° rotation.

 Covered the plywood with some fake leet carbon vinyl.

Reinforced the box with aluminum  half square tube. The box is now rock solid.

Made an easy access to electronic inside, using magnets to keep it closed.

Here is what it will looks on the tripod, seems we're not ghetto anymore.

Needs to integrate the tilt axis, doing proper connections and debug the mess.
To be continued in another article.

Wednesday, August 7, 2013

Acro Flying with CC3D

 All my fpv frames are stuck on ground for now, so this week is LOS time, and acro training.

I had to test this Virtual Flybar mode in OpenPilot. CC3D is loaded with latest Taulabs code, Peabody124 added the missing D term on the Virtual Flybar PID loops, and it changes everything. Now it's far more flyable.
Looks a bit like Multiwii rate mode with high Roll/Pitch rate setting, feels slightly differently, it's hard to explain.

Tuesday, August 6, 2013

Summer lazyness

So many thing to test, not enough time for all... Stuck in a time consuming project until end September.
I've still found few spare time to fly luckily.

Met ManuxApple on my flying field the other day. He wanted to put it's keychain like on my acro quad.
Here is the result :)

Monday, May 27, 2013

Alexmos brushless gimbal

Had this Alexmos board laying on my desk for a while now, waiting to be tested.

For those who missed the last 6 month hysteria around this subject, Alexmos developped end of 2012 a new approach of camera stabilization:

Before, we only had one solution for UAV, servo based gimbals.
The problem with servos was the low movement resolution, and the mecanical design inducing plays in bearing & slow reactions.
Alex approach was to use rewinded brushless motors with help of a dedicated stabilisation board & a 6 axis IMU.
Meanwhile, a german team launched their open source version of brushless gimbal. I haven't tested it yet, but seems promising too.

6 month later this thing goes mass market. Even chineses already entered in the game with a big range of products.
I doubt much people today will continue to use servo based gimbal, considering the result is far better to what we had to deal with before.

So I bought this cheap RCTimer alu gimbal:

Removed the top based fixation and made a front fixation for Iconic-X fpv frame.

I use the GoPro 3 back connector to grab video/audio signal and route it on a 3 way video switch.
This allows me to switch in flight between stabilized Gopro 3 & fixed fpv cam.

Tuning Alexmos softare PIDs was not a pain, took me 10 mn to achieve a pretty acceptable result.

Here is the non edited yesterday shot, in a strong wind:

Not bad for a first try isn't it ?

Friday, April 26, 2013

RangeVideo RVJet

RangeVideo released yesterday their new flying wing after a long long wait.

This seems to be a really neat platform for UAV experiment.
Large wings, lot of space for FPV stuff, can handle some interesting payload, and is shipped with a Pan/Tilt module for GoPro & fpv cam.

Full kit with frame, camera gimbal, servos & some accessories cost 249$. That's not bad on the paper.
You'll need to add 99$ for the Powerpack containing motor , 60A esc, spinner & folding props.
Total package for 350$ is still a good deal I think, If quality is there.
 The bad suprise was the shipping rates. 130$ for Florida to France with USPS priority package.

Hope I won't have the custom fees to pay , I'm a bit short those days :)

So what's special with this flying wing.

First it has wings extension you can use depending of the kind of flight & payload you're planning.
Full wing span is 1.95m, without extension it will gives you 1m55 wings, better for fast maneuvers & fun flying.

The second killer feature is the embedded pan/tilt system on the front.
It's suited for Gopro & fpv cam, with a nice protection glass at the front.

I'm not sure I'll put my incoming OpenPilot Revo on it cause I need it on my fpvquad.
Too bad those are rare as diamonds.
So I'll probably try a CC3D with fixed wing nav feature first. Or perhaps it's a good opportunity to try OpenAero32 on the Naze32.

Let's wait for it to cross the Atlantic first before reviewing the precious.

Monday, April 15, 2013

Minimosd hack for OpenPilot

 The problem with OpenPilot project is the really slow process between announced prototypes and released hardware.

They have a really nice OSD board incoming, but there's still no released date anounced yet.
And I need a good OSD now, so let's build a "temporary" solution.

JR63 & Amedee from OpenPilot forum ported the minimosd from Ardupilot to OpenPilot:
Thanks to them for that work.

Here is a video of what it gives on your video output:

On the other side, Team KV made the same thing for Multiwii project:

But I'll talk only about OpenPilot one for the moment. Things works the same for Multiwii project anyway.

Booth can works on the same board you can buy it at APM store, or some cheap chinese clones that popped around everywhere ( Rctimer, GoodluckBuy, HobbyKing, Ebay )

This is nothing more than an Atmega328P with arduino bootloader & a MAX7456 chip for overlaying text on a video stream.

It doesn't has any current/voltage sensor embedded, and ADC pins are not mapped on the board.

We will need to hack it a bit to suit our needs.

There's many available ADC pins on the Atmega 328P. We just have to wire directly on the chip pins.

We need 3 adc input here. I've choose thoses:
- ADC1 ( pin 24 ) for RSSI
- ADC7 ( pin 22 ) for Current sensor
- ADC6 ( pin 19 ) for Voltage sensor.

To make the thing easier, I choose to use the Attopilot 90A current/voltage sensor.
Like the minimosd, you have the official choice from APM store, Sparkfun one, or some chinese clones ( from rctimer ).

It outputs voltage & current  to a 0-3.3V range.

On MinOPosd wiki, they advice to use some voltage divider to reduce input range to 0-1.1v.
Original code use 1.1v internal atmega voltage reference.

Because I'm lazy, I've decided to use the default 5V voltage reference instead.
We will loose a bit of resolution ( 1024 steps on 0-5v range , so this give us 675 steps for  our 3.3v output. ), but considering the usage, this will be far sufficient.
Just be sure you have a stable 5V input.

Solder 3 wire on the 3 adc pins you want to use.
Don't drink too much coffee before, take a little soldering iron, breathe a bit, and let's go.

 Attopilot already has a 1K resistor on the voltage output, so you don't need to add one ( I've removed it after I took the pic below )
You still should add a low impendance resistor to the current pin. Attopilot already has a capacitor on current output. Adding a resistor will act as an RC filter.
I've added a 470 Ohm resistor to RSSI wire too to limit current.

Here is the board ready with Attopilot sensor:

Attopilot 90A/50v current sensor specs:

 - 63.69 mv/v for voltage sensor
 - 0-3.3v output range for 0-51V input
- 36.6 mv/A for current sensor
- 0-3.3v output range for 0-90A input.

Now we need to change few stuff on minoposd code.

edit the OSD_Config.h to suit your needs :

in my case;
#define ANALOG_RSSI_ON_MINIMOSD  ( I use RangeLink analog rssi output , 0-3.3v range )


#define VOLTAGE_PIN            6
 #define CURRENT_PIN            7
#define REF_VOLTAGE            5            // DEFAULT: a built-in reference, equal to 5 volts on the ATmega328
#define LOW_VOLTAGE            13.2            // filter start value for 4s LiPo
#define VOLT_DIV_RATIO            15.70            // Attopilot 90A/50v sensor Vref 5V based
 #define CURR_AMP_PER_VOLT        27.32            // Vref 5V based: This is the start value for calibrating a +-90A Current Sensor(AC/DC)Attopilot  Sensitivity: 36.6mV/A
#define CURR_AMPS_OFFSET        0.0000          

change analogReference from Internal to Default:



#define RSSI_PIN            1           // A1 is pin 24
#define REF_VOLTAGE            5            // DEFAULT: a built-in reference, equal to 5 volts on the ATmega328

change analogReference from Internal to Default:

After that we just have to compile, & load  minimosd with Arduino software.

Now you can follow the minoposd wiki to finish configuration from the software & osd menu.

With just few easy trick we now have a cheap & working well osd

Thursday, April 4, 2013

GhettoStation: hardware build log ( second part )

Almost finished the Ghettostation hardware & software is ready for its first revision. 

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 )
- an oplink/Xbee/RF433 or any other RF serial link with your UAV.
- a Bluetooth dongle ( for bridging the telemetry to your PC or Android phone for Groundstation software ).
- a 5V ubec 5A
- a 3s lipo 1800mA
- an ImmersionRC 5800 video diversity
- an SDCard video recorder.

The Arduino software I've made can handle any type of mechanic for pan & tilt.
The pathfinder algorithm inside should handle it without problem.

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:

Everything seems to work flawlessly now.
I only have to patiently wait for the week-end  for testing this crap on the field.

To be continued...

GhettoStation: hardware build log ( first part )

When I've started the Ghettostation, I've fixed some few objectives:


- only recycled stuff used
- mini antenna tracker & groundstation for 2.4/5.8ghz frequencies that can fit in a backpack.
- host the  wireless video receiver & SDCard video receiver in the box.
- Power all the devices from the same 3S lipo battery ( Arduino, Xbee module, Bluetooth dongle, video receiver & recorder, servos, and the video glasses ( Fatshark ).
- not loosing time on the field with wiring cables, everything needs to be already ready to fly.

I've found this old Go Pro plastic box laying around. Perfect size for my project.

Adding on it 3 joypad buttons and an LCD03 i2c LCD screen showed the potential:

For the Pan axis, I used an old thrust bearing like this.

 I've wanted the whole box paning around, just because it looks cool :).

This will allow free movement without forcing on the servo. All the weight is supported by the bearing.

I already have a big antenna tracker that can move freely at 360° pan. But this won't be really practical for this one. I need to prevent wire twisting mess.
So I choose a 180° pan 180° tilt configuration. This still allows full 360° covering by just inversing Pan & Tilt position when you need to aim backside.

Tilt axis comes from ServoCity.
Ok I've shamelessly bought this one.

It'll covers almost 180° ( 160° ), far sufficient for what I'll do with it. When you fly fpv you rarely go far away on your back.

Now, it's time to assemble all this mess.

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:

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.


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.


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

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


Forum threads:


UATalk api from JR63 ( Minoposd : )
Multiwii MSP api from John Grouse project:
Bearing/Azimuth math inspired from :

Welcome nerdos

I'm opening this blog today, after 20 years of personal technologic/artistic projects & experiences.
My personal life evolved around various communities , using different virtual identities, and today I feel a bit disappointed not having a central hub of my creative frenzy.

This blog will track down DIY news around UAV ( drones ) , Robotic, Electronics, Domotic, and any other subjects I'm geeking around. And because with help of Internet & DIY, there's really no limit today to accomplish our technological phantasms,  we don't need Nasa...

Guillaume S.