REMOTE CONTROLLED LIGHTS
OVERVIEW
Christmas is just around the corner and it’s time to start planning things to lighten up this festive season. Today you are about to see building of Remote controlled lights with adjustable lighting effects using Arduino. The coolest thing about this project is controlling the effects of LED lighting using a typical household Remote and Arduino.
In this project you’ll use an infrared (IR) receiver and an Arduino to control 3 LEDs with a remote control. This is useful to re-use old remote controls or give some functionally to some of your remote’s buttons.
Infrared receiver pins:
First pin: V out
Second pin: GND
Third pin: VCC
DETAILS
The infrared receiver is the component shown in the pic below. This is the TSOP4838, TSOP38238 is a miniaturized IR (infrared) receiver module for infrared remote control systems. It consists of a photo detector PIN diode and a preamplifier assembled on a lead frame. IR filter is placed in the epoxy package.It operates on a supply voltage in the range of 2.5 to 5.5V.
When you press your remote control, it sends infrared modulated signals. These signals contain information that your receiver collects.
COMPONENTS NEEDED;
- Arduino Uno – 1
TSOP38238 – 1
Breadboard -1
LEDs – 1
Jumper Wires
220 ohms Resistor – 3
IR Remote Control – 1
FRITZ
CODE
#include <IRremote.h> int RECV_PIN = 11; //IR Receiver Pin 3 int redPin = 9; IRrecv irrecv(RECV_PIN); decode_results results; void setup() { // put your setup code here, to run once: Serial.begin(9600); //starts serial communication irrecv.enableIRIn(); // Starts the receiver pinMode(redPin, OUTPUT); // sets the digital pin as output } void loop() { // put your main code here, to run repeatedly: if (irrecv.decode(&results)){ long int decCode = results.value; Serial.println(results.value, HEX); switch (results.value){ case 4294967295: //when you press the 1 button digitalWrite(redPin, HIGH); break; delay(100); case 16750695: //when you press the 2 button digitalWrite(redPin, LOW); break; delay(100); } irrecv.resume(); // Receives the next value from the button you press } delay(10); }
CONCLUSION
We hope you enjoyed the tutorial and this little lesson will purport you into great levels. Enjoy yourself in electronics .for more tutorials and questions, please leave your comments in the comment area. See other components on the site www.inventelectronics.com. Inspiring ingenuity.