Living
Outside
Play
Technology
Workshop
Table of Contents
Control Any Circuit With a TV Remote (and an Arduino) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Step 1: Materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Step 8: Use Your Remote Controlled Switch to Activate Appliances and Other Electronics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
http://www.instructables.com/id/Control-Any-Circuit-With-a-TV-Remote-and-an-Arduin/
Step 1: Materials
Here are the materials and tools that you will need for this project:
Materials:
Arduino Microcontroller
AC Power Adapter For the Arduino
38 kHz Infrared Receiver Module (Radio Shack part# 276-640)
Red LED
Green LED
Momentary Pushbutton Switch
Two 100 ohm Resistors
10 kohm Resistor
Diode
5V Relay or Relay Shield
Printed Circuit Board
Plastic Project Housing
Extension Cord
Tools:
Wire Strippers
Soldering Iron and Solder
Drill and Bit Set
Sharp Knife
Hot Glue Gun
http://www.instructables.com/id/Control-Any-Circuit-With-a-TV-Remote-and-an-Arduin/
http://www.instructables.com/id/Control-Any-Circuit-With-a-TV-Remote-and-an-Arduin/
pinMode(outputPin, OUTPUT);
// initialize the pushbutton pin as an input: pinMode(buttonPin, INPUT);
pinMode(relayPin, OUTPUT);
// initialize the pushbutton pin as an input: pinMode(buttonPin, INPUT);
}
void loop() {
// read the state of the pushbutton value:
buttonState = digitalRead(buttonPin);
// if a signal is detected, store the value
if (irrecv.decode(&results)) {
CurrentValue = (results.value);
// if the recieved value equals the programed value, then toggle the output state
if(CurrentValue == StoredCode) {
outputState = !outputState;
}
// if the record mode is activated store the current value as the programed value
if (RecordState == 1) {
StoredCode = CurrentValue;
RecordState = 0;
digitalWrite(ledPin, LOW);
Serial.println(StoredCode); //displays stored code for reference
}
// Receive the next value
irrecv.resume();
}
else //if no signal is detected, then the current value is 0
{
CurrentValue = 0;
}
// check if the record button is pressed.
// if it is, the buttonState is HIGH:
if (buttonState == HIGH) {
//wait for the button to be released
while (buttonState == HIGH) {
buttonState = digitalRead(buttonPin);
}
//turn on the LED to indicate that record mode is on
digitalWrite(ledPin, HIGH);
RecordState = 1;
}
//set the appropriate output state
if(outputState == 1) {
digitalWrite(outputPin, HIGH);
digitalWrite(relayPin, HIGH);
}
else {
digitalWrite(outputPin, LOW);
digitalWrite(relayPin, LOW);
}
}
http://www.instructables.com/id/Control-Any-Circuit-With-a-TV-Remote-and-an-Arduin/
http://www.instructables.com/id/Control-Any-Circuit-With-a-TV-Remote-and-an-Arduin/
http://www.instructables.com/id/Control-Any-Circuit-With-a-TV-Remote-and-an-Arduin/
Step 8: Use Your Remote Controlled Switch to Activate Appliances and Other Electronics
Plug in the power supply for the Arduino and it will automatically turn on. Then plug the male end of the extension cord into an outlet and plug the device that you want to
control into the female end of the extension cord. The device should turn on.
To program the receiver, press the red button. The red light will turn on. Then point your remote at the receiver and press a button. If the Arduino registered the signal,
then the red light will turn off. Now you can use that button to turn the attached device on and off.
You can use this to remotely control lights, fans or even your coffee maker.
http://www.instructables.com/id/Control-Any-Circuit-With-a-TV-Remote-and-an-Arduin/
Related Instructables
Invisible
Signally Beacon
(Infrared LED
Throwie) by DIY
Hacks and How
Tos
Remote
Controlled
Arduino Infrared Balloon Pop
Remote tutorial Prank by DIY
by astrodan3
Hacks and How
Tos
Remote Kill
Switch by DIY
Hacks and How
Tos
Create External
Buttons For
Your Keyboard
by DIY Hacks
Infrared(IR)
remote operated and How Tos
switch (video) by
buildcircuit
http://www.instructables.com/id/Control-Any-Circuit-With-a-TV-Remote-and-an-Arduin/
Advertisements
Comments
47 comments Add Comment
JasonC2 says:
jorgez661 says:
Here's the schematic I used based on the one included in this guide.
jorgez661 says:
This is the relay I used however you might need a transistor to get it to work
https://www.sparkfun.com/products/100
And pretty much any diode will do, I used this one
https://www.sparkfun.com/products/8589
jorgez661 says:
jorgez661 says:
http://www.instructables.com/id/Control-Any-Circuit-With-a-TV-Remote-and-an-Arduin/
jorgez661 says:
cnguyen37 says:
For some reason, the red LED for me will not turn on when i press the button.
cnguyen37 says:
cnguyen37 says:
Sorry, here's a better picture
http://www.instructables.com/id/Control-Any-Circuit-With-a-TV-Remote-and-an-Arduin/
cnguyen37 says:
jhong2388 says:
Yes. As long as the appliance is rated for less power than the relay is rated for.
jhong2388 says:
does this relay need some circuit boarding or adding diode or somthing?
jhong2388 says:
You can look up the power ratings for each board on the Arduino website
http://arduino.cc/en/Main/arduinoBoardUno
For an UNO it is 40mA per pin
jhong2388 says:
if i add 2 servo for my curtain it is still ok to turn on 24/7
http://www.instructables.com/id/Control-Any-Circuit-With-a-TV-Remote-and-an-Arduin/
As long as you don't exceed the maximum output rating, it should be fine.
jhong2388 says:
Isanch99 says:
Isanch99 says:
I checked that the library was loaded correctly and it still can't verify it
Carlitos317 says:
Check to make sure that the IR remote library is loaded in the libraries directory correctly.
Isanch99 says:
error: 'TKD2' was not declared in this scope It said this when I tried to upload the code to the Arduino? DIY Hacks and How Tos
Isanch99 says:
error: 'TKD2' was not declared in this scope It said this when I tried to upload the code to the Arduino? DIY Hacks and How Tos
stumitch says:
afioramanti says:
awesome, Congrats. The IR need short distance is there a way to try with with ethernet shield?
http://www.instructables.com/id/Control-Any-Circuit-With-a-TV-Remote-and-an-Arduin/
toplak666 says:
Or use one of these: http://www.simerec.com/chips.html Cheaper and easier. No coding required. Still, good project though.
freakyfreak7 says:
This looks like it could be adapted to control an entire room with one arduino.
steinie44 says:
vroom350 says:
chuckvideo says:
danamoose says:
samuraijack says:
awesome.
http://www.instructables.com/id/Control-Any-Circuit-With-a-TV-Remote-and-an-Arduin/
techie54 says:
http://www.instructables.com/id/Control-Any-Circuit-With-a-TV-Remote-and-an-Arduin/