I was making a home automation project in which I want to control appliances like a fan and a bulb through voice commands with the help of an arduino uno and a relay but I am confused which relay to use. Please tell me the specifications of a 4 channel relay fit for this project.

  • Do you want to control a mains powered fan and light? Please let us know. (For educational experiments something battery powered would be much safer.) – Andy Jun 13 '16 at 10:29
  • 1
    @Andy yes I want to control mains powered fan and light but first I will test the circuit with some leds and a dc motor – Jasmeet singh Jun 13 '16 at 12:42

There are two factors you need to consider when choosing a relay:

  1. Can it power the devices I want it to power without the contacts melting?
  2. Can I control it?

The first one is simple enough. Find out the current requirements for each of the devices and add them together. Make sure that the relay is capable of switching at least that much at the AC voltage of your country's mains supply. If in doubt go slightly higher.

For the second point you need to consider the interfacing circuitry and what DC power supply you are using in your system. For instance, if you have a 12V power supply for the Arduino you might consider a 12V coil relay and use the 12V power as the switching power. If you are running from 9V then you might consider a 5V relay and use the Arduino's regulated 5V pin as the switching power source. Either way you need a driving circuit. That could be as simple as an NPN transistor, two resistors, and a diode (the circuit can be found throughout the web if you Google "Arduino Relay"), or more complex involving an opto-isolator.

The simplest solution is to find an all-in-one module - a relay with driver circuit all as a single product. There are many of these around directly targeted at the Arduino, and most are the slightly more complex (and thus better) opto-isolator driving circuit. You still have to consider the same two points - switching capacity and coil voltage - but you don't then need to worry about making your own driving circuit for them.

  • 1
    Your 2 factors omit the most important issues - is it safe and do I have the knowledge to work with potentially lethal mains power. – Milliways Jun 13 '16 at 10:18
  • 1
    Well, yes there are those factors as well, however Natural Selection is no bad thing... – Majenko Jun 13 '16 at 10:37
  • @Majenko will the power to be supplied to arduino depend on the power requirements of the appliances to be controlled. I guess it would be best if I will be able to control the relay with arduino's 5 V supply. – Jasmeet singh Jun 13 '16 at 13:21
  • @Jasmeetsingh No, the power provided to the Arduino has nothing at all to do with the devices being controlled. – Majenko Jun 13 '16 at 13:23
  • @Majenko So if I use 9 V supply for the arduino is there any chance that the board will malfunction or get hot? – Jasmeet singh Jun 13 '16 at 14:21

In the US there is a set of products - plug-in modules - collectively known as X10, which uses signals sent over the house wiring to control devices elsewhere in the house. If they are available where you are, this is the safest way to control mains-powered devices with an Arduino because the Arduino needs no connection to the house wiring.

The Wireless Transceiver module receive X10 commands over RF and transmit them onto the power wiring. Using this and a small RF transmitter known here as "X10 Firecracker CM17A", your Arduino can be completely isolated from the house wiring, sending its control commands over the air instead. Amazon shows both products on this page; the CM17A (which you use by removing its circuit board from the plastic package), and the RF control module, of which you only need one. The transceiver module can directly control one fan or light; for additional devices you'd use any other, non-RF (read "less expensive") X10 module, which will "hear" whatever the transceiver module sends.

There is an Arduino library already written for X10 communication.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.