Home Price List Order Info P955H Course PIR & RF Data Mini Course

Radio Controlled House Lights
PIC Training Course 2nd Edition

For electronic enthusiasts with some PIC experience

We are now .COM

Click: www.brunningsoftware.com to go to our new website.

In this course we work through the complete development cycle
We learn to programme a PIC to create radio frequency serial data, to receive RF data and use a triac to switch a mains voltage house light. We optimise the light switching sequence with three time zones to give realistic appearance of someone at home. Then we programme a PC using Visual C# to send serial data to the transmitter module to set up the real time clock and time zones.

The hardware required to remotely switch house lights is shown in the picture. At the top left is the radio frequency data transmitter. At the bottom right is one of the three radio frequency data receiver circuits. We have designed the receiver circuit so it fits into the readily available remote control circular lamp base which is in the picture.

The transmitter circuit uses its PIC to generate a sequence of serial data which carries instructions to the receivers using the radio frequency transmitter. The three receivers all receive the data and each uses its PIC to extract the header and the data. If the header is correct all three receiver circuits take appropriate action.

This course can be bought as a kit or fully built and tested. The kit is 4 PCB and 4 sets of components. A cut and drilled transmitter box, a CD of software and a 100 page manual are supplied. You will also need a PIC programmer. A Brunning Software P205 or P955 is ideal. A PICkit3 or 4 can be used with an adaptor if you know how to use MPLAB-X.

This picture shows the data transmitter circuit. This can be programmed by plugging it onto a P205 or P955 programmer. It has sockets to fit a simple 433Mhz transmitter and a 2.4Ghz transceiver. The 2.4Ghz transceiver is not used for this course.

The 433Mhz transmitter plugs into the 3 pin horizontal socket in the middle of the PCB. The LCD plugs into the 6 way and 4 way sockets at the back of the PCB.

The transmitter will usually be powered by plugging a 4 cell battery pack or a 5 volt power supply into the DC input socket on the side of the module.
This shows the back view of the finished transmitter module. The push buttons are on the left of the picture and the ON/OFF switches on the right. The power ON/OFF is nearest the corner. The backup battery switch is nearest the middle. The onboard PIC can be programmed without taking the lid off by plugging a P205 or P955 into the 7 pin socket.
When both slide switches are ON the onboard backup battery is trickle charged by the input voltage. When both slide switches are OFF the onboard battery is fast charged if the input voltage is connected. This allows the backup battery can be charged without needing the light switching system to be turned on.
The receiver circuit (in this picture) has provision to fit a simple 433Mhz receiver. The 433Mhz receiver passes all received data directly to the serial input of the PIC which continually tests the data. When the sequence of bytes forms the correct header address the PIC writes the next received byte to port C. The lowest 4 bits of port C connect to one side of a 4x4 socket. The 4 sockets on the other side are all connected to the gate pin of a one amp triac. Each receiver has one wire link fitted in the 4x4 socket so that each receiver connects a different pin of port C to the triac gate.

This system allows the 3 receivers to be built and programmed exactly the same. The position of the wire link determines whether the receiver switches the lounge, hall or bathroom light.
LED lights are very efficient but all the generated heat goes into the base of the bulb. We recommend using an LED bulb no more than 12 watts. VTAC have ideal high efficiency bulbs of 6.5, 8.5 and 12 watts. (Equivalent to 60, 75 and 100 watt tungsten bulbs).

The receiver circuit can be plugged directly onto a P205 or P955 for programming when it is out of the box. When it is fitted in the circular box the circular box must be unscrewed from the celling fitting. Then remove the lid and connect the programmer using a short 7 pin lead. The circuit must be powered by the programmer during the write sequence.

If you buy the receivers built, tested and fitted in circular boxes they are supplied programmed and ready to use. In this case you have no reason to open the circulat boxes.
Warning..... The receiver circuits take their low voltage power directly from the mains supply using a high voltage capacitor, rectifying diodes and zener diode to drop the voltage from 220v ac to 10 volts dc. The low voltage supply is not isolated from the mains. If you do not have experience working with live mains you must buy the part built or fully built option. With these options the receiver circuits are supplied built, tested, programmed and assembled in the circular lamp bases. If you buy the receivers ready to use you should read chapters 4, 6 and 7 but do not open the circular boxes as you have no need to test or programme the receivers.
The Training Sequence

Chapter 1 starts with a brief introduction to the ideas which inspired this short training course. Chapter 2 is a summary of the most straightforward PICs to use for new designs. We have chosen the best modern PICs for programming with assembler.

In chapter 3 we study the different arangements of triacs. We learn when to connect the triac directly to a PIC output and when to isolate the PIC using an opto trias, and we learn when to use a snubber circuit. In chapter 4 we learn about the fundamentals of radio frequency data transmission.
The receiver software is straightforward once the principles of radio data has been understood. The receiver PICs serial input is connected directly to the radio frequency receiver. Each time a byte is received the stream of data is compared to the header address. If it matches we have valid data.

The transmitter software is much more complex because this controls when and how the house lights are switched. Chapters 6 to 12 work through the software development for the transmitter. We use library routines for the Real Time Clock, create a time zone system to make the light switching as realistic as possible, use a charge pump voltage doubler and include a backup battery which can run the system for several days.

In the last two chapters we experiment with sending serial data from a PC as a convenient way to update the real time clock and the zone times. In chapter 13 we write the programme for the PC using Visual C#, and in chapter 14 we update the transmitter software to receive the data. We provide a serial data routine which can be used if you prefer not to create your own routine for the PC.
Price list
Radio Controlled House Lights

Option 1 (kit):
Transmitter kit & 3 receiver kits

Book: Experimenting with RC House Lights.... £15

1 off transmitter PCB with PIC18LF26K22 fitted
1 off set of components for transmitter PCB
1 off 2 line x 16 character LCD
1 off 4 cell battery holder
1 off plug in battery lead
1 off simple 433Mhz transmitter module... £24

1 off cut and drilled box for transmitter circuit... £6

3 off receiver PCB
3 off set of components for receiver PCB
3 off simple 433Mhz receiver module............. £19

1 off BSPWA PIC assembler with RF library on CD.. £4.
1 off 1st class postage to UK....... £5

All the items listed above
Total price....... £67
Book + transmitter kit + 3 receiver kits + CD + postage

3 lamp bases, 3 B22 to E27 adaptors, and 3 mains bulbs
are not supplied. Instructions for buying these are in the book.

IF YOU WISH TO PURCHASE THIS OPTION
You MUST have experience of building circuits which connect to live mains.

Option 1B (kit):
Transmitter kit, 3 receiver kits
with 3 bases & 3 adaptors

This is the same as option 1 but
the lamp bases and adaptors are supplied.
You do not need to order any items from China.

Total price....... £83
Book + transmitter kit + 3 receiver kits + CD + postage
3 lamp bases and 3 B22 to E27 adaptors are supplied.

3 mains bulbs are not supplied.
Instructions for buying these are in the book.

IF YOU WISH TO PURCHASE THIS OPTION
You MUST have experience of building circuits which connect to live mains.

Option 2 (part built):
Transmitter kit & 3 built and tested receivers

Book: Experimenting with RC House Lights.... £15

1 off transmitter PCB with PIC18LF26K22 fitted
1 off set of components for transmitter PCB
1 off 2 line x 16 character LCD
1 off 4 cell battery holder
1 off plug in battery lead
1 off simple 433Mhz transmitter module... £24

1 off cut and drilled box for transmitter circuit... £6

3 off built and tested receiver circuit
      each installed in a circular lamp base
      each with a 433Mhz RX module........... £58

1 off BSPWA PIC assembler with RF library on CD... £4
1 off 1st class postage to UK..... £5

Total price....... £99

Book + transmitter kit + CD + postage
+ 3 receivers built and tested.

3 lamp bases and 3 adaptors are supplied.

3 mains bulbs are not supplied.
Instructions for buying these are in the book.
Option 3 (fully built):
All circuits built, tested and ready to use

Book: Experimenting with RC House Lights.... £15

1 off built and tested transmitter circuit mounted in box
      with LCD and 433Mhz Tx module.
1 off 4 cell battery holder
1 off plug in battery lead.................. £40

3 off built and tested receiver circuit
      each installed in a circular lamp base
      each with a 433Mhz RX module........... £58

1 off BSPWA PIC assembler with RF library on CD... £4
1 off 1st class postage to UK.......... £5

Total price....... £115

Book + transmitter + 3 off receivers + CD + postage
Supplied built, tested and ready to use.

3 lamp bases and 3 adaptors are supplied.

3 mains bulbs are not supplied.
Instructions for buying these are in the book.

Home Price List Order Info P955H Course PIR & RF Data Mini Course