Remote control

We use the IRLib library to decode the signal from the infrared detector. This library supports many of the common TV remote controls. Use the included example sketch IRecvDump to see if your remote is supported. On the serial monitor you should see something like “Decoded NEC(1): Value:FD808F (32 bits)”. If you have a supported remote control, skip to the “Movements” section further down this page.

In our case, we had to add support for our SilverLit remote control.

SilverLit RC

The SilverLit Remote Control vehicle protocol is meant to the SilverLit RC set that was sold through Costco and included a dump truck, flatbed, bulldozer or crane. We reuse this remote control to direct the movements of the Droid robot.

The protocol was undocumented, and I reverse engineered it. Turns out that the remote control first transmits a header burst of 38 kHz infrared light. The bits are then transferred as short or longer period with no IR light (space) followed by short burst of IR light (mark).

header 1.778 msec mark
13 bits data bits
1 bit stop bit

The bits are encoded as shown below.

bit value encoding
“0” 0,400 msec space, followed by 0.722 msec mark
“1” 1.037 msec space, followed by 0.722 msec mark

The data bits are shown in the table below.

bit(s) meaning
[12:11] vehicle identifier (00=dumptruck, 01=flatbed, 10=bulldozer, 11=crane)
[10:9] no special meaning. 11 when bit[7] is 0, otherwise 00
[8] 0 for backward
[7] 0 for forward
[6] 1 for right
[5] 1 for left
[4] 1 for down
[3] 1 for up
[2] 1 for light on
[1:0] checksum (see below)

The CRC is calculated as follows

checksum = bit[11:12] ^ bit[10] ^ bit[9:8] ^ bit[7:6] ^bit[5:4] ^ bit[3:2]

We forked Chris Young’s IRLib, to add support for SilverLit remote vehicle/car protocol. My version of the library is available on GitHub.


2BD: describe how instructions trigger movements

Continue reading about the Making it dance.

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.