Custom Search

Easy Mains Control

Controlling mains powered devices using home built circuits risks exposing those circuits and the operator to mains voltages.  This risk can be completely avoided by adapting one of the many Remote Mains Control Devices.

A Wireless Mains Controler

A Wireless Mains Controler

These are available quite cheaply now (more are sold as people go green and use them to turn off DVD and HIFI equipment).

The Remote Mains Control set I am using was bought  from the local DIY shop.

Each controller can switch up to three items on or off and a selector on the back allows one of four channels to be selected.

By interfacing this controller to a router or  processor such as the 16F876, it is will form the basis for an automated Home Control System able  to turn on or off,  up to 12 mains driven devices under program control.

The Buttons are a variation of a calculator style key pad.

Instead of the usual two contacts, each button has three contacts.  A 0v line, an On/Off selector and a Device line.

Emulating these buttons with our electronics is simply a case of picking up the On/Off common and the Device line and using a transistor and a couple of diodes, pulling the required pair down to 0v for a few seconds when needed.

Wires link the control PCB to a Solderless Breadboard

Wires link the control PCB to a Solderless Breadboard

Here, the PCB is shown with lines from the button contacts taken to a pin header that can be plugged into a Solderless breadboard.

The reverse of the PCB contains the six contacts for the Keypad.

In this experiment, only the first device in Chanel A is going to be switched.

A wire link is used to bridge the rotary A/B/C/D channel selector (A to 0v).

Connections for 0v, 12v (Battery), On, Off and Switch #1 are taken to the pin header.

If enough lines are available on the processor, a diode (or even a direct link to the I/O pin) may be all that is needed.  If I/O lines are scarce, then a transistor and a couple of diodes may be employed to give two active high lines (one for Off, One for On)

The Interface Circuit

(for 2 line control of one of the switches)

     Switch #1------|>|---:
                          :
     On #     ------|>|---:
                          :
                        C \ |   (BC547 NPN)
                           \|
                            |-------|R 10K|-----< Switch ON Pulse
                           /|   B                 High To Activate
                        E / |
                          :
                          :
                      ====+==== 0v

Repeat using  'Switch #1' and 'Off #' for the 'Off' Line

You may need to experiment with the value of the base resistors and (if your cpu does not pull completely to 0v), add pull down resistors between the base of the transistors and 0v.

Tags: ,

One Response to “Easy Mains Control”

  1. Easy Mains Control | Today's Bargain Electronics Store Says:

    [...] more: Easy Mains Control 16f876a, blassic, computing, control, eeepc, electronics, i2c, mains-control, midge, pic-16f876a, [...]

Leave a Reply


Powered by WebRing.