Radio decoding and attempts at 2-cell radio

OK in the spirit of the web, time to spill the beans on what I've been doing.

Using the GWS
Using the Potensky
Grahams receiver
Adding more channels
Simple servo o/p switch
Elevon mixing
Tools to get started with

Latest

The Potensky is now working successfully in the office plane. and the tiger moth.

Graham Stabler and Dr. Chris and now Michael Henriksen have successfully used the unmodified code with a GWS receiver.

Jochen Bergmeyer has got the code working with the ACT Pico 4uP 35MHz receiver. With his transmitter, Futaba FC-16, he found that the auto throttle detection did not work (possibly the value of MIN_THROTTLE_WIDTH is too large?) The simple solution is to bypass this bit of the code!! I'll work on making this part of the optional.

I believe Koichi Tanaka has also made the code work with his Futaba PCM1024Z and CHALLENGER transmitter but had to play around with MIN_PULSE_WIDTH/MIN_THROTTLE_WIDTH/CENTER_STICK/ACTUAL_CYCLE_TIME.

Infra Red

Several people are looking at using this code to decode and Infra Red modulated signal see http://www.rcgroups.com/forums/showthread.php?s=&threadid=24711 and Koichi Tanaka work at http://www.cityfujisawa.ne.jp/~toko/pic

A word on inversion

I believe inversion may be required for two reasons:

  1. The transmitter send a signal with an inverted mark-space ratio.
  2. The receiver (or I/R decoder) has an inverted output.

If anyone manages to modify the code to automatically detect and apply this inversion I'd really like to know.

Caveats

You may be lucky certain tx/rx combinations just work, other require some playing around. Over summer I will try to collate the input from people who have made the decoder work and update the code, meanwhile please provide feedback.

For people who want to have a go I strongly recommend obtaining some erasable PICs, otherwise it can become expensive.

I have not tried or tested the inverted or 12C509A versions!!!!

The hex files :)

For those who wish to dive straight in, here are links to the compiled hex code (use right hand click, save as).

rxdecode12508a.hex the standard code as I use it for 12C508A

rxdecode12508aInverted.hex the code with the inverted option turned on for 12C508A

rxdecode12509a.hex the standard code as I use it for 12C509A

rxdecode12509aInverted.hex the code with the inverted option turned on for 12C509A

Remember I have never tried it in a 12C509A, I have just run the code through the compiler, if 12C509A does work please let me know!!!

The Principle

The basic idea started with "take a GWS chop bits off and decode the signal yourself".

The result drives one throttle and two 200R coils. For the GWS this can be fitted to the 2-cell combo (http://www.aeronutz.flyer.co.uk) in place of the I/R decoder PIC. Take the signal from the marked point on the GWS. Also works with the Potensky receive (see below).

This decoder is also being tested on Graham's new sub-miniature receiver. This receiver operates on 1-4 cells, has throttle/ESC, plus 2*250ma (depending on no. of cells) coil or MW drive as standard with the ability to add parallel decoder chips for further expansion. One cell operation will be for rubber/glider/co2. Estimated weight less than 1.3g grams. Bandwidth as per jmp/micromag system i.e. a channel spacing either side.

Heres the code rxdecode.c for a 12C508A PIC.

Before you get too excited my knowledge of PIC programming is fairly limited so the code may not be written in the best possible way!

Here are some links for PIC programmer software and hardware and compiler that I am using.

To make an adapter for surface mount PICS you can butcher a standard PLCC adapter by cutting two sides off and then rotating them by 90 degrees and lying them next to each other.

plcc

Back to the GWS. Here's the place to take the signal from.

The modified GWS fitted to by spitfire (OK it didn't fly too well but that's another issue!)

spitfire

The same PIC is a pin for pin replacement for the one on the much lighter Potesnsky receiver. Add a piggy backed FET for the motor o/p. Remove all the servo connections and the angled crystal mount, use the resultant pads to connect the 200R coils. Result 2-cell radio weighing in at 2.8grams including DC-DC, antennae and crystal. Here are a couple of pictures. The Potensky PCB is 23m * 14mm. Note that the Potensky has an on-board 3V regulator. To power coils succesfully lift the 5V pin of the PIC and drive it directly form the dc-dc at 5V, this is not shown in the pictures. Don't forget to feed the 5V into the Potesnkey as well!! (at the pad where you disconnected the servo sockets).


A bit of interference testing with the Potensky!

Heres some starter code for you experimenters - much simpler than the code above since we don't have to keep the PWM channels going all the time. Watch out not all of it is tested!!

Want more channels???

Try this decodesw.c This decodes all 8-channels from either of the above receivers and can be used in parallel with the first PIC. Since its in a 12C508 there are only 5 o/ps so the code as stands drives switch o/ps from channels 5 to 8. o/p on when stick is left of centre otherwise off. PS I've not tested it since I haven't got an 8 channel tx. but hopefully it won't be far wrong

Want some switched o/ps from you servo system?

This one rxswitch.c takes a standard servo channel and produces 5 outputs. O/P 1 is on when the stick is left, O/P 2 is on when the stick is right. O/P 3 toggles each time the stick is left. O/P 4 toggles each time the stick is right finally O/P 5 is on when the stick is in the centered.

Elevon mixing

Last but not least something I did a long time ago mixer.c and must revisit now I know more about 12C508A. This uses 16f84 and provides elevon mixing for a IFO type planes from the elevator/aileron servo o/ps for those of us who don't have computer transmitters.

Contact mailto:AndyBirkettPlanes@gaspode.co.uk