Arduino-Radio Controlled Hydrogen Blimp


Step 2: How it works: Transmitter

Picture of How it works: Transmitter
 The transmitter Arduino reads voltage levels from the three potentiometers on the controller levels, divides them by the reference voltage (5V), and comes out with an 8-bit value (for example, if the potentiometer is turned exactly halfway, it will return 128, because 128/256 = 1/2). A one - byte value is 8 bits, or 8 places in base two. The transmitter takes the potentiometer value and sends it the radio module, one byte every 0.5 ms ( the radio's max transmission rate is 2000 bps). For example, if the value is 200, the Arduino would pulse:

1 1 0 0     1 0 0 0

Where a 1 is "high" on the TX data line for 0.5ms, and 0 is "low" on the line for 0.5ms. Before it sends this, though, the radio transmits a 'start code':

1 0 1 0     0 1 0 1

This is what the Arduino on the other side is "looking for" -- it needs to see this value before it starts recording data packets, or else it might start recording in the middle of a packet and then everything would get thrown off. So, this is one complete data packet that the ground Arduino transmits ( it sends them out once every 10ms) :

[ start code ] [ motor #1 byte ]  *   [ motor #2 byte ]  *  [ servo byte]  *

The * indicates a HIGH pulse for 0.5 ms -- these are needed because the radio gets a lot of interference if you leave it sitting LOW to long.

You can see the levers and connectors leading to the Arduino and radio in the picture.
Remove these adsRemove these ads by Signing Up