On Off Keying
27MHz RC Car
These cheap RC cars that the Waag Society were using for their autonomous toy car project included chintzy 27 MHz transmitters that had binary speed and direction control. Since we were using an Arduino and motorshield to control the car, the RC parts were surplus I wanted to try to use my new HackRF to decode the protocol.
gnuradio is a "blueprint" based programming environment that takes some getting used to. In this case I followed Great Scott Gadget's On-Off Keying tutorial to configure the radio.
osmocon sourceis the HackRF and is configured with two variables:
samp_rateof 8 MHz is sufficient for the low-bandwidth transmissions and helps avoid crushing the CPU.
tuning_freqis near the desired frequency, but offset slightly to avoid the DC bias
chan_freqvariable is a GUI slider so that I can adjust it on the fly. This allowed me to zero-in the actual frequency, although just getting close is sufficient.
Complex Magwill turn an AM modulated signal into a binary one.
TODO: Document protocol - unitary encoding
- Some number of long start bits, followed by some number of short bits, followed by at least one long bit.
NONE 00000 5 UP 0000000000 10 DOWN 0000000000000000000000000000000000000000 40 LEFT 0000000000000000000000000000000000000000000000000000000000000000 64 RIGHT 0000000000000000000000000000000000000000000000000000000000 58 U+L 0000000000000000000000000000000000 34 U+R 0000000000000000000000000000 28 D+L 0000000000000000000000000000000000000000000000 46 U+R 0000000000000000000000000000000000000000000000000000 52