loading

Ever dreamt of controlling an appliance like a CFL or a fan at your finger tips and thinking for a cheap solution?

Well, then you are looking at the right instructable!!

This instructable will provide you with a cheap and best possible solution to control your switch operated appliances through an existing IR remote using a simple electronic circuit which uses an Atmega-328 microcontroller.

Step 1: Things you need for this project.

Materials:

  1. An existing IR remote(like TV remote).
  2. Atmega-328p Microcontroller-1
  3. IR Receiver Diode - TSOP38238
  4. 16 MHz crystal,10k ohm resistor and 22Pf Capacitor(2)
  5. 7805 voltage regulator
  6. 5v power supply(use any mobile charger if available)
  7. 4-channel relay board(Number of channel depends on the number of switches to be controlled)
  8. Arduino uno for testing and programming
  9. Some wire to connect to 220v supply

Note:

  1. For this project to be economical make sure to use atleast four switches. An additional switch only adds to a relay in the circuit. Hence more the number of switches less will be the cost per switch.
  2. Use 7805 voltage regulator only if you are using a supply capable of providing a voltage of 7 volts or above. If your supply voltage is anything less than this, it is safe to work without a regulator. Normally a mobile charger will not require a regulator.

Tools:

  1. Bread board
  2. soldering gun
  3. wire strippper

Step 2: Selecting a remote!

Today due to the advancement in technology every home will have atleast one remote.

As mentioned earlier any IR-remote which is available can be used for this project.

To obtain the IR protocol in which the available remote is working we need to have the value of the IR pulses the remote is transmitting for various buttons. In order to obtain the protocol we use Arduino Uno and IR Receiver Diode - TSOP38238 to decode the pulses emitted by the remote.

Connect the circuit as per the diagram above for IR circuit.

Note down the pulse values emitted by the buttons which you wish to use.

The firmware required for the above process is shared as IR Receive.

For more information about IR Remote and its protocols visit this link.

Step 3: Connections and testing.

Once you are done with decoding of the pulses of the buttons of the remote its time to connect the actual circuit on a bread board.

For the purpose of testing rig up the same circuit which is used to decode the remote pulses and just include as many LEDs for the number of buttons you are planning to use.

The connections of LEDs to various pins depends on your choice, but make sure to change the pin numbers in the code according to your connections.

The code provided here is for 4 devices or LEDs. To add more just just replicate "cases" in the code.

For more information on the shared code visit this link.

Once done with the connections upload the code shared below.

After uploading the code you must be capable of controlling a particular LED from a particular button on your remote.

If you are familiar with the Relays then skip to step 5 to prepare your permanent board else follow the next step to learn how to connect a relay between a microcontroller and a switch of an appliance which you wish to control.

Step 4: Working with Relay!!!

Relay as the name defines itself "receive and pass on", an electrical device, typically incorporating an electromagnet, which is activated by a current or signal in one circuit to open or close another circuit.

A relay is an electrically operated switch. Many relays use an electromagnet to mechanically operate a switch, but other operating principles are also used, such as solid-state relays.

Relays are used where it is necessary to control a circuit by a low-power signal (with complete electrical isolation between control and controlled circuits).

For more information about Relays check out this link.

In our case here the low-power signal is the output signal(typically 5 volts) from the microcontroller which is used to control the switch which is operating at 220 volts AC.

A typical 5v/220v relay consists of an input terminal to which the input from the microcontroller is to be given and an output terminal to which the device which has to be controlled is connected.

There are two ways in which a relay's output terminal can be connected to a switch

1. Connecting Relay in parallel to a switch.

This is done by connecting the NO(normally open) and Common terminals of the relay to the two terminals of the switch. This type of connection ensures that the switch can be operated independently by either of two ways, i.e either manually or through the remote.

This provides an advantage that the switch can be operated manually even when the circuit is not working.

2. Connecting Relay in series with the switch.

This is done by connecting the NO(normally open) terminal to device and common to one terminal of the switch and other terminal of switch to the supply. This type of connection ensures that the switch is high only when it is both manually switched on and also through the remote.

Step 5: Perfboard implementation..

When you are satisfied about the circuit and feel everything is working fine, its time to move on for further steps in implementing the circuit.

Solder the microcontroller circuit on a suitable sized perfboard according the circuit diagram.

Always use IC bases for mounting ICs instead of directly soldering them so as to avoid burning the IC while soldering or to have an option of upgrading the code in future.

Connect all the external circuits to the microcontroller like relay and supply circuit.

Step 6: Final step!!

Be very careful working with high voltages!!!

Make sure to turn off the main circuit breaker in your home before opening the circuit panel.

Check if there is ample space available inside the circuit box to place your circuit. If the space is ample enough then make the necessary connections to your circuit and place your circuit and leave just the IR sensor out of the panel.

If the space inside the box is not enough then make a suitable enclosure made of either plastic or wood and place the box outside the panel.

Make sure the sensor is not masked and is clearly visible and do not place the sensor beyond 10 meters from the operating range.

Enjoy controlling the appliances at your finger tips:)!!!!

Suggestions and comments are always welcome:)

Thank you for reading this instructable!!!

please! can you send me circuit daigram and programing code of the project..<br><br>aflatunkawser01750@gmail.com
<p>I made it</p><p><a href="http://www.instructables.com/id/Switching-Appliances-Using-Ir-Remote/" rel="nofollow">http://www.instructables.com/id/Switching-Applianc...</a></p>
hey thats a tata sky remote, do u have the ir codes of the remote. i want to make a arduino universal remote but after decoding the remote I'm not getting the right codes. and its showing Unknown codes and that codes are not working. will you help me in this.
<p>Hi,</p><p>Do you need the codes for all the buttons of that remote or just some?</p><p>The decoding is pretty easy but I think there is some error in IR receiver connection. Check the pin out of the particular TSOP receiver you are using.</p>
<p>Hi Sriram,</p><p>I wish to control only one lamp (max 100W). The other requirement would be to ensure very long life (10 or more years). Can you provide a circuit for that? I am assuming the relays would be solid state (I'm an electronics noob, so don't really know much). Since it is just one switch, there would be no need to decode the pulses, right?</p><p>Thanks.</p>
<p>Hi,</p><p>The circuit remains the same for one lamp of 100w rating. To increase the life you can use a Triac which will not have any mechanical parts in it. For triac connections just google it. BT136 triac would work fine for your application.</p><p>No decoding would be needed for a single lamp but it is better to code the IR signals just to make sure it does not trigger from false signals.</p>
Can i control 7 appliances through it
<p>Hi,</p><p>Yes you can control 7 appliances through it. For that you must need a 7 channel relay and replicate the Cases in the code for the number of pins you defined.</p><p>For circuit diagram refer this link <a href="https://www.arduino.cc/en/Main/Standalone" rel="nofollow">https://www.arduino.cc/en/Main/Standalone</a></p><p>Connect the IR receiver's OUT pin to arduino's 11th pin.</p>
Sir the link u send me says doesn't exist please send u diagram . Sir i only want to know to which pin crystal is connected to ic without use of arduino board.<br>Thanks
<p>Actually the link is working fine for me. Check once more else google arduino on bread board else refer to this image</p>
I only want to know where crystal can be connected without the use of arduino board
Nice project! Good job done.
<p>Thank you!!</p>
it would be nice to be able to turn off the appliance via the remote after it has been turned on manually by the switch.<br><br>if you put the switch on the low voltage side of the relay and put it's output through a logic gate or 2 along with the output of the microcontroller you'd be able to do that.<br><br>Or you could use the uControler to watch the status of the switch (also on the low voltage side of the relay) and if it changes it'll turn the appliance on/off. This way, you could also turn on or off with the remote, and simpler than using external logic chips. You might need more pins depending on the number of appliances, but you could use an I2c or SPI port extender for that.<br><br>Nice work otherwise.
<p>Hi <a href="http://www.instructables.com/member/memjr73/" rel="nofollow">memjr73</a>,</p><p>Thank you for the suggestion.</p><p>I'l sure work on that and update it soon.</p>

About This Instructable

6,120views

66favorites

License:

More by Sriram H V:Remote controlled switch using Atmega 328p Digital Wall clock Using Atmega-8 and RTC 
Add instructable to: