dinsdag 3 januari 2012

Turnigy 9x Frsky telemetry Android diy

This post will have all the information needed to get the Frsky telemetry data tx module mounted on your Turnigy 9x transmitter (backorder it or you may never receive one!!) and data displayed on your Android device. I'm still waiting for some parts so I can't post all information yet. Get back this post if you need all the info.

Prepare Turnigy 9x for module removal (without soldering)

First step is to get this module on your Turnigy 9x and confirm the normal radio functions are still live once done. I got all the needed information from this topic on rcgroups. The biggest issue is that you need to cut the original antenna since Turnigy didn't respect the modular system. Luckily only this is the only issue.

Some pictures from that thread. What this person did was unsolder the wire on the module so you can take wire through existing holes out of the transmitter and remove antenna. If you want to reuse the turnigy module or want to keep it as a backup you'll then have to solder the antenna again to the module. This soldering isn't easy!!



I checked the size of the soldering to be done and decided I wouldn't take that risk (not with my skills). So I created a bigger opening next to each opening for the wire. For the antenna to pass through you need a 9mm hole. Be very careful not to damage the antenna!! I protected the antenna with some duct tape first. Better safe than sorry.

You need to create this opening in the back board and in the back plate of the module. For mounting I also created a hole in the front (sticker) of the module to put the new antenna on. Once you have a 9mm opening next to the smaller holes you can connect these and so the antenna and wire are free to go through.

Some pictures of the process:


This is how the antenna looks once you have the screw on the antenna bracket and inside the casing undone. The 2 black plastic parts need to be removed and then you can get the antenna through without touching the wire.


The 2 black pieces on the bottom of the antenna that had to be cut to let wire through.


Now the antenna is free to go through the antenna foot of the casing. You can see I also had to cut a bit of the plate on the casing where the antenna foot screw was attached to. It can still be used, it's just a bit shorter now. 


This is how the antenna wire comes through the back pcb. On the back this pcb is painted darker (black) and you can see some tracks on the borders. Stay away from these tracks.


By simply cutting a 9mm hole next to the smaller antenna hole and then matching these you can get the antenna in one piece through this pcb also. When cutting the pcb you have to be very careful not to touch the antenna wire! I had the antenna wire wrapped in some tape and used a dremel tool to get the 9mm hole cut out.

The same 9mm hole was made in the module casing in the back. The transmitter casing already had a hole that lets the antenna pass. Here you can see the protective tape. 


The final assembly. I hot glued the antenna in place.

Swap Turnigy 9x module for the Frsky DJT module

Now you're ready to plug in the frsky DJT module. In fact all you need to do is swap the module on the back. Make sure you ordered the DJT and not the DFT module. The DJT module is for JR type connections (like the turnigy 9x) while the DFT is for Futaba & Hitec type connections. Hobbyking has some errors in the names of their products. Check these links to make sure you have the right one.

On top the original turnigy 9x module (modified to get it apart)
At the bottom the new frsky module with the standard antenna mounted
on the side the longer frsky antenna for extended range

It should be just a matter of swapping the modules around. Test your connections though since I had some issues with mine. On my Turnigy 9x the PPM pin (the top pin) is a bit shorter and was not connecting well on the frsky module. Bad thing is that you don't get any real feedback from this issue. The longer power pins are still in place and connections with receiver is OK. The only thing missing is the PPM value... so no servo's or throttle will react!? I could easily have the pins disconnect by just shaking my transmitter!!

The top PPM signal pin is shorter than the other pins!

I read about other people having issues with their original module because of the pins on the tx casing side being pushed back. Mine were strongly in place on the tx though. So next I opened up the frsky module and tested again with the module cover taken away and I noticed the pcb in the module was pushed back! Fixing this with some hot glue to keep the pcb in place was my solution. In the end this turned out to be a QC issue. The pin was just pushed back on the soldering so I could easily fix this by heating op solderjoint and pushing from the other side back out.

The white piece accepts the pins. I dropped some hot glue above and underneath that connector on the pcb agains the wall of the housing. This way it can't come up anymore.

Now let's hope I never loose control up in the air. Or even worse on takeoff or landing. Once up I could probably still realize that the module got out and just push it back in. But on critical moments I'll definitely crash my plane!

Add bluetooth to Frsky DJT module

Next we want a wireless communication set up between our android device and the Frsky DJT telemetry system. For this we will use bluetooth since it's so cheap and easy to use. Some people were concerned that the 2.4Ghz of the bluetooth would interfere with the frsky signal. I didn't notice any issues for normal flying. Can 't say what it does in longer range situations like FPV. No need to worry until you get an early bad signal feedback from your module. At that point you can always start testing with a wired connection between your android device (usb serial) and the module.

All the information you need to connect these elements is available here. You basically want to connect the power and ground on that bluetooth board and have tx connected to rx and vice versa. Make sure to check voltage on pin and what voltage your bluetooth connector accepts.

This is a picture from the module used in the project linked on top. It should work without any modifications directly to the pins on the frsky module. At least that is what I understand from the documentation.

I used a cheaper bluetooth module from goodluckbuy. More information on the bluetooth module I used (from goodluckbuy.com). Besides the normal settings update I also had to add a serial inverter in line. Otherwise I got a bad signal that the android dash couldn't parse any data. To fix this easiest solution is to add the inverter from frsky. Known as the fdl-lite or the upgrade cable lite.

A picture of the inverter from the product page

The connection between the two

The extra inverter board wrapped in black shrink and glued to the BT module.

Check android bluetooth post on this blog how to update the baud rate using AT commands. Mine came with 9600 set by default which is just fine for the frsky project. These are the settings you're after (from frsky documentation):

Serial COM RS232 level, setting: 9600bps, 8bit, No parity, 1 stopping bit.

If you check the output by connecting your android using BlueTerm app and you see strange characters you probably have the baud rate set wrong.


Connect your Android Device 

This step is easier than you could ever imagine. An apk is already written and available. Project information is available from this frsky android dashboard project website.

Some screenshots:


For now the application is only listing the analog voltages and signal strength. You can also set the alarms using this app. But I didn't see any support for the sensor hub yet. Project looks very active still so I expect it to be available some day. I already contacted them to see if I can contribute my code I'm going to write for this.

I've been working together with the creator of this app to get the sensor hub information on the screen as well. We have all sensors translated properly and a basic visualisation. Next step is to create some better visuals for this data and implement all the nice extra's. Keep an eye on the project website if you're interested!

The Android application has many features you can implement. Think of gps position of both plane and Android device on transmitter on map and calculation of distance between them. Graphical and audible information about altitude. Logging of data to sd card in any format. And so on. You could even use twitter to fool around (no real use for that yet but you never know). Keep subscribed to see what can be done!

zondag 1 januari 2012

Turnigy 9x Telemetry options

I've been looking around for a good and yet affordable telemetry solution. I have some trouble estimating the actual speed of my plane to prevent a stall. With a good telemetry system I could just read that from a display. So for me most important module besides voltage is gps providing speed & altitude.

I started looking at the existing systems available as for today. I really like my Turnigy 9x and have modified it already to match my needs. So I would like to keep that. These are some options available as is.

Frsky Telemetry with display

The Frsky DHT-U telemetry system looks very promising. It has many sensors available already and is in fact a complete 2 way system. So you could just swap your current tx/rx system for this one. If you want speed and altitude just like me you'll need at least this set up:





* If you already have a Frsky DJT 2 way module (or DF module for futaba) you could always get the FLD-02 display instead.

** GPS isn't the cheapest sensor anyway. Many other sensors are available for less, think of barometer (altitude) for 10 USD, temp for 4 USD, etc. For some reason the gps didn't provide altitude information!! Well after checking the official frsky protocol information it seems to be sending this information back to transmitter but it doesn't show on the display. So for altitude you'll need the barometer anyway or you'll have to wait for a firmware fix.

Quanum Telemetry

For those who only want the voltage information with optional temp and amp draw there is a cheaper telemetry system available from quanum (hobbyking). It doesn't include a 2 way transmission so it only works as a surplus on your current transmitter system. If you look around for a buddy code you can get this one for around 45 USD. Please note that by default this system only provides voltage display. To get temp and amp draw you need to extra module. The V2 receiver is ready for the 2 extra signals (the kit just doesn't come with the sensors).



Its limited to these 3 readings (voltage/amp/temp) but if you only buy the rx/tx kit you still have 2 spare channels. With some knowledge of electronics you might be able to update this system by using your own sensors on these spare channels.

Custom Frsky Telemetry Project

If you do intend to have your own sensor data transmitted or you already have another method in mind to display the transmitted data and you're not afraid of some work the Frsky system has many more valid options.

You could always buy the original DJT module (for JR modules like the Turnigy 9x, for futaba choose the DF module instead) and a 2 way receiver  or get the combo pack right away. You're then free to transmit any data you want and use any display available.

I personally would prefer a DJT module (backordered one already) and a gps via sensor hub in the plane. Than I'll add a proper bluetooth connection to my receiver to display everything on my android. This way I can display the data however I prefer. Once I received my DJT module and get something working I'll prepare some information on this blog.

External Links

For those wondering how to replace the existing Turnigy module with a valid JR module.
Some (French, translate if needed with google) information on the Quanum system.
Great (Dutch) project info for custom sensors on the quanum system.
Frsky telemetry hub & sensors topic on rcgroups.
BMP085 barometer sensor information

IR tag RC combat project

Update: All information available at http://redmine.hcpl.be/projects/tag-combat/wiki

One of these projects I always wanted to get started on and it looks like I finally did. Imagine those laser games where you can shoot each other, much like paintball but without the paint and balls (ouch!). Well these systems use lasers or infrared signals. That's what I'm going to make for my RC combat planes to have some fun with friends.

IR is all around us. Best example is the remote control of your tv. In the television an IR receiver is watching for signals at a specific frequency. Using modulation we can send encoded information. The remote control has an IR led that sends the desired command. Remote controls want a wide range so you don't have to really point the remote towards your television.

For our IR tagging combat system we do want a more bundled beam so we can use it like a gun and need to point our airplanes towards each other to register a hit. The signal can have information like who is performing the hit and much more commands. For now we'll keep things simple (KISS).

The idea is to have an arduino with up front an IR led with a lens to bundle the beam. Much like a flashlight works. Those cheap small keychain led flashlights might be a good source for the IR led housing and lens. In the back an IR receiver is watching for incoming hits.



A buzzer can be added to make some noise on impact and on shooting. More important is to have some bright leds we can see from the ground indicating the hits we took so far. For instance 6 red leds that indicate the number of hits taken.

So far nothing too hard to get this working. A good lens and range will probably be the hardest to find out. I already found a tutorial on ibm developerworks for an arduino laser tag game having some nice ideas and working code. You might need to register for a free account in order to view the article. It's 3 parts long, working code example can be downloaded from part 3 resources.

It's inspired by some classic computer game and has some basic rules. Each player has 6 safe shots. If you fire more than 6 times the chance to self destruction increases by each shot. What I don't really need so far is the referee option. In a first iteration of this project I'll bundling all this into an easy to handle brick to add to your plane. I'll probably be using the arduino pro mini to keep things small. I'll be adding a series of leds to indicate the amount of shots taken.

Another iteration of this project could have the throttle channel as input and on impact make throttle stutter or stop for a few seconds. Since we are up in the air we don't want to stop throttle for too long. On heli's and multirotors throttle cut is no option, maybe you could make the craft circle around a few times.

As far as I can see the only commercially available product like this comes from HobbyZone: The sonic combat module HBZ4020. If I don't get any good results with the IR beams I'll be using I might still get one of these and intercept the signal with an arduino. Only the IR part will then be replaced by this system (not sure if it's even IR). The nice thing about making it yourself is off course the fun but also being able to make your own rules. As longs as every player uses the same code and parameters this is a fair game.