Email Address:

Lost your password?

This is the legacy website; please use the new website.

Circuit Notebook

Interesting circuit ideas which we have checked but not built and tested. Contributions will be paid for at standard rates. All submissions should include full name, address & phone number.

Programmable RF remote timer/switch

Click for larger image

Do you have remotely located devices that you would like to turn on for a time that can be programmed independently for each device, or perhaps just be able to toggle the devices on and off at will? These two circuits do all this with the convenience of a remote control.

The master circuit uses a Mini Maximite as an embedded controller. Communication with the master controller is via a Sony-compatible IR remote control. You can either use a genuine Sony remote or a universal remote programmed with a Sony TV code.

The timing period for up to 10 slaves can be individually programmed from the master which uses a 10-element LED array (LEDs 1-10) to identify which slave (1-10) the master is interacting with at a given time. An additional green LED acts as a “ready” indicator to show that the master is waiting for input.

Programming information from the Sony remote is received by the IR receiver and passed on to pin 8 of the MiniMaximite where it is decoded. The decoding of the Sony remote uses a special technique devised for this purpose. This is the reason for connecting the SOUND output to pin 11. You may wish to refer to the Circuit Notebook pages of the October 2012 issue for more details of this technique.

Once all the necessary information has been received by the MiniMaximite, the appropriate instructions are encoded and sent via its COM2 port to a Dorji RF transceiver.

Click for larger image

Each slave will receive this en­coded information, again via a Dorji transceiver. This information is passed to a PICAXE08M2 microcontroller which checks the transmission for the presence of its own unique identifying code. If the slave detects its own identifying code it will respond by performing the instructions that have been transmitted along with the code.

The slave also sends an acknowledge signal back to the master. If the master does not receive this acknowledge signal it will rapidly flash the LED corresponding to the slave five times. In this way, you will know there is a communication problem between master and slave (perhaps the slave is not turned on etc) and you can take steps to rectify the problem.

According to the instructions received, the slave can turn Q1 on or off via pin 3 of the PICAXE and so relay RLY1 in turn switches mains power to the switched GPO outlet. Switch S1 can be used to turn the slave on or off as required or force its output to turn on.

The code for slave1 needs to be altered for use with other slaves. For slave2, for example, in lines 17, 18, 28, 29, 43, 61 and 69, every occurrence of “A1” needs to change to “A2” and “1” needs to be changed to “2”. A corresponding change is required for all higher numbered slaves. The line numbers referred to above are those which appear on the left of the screen when editing the slave1 program using the Picaxe Programming Editor in “colour syntax” mode.

When the master is first switched on it enters its standby mode, with green LED11 illuminated. LED11 is on whenever the master is waiting for input. The first key press on the Sony remote should be the slave number you wish to program (slave3, say). When this is done, one of LEDs 1-10 will illuminate to indicate a successful transmission. In this example, LED 3 will light and green LED11 will also be lit. (For slave 10 use the “0” button on the remote. This is a quirk of the Sony remote control codes).

The next button to press on the remote is a number from 1-4, indicating what function you want to perform on slave3. Button 1 is for a PROGRAMMED TIMER function, buttons 2 and 3 are simple toggle ON and OFF functions respectively, and button 4 is a CANCEL TIMER function.

Suppose we have selected the programmed timer function by pressing button 1. The LED display will clear and LED11 will be lit, indicating that the master is ready to receive the desired time that we want slave3 to stay on for. The time can now be entered in HHMMSS format. Any time up to 999999 can be entered, so the timer can accurately have ON times for up to 100 hours.

As you do so, LEDs 1-6 of the display will progressively light in confirmation until all six digits have been entered. At this point the timing information is transmitted to slave3 which will immediately apply mains power to its switched GPO for the time interval that has been programmed in. Meanwhile the master will revert to its standby mode, waiting to send programming information to any of the slaves.

If for some reason you do not wish slave3 to continue timing and want to abort the timing process, you would press 3 (to select slave3) followed by 4, the CANCEL TIMER function.

To make slave3 act as a simple toggle switch, press 3 (to select slave3) then press 2. LED3 will light, indicating slave3 is ON and the master then returns to standby. Slave3 will remain on until the button combination of 3 followed by 3 is executed, upon which slave3 will be OFF, LED3 will extinguish, and the master once more reverts to standby.

Note that while in PROGRAMMED TIMER mode the slave is busy keeping a check on elapsed time and so cannot respond to any of the toggle instructions described in the previous paragraph. The only command the slave can respond to in this mode is the CANCEL TIMER instruction.

So you can’t use the toggle OFF function to cancel a PROGRAMMED TIMER condition – instead, you must use the CANCEL TIMER sequence.

Jack Holliday,

Nathan, Qld.

Note: the software, slave1max.bas and switchsc.bas, can be downloaded from the SILICON CHIP website.

Share this Article: 

Privacy Policy  |  Advertise  |  Contact Us

Copyright © 1996-2018 Silicon Chip Publications Pty Ltd All Rights Reserved