Skip to main content
 

IMG_5711_f56d774392ab68b124a68b69097570db7bd09dcb.jpg

Ever wanted to make things come alive via remote control - similar to a car key fob? The Parallax Key Fob 433MHz Remote Control Development Kit (RS Stock No. 843-0812) is a great way to do it.

Keyfob_and_Board_28dd6dfa8072e1e0b9654c9a9946240a0e410d23.jpg

 

The board requires a 5V input - the fob comes with a pre-installed 12V battery.

The data sheet shows which pins on the board go high when a  key fob button is pressed. 

 

RF_Receiver_Parallax1_9af140b2a06163dcaa2c413188c9f2eca2fb16b2.png

 

Screenshot_2018-12-24_at_19.56_.32__07e98e8e22da24f369e1602e08fbe007d111ccb1.png

If the thing you want to control wants to be on when you press the button (or requires just a pulse input) then the D pin can trigger a transistor and turn your item on (This is described in more detail in the Thingatron article).
 
However, if you want to program your thing to stay on for longer, to switch on and off or to do anything fancy, another microprocessor board, such as the Adafruit Trinket - RS Stock No. (124-5506) can be used.
 
The breadboard circuit below uses an Adaftuit PowerBoost 500 to take a 3.7V input from a LiPo battery (orange wires) and converts it into 5V (red wires) to power the Parallax Remote Control Development Board.
 
As the signal output (white wire) from the Development Board is also 5V, a 5V Trinket is required (rather than the 3.3V version).
 
 
RF_Controller_Sketch_bb1_4e10ccb14c5be66ed8870d90784ef72adf48c93c.jpg
 
When programming the Trinket, it also gets power from the laptop - so a diode is used between the Development Board and the Trinket to prevent current flowing the wrong way.
 
The green PCB terminal blocks are used to make life easier. The positive wire from a LiPo battery is connected in the 3V7 hole, ground in the GND hole. P0 and P1 can be used as the inputs to two Thingatrons and therefore two "things" can be controlled. The Thingatrons also need to be connected to the Ground PCB pin. The Trinket can control more outputs - this example just uses two - the yellow and the blue wires. It could also respond to more inputs - but just the one (white wire) is used in this example.
 

Programming the Trinket

 
The Trinket is a little different from programming other Arduino-style microprocessors - especially the bootloader. Please refer to https://learn.adafruit.com/introducing-trinket/introduction - take note that some computers' USB v3 ports don't recognize the Trinket's bootloader. So use a USB v2 port or a USB hub in between. Also, The Trinket does not appear in the serial ports drop-down - you program it using the USBTinyISP setting.
 

Here's the  code:

--------------------------------------------------------

// react to digital input
// by Andy Stanford-Clark with embellishments by Lucy Rogers

// when INPUT goes high, pulse both OUTPUT0 and Output1 high for 30 sec

#define INPUTA 2
#define Output0 0
#define Output1 1

void setup() {
// put your setup code here, to run once:

//pinMode(INPUT, INPUT);
pinMode(INPUTA, INPUT);
pinMode(Output0, OUTPUT);
pinMode(Output1, OUTPUT);

}

void loop() {


if (digitalRead(INPUTA)) {
digitalWrite(Output0, LOW);
digitalWrite(Output1, LOW);
delay(0.5*1000);
digitalWrite(Output0, HIGH);
digitalWrite(Output1, HIGH);
delay(30*1000);
digitalWrite(Output0, LOW);
digitalWrite(Output1, LOW);
delay(20*1000);
}

--------------------------------------------------------

 
You can change the time period the Things will be on for by changing the "delay(30*1000)".
The initial "delay(0.5*1000)" is to make sure the Thing is off at the beginning.
 
At the end, the "delay(20*1000)" is to ensure there is a 20-second gap before the Things are re-triggered.
 
Once the Breadboard version was working I soldered the whole thing on to veroboard - which has made a robust system which I could insert into any project - such as a Banksy Shredder Frame or a Dragon that breathes smoke (see articles below!).


Articles in this series

  1. How to Remote Control a Thing - make the remote element
  2. Dragon Breath - electronics for the eyes and smoke
  3. Experiments in Casting a Dragon - creating the mould
I am an inventor, engineer, writer and presenter. Other stuff: Royal Academy of Engineering Visiting Professor of Engineering: Creativity and Communication at Brunel University London; Fellow of the Institution of Mechanical Engineers and have a PhD in bubbles; Judge on BBC Robot Wars.
DesignSpark Electrical Logolinkedin