Monday, January 21, 2013

Hacking a Cheap HobbyKing 6 Channel Receiver - Summed Signals

RC Hobby Receivers

Any standard modern hobby RC receiver works the same way. The position of joysticks is converted to a digital value, which is then encoded, modulated, and broadcast on some radio frequency. On the other end, a receiver demodulates and decodes the values, converts them to PWM (Pulse Width Modulation), and outputs each of the PWM signals on a separate output pin. Typically, you would plug in a servo or motor controller to each output.

The signal on each output looks like the following picture

And now let us zoom in on one of those pulses

The value of the PWM is the width of the pulse. Standard hobby electronics have a pulse width between 1000us and 2000us, or between 1ms and 2ms. A pulse of 1000us is equivalent to 0% and a pulse of 2000us equals 100%. In the picture above, you can see that the pulse is about 1.46ms wide, which translates to just under 50%, or the joystick is centered. There is no official standard for the time between pulses, but typically a pulse occurs around every 20ms for use with average analog servos.

The Problem

Often in robotics or, for example, fancy multirotor aircraft, there may be addition smarts on the vehicle that needs to do additional computation on the inputs. RC radio transmitters are great. They usually have 2 nice joysticks, a miriad of switches, excellent range, and input trimming built right in. It would be expensive and time consuming to build a remote control for your vehicle that matches the capabilities (such as range and features) of a cheap hobby remote control.

Unfortunately, to communicate the PWM signals from the receiver to the autopilot or cpu of your robot, 6 channels would require 6 inputs on your processor in addition to numerous wires from your receiver to controller. Conveniently, a number of receivers can be hacked to output a sum, or the combined PWM signal of all the channels on a single output. None are as cheap and as easy to hack as the Hobby King 2.4Ghz Receiver 6Ch V2

6 Output Signals on a Single Output Pin

Guess what? Whoever designed the HobbyKing 6 Channel Receiver did something very nice. The 7th output pin block (marked in the picture as 'BAT') is usually reserved for the battery connector or for the binding cord. On the HK 6 channel receiver, the 'BAT' signal actually outputs the combined signal of all the other 6th outputs. Just to verify, I hooked up the receiver to an o-scope and checked the signal. Below is a screen capture.

Here you can see that there are 6 distinct pulses from 3.3V to 0V, separated by 400us periods where the signal is low (0V). You can see in the screenshot that the 3rd channel or pulse, which on a typical airplane configuration is the throttle, is shorter than the others. Normally the throttle stays in the 'off' position or 0%, which is represented by a 1000us pulse, opposed to the other 5 signals that by default are at 50% or around a 1500us pulse. I can't wait to actually utilize this in my autopilot.

Compatible Transmitters

If you want a cheap control system for your robot/uav/fancy experimental aircraft, you can pick up one of these receivers and any of the following compatible transmitters from anywhere between $25-$60. Lowest cost for the features.

No comments:

Post a Comment

Youtube Channel

Loading...