Introduction: Arduino Remote Control Less $10
Guide to use your arduino as a remote control with Easy Remote app.
Materials
Arduino nano or any Arduino. on ebay staring $2.58
Infrared led 940nm ebay 10 x.99 cent
Bluettoth module JY-MCU HC06 ebay $1.99
Infrared Reciver 2x $1.99
Free =Easy Remote app here
Free = Arduino – Software here
Multi-Protocol Infrared Remote Library for the Arduino and Easy Remote app here
***Download and rename to IRRemote and extract to
Local disk (c) ---- Program Files ---- Arduino --- Libraries***
*** Before you try connect Easy Remote with arduino Bluetooth , you need pair with***
Step 1: How to Decode Ir Signal
Used this Step for Nec,Sony,Samsung, RC5, RC6, PANASONIC, Jvc Protocols.
Image (1) Prepare the arduino to decode ir signal.
Image(2) Upload Easy Decode sketch to arduino.
Image(3) when the sketch uploading is complete, open the serial monitor.
Image(4) With serial monitor open, point to arduino the remote control that will be decoded. Press the key that will be decoded. Example: Power
(appear the code of the key pressed on serial monitor)
Decoded NEC: FFA35C (32 bits)
Copy the code and repeat the same procedure for each key you want to decode.
Step 2: How to Decode Ir Signal (Raw).
Same procedure used in nec, sony ect .. just that here we use the sketch vessels which are in RawCodeDecode
Image 1
With serial monitor open, point to arduino the remote control that will be decoded. Press the key that will be decoded. Example: Power
(appear the code of the key pressed on serial monitor)
For Arduino sketch: unsigned int raw1[68] = {9050,4350,650,450,650,500,650,450,650,500,650,450,650,500,600,500,650,450,650,1600,650,1600,600,1600,700,1550,650,1600,600,1650,650,1550,700,1600,600,1600,650,500,600,1600,650,500,600,500,650,450,650,1600,650,1600,600,500,650,1600,650,450,650,1600,650,1600,650,1600,650,450,650,500,600,};
irsend.sendRaw(raw1,68,38);
Image 2
When finished decode your remote will have a list of Codes which we use in Sketch.
Upload Easy Send Raw sketch to arduino and edit.
On red line of picture you put your Raw code
unsigned int raw1[68] = {9050,4350,650,450,650,500,650,450,650,500,650,450,650,500,600,500,650,450,650,1600,650,1600,600,1600,700,1550,650,1600,600,1650,650,1550,700,1600,600,1600,650,500,600,1600,650,500,600,500,650,450,650,1600,650,1600,600,500,650,1600,650,450,650,1600,650,1600,650,1600,650,450,650,500,600,};
next on line blue your put line to send
irsend.sendRaw(raw1,68,38);
Image 3
You can add lines you want in the sketch .
Example:
if (Serial.read() != -1) {
for (int i = 0; i < 3; i++) {
irsend.sendRaw(raw1,68,38);
)
if (Serial.read() != -2) {
for (int i = 0; i < 3; i++) {
irsend.sendRaw(raw2,68,38);
)
if (Serial.read() != -3) {
for (int i = 0; i < 3; i++) {
irsend.sendRaw(raw3,68,38);
If you add more than one line you must add the unigned int to the top of the sketch, which is equal to the send line.
Example of sketch finished (its only for ilustration this sketch no work)
#include
IRsend irsend;
//here put your raw code//
unsigned int raw1[68] = {4600,4350,700,1500,700,1500,700,1500,700,400,700,350,700,350,750,350,700,350,750,1450,700,1550,650,1500,750,350,700,350,750,350,650,400,700,350,700,400,650,1550,700,350,700,350,700,400,700,350,700,350,700,400,700,1500,650,400,700,1550,650,1500,750,1500,650,1550,750,1450,700,1550,650,};
unsigned int raw2[68] = {4600,4350,700,1500,700,1500,700,1500,700,400,700,350,700,350,750,350,700,350,750,1450,700,1550,650,1500,750,350,700,350,750,350,650,400,700,350,700,400,650,1550,700,350,700,350,700,400,700,350,700,350,700,400,700,1500,650,400,700,1550,650,1500,750,1500,650,1550,750,1450,700,1550,650,};
void setup()
{
Serial.begin(9600);
}
void loop() {
if (Serial.read() != -1) {
for (int i = 0; i < 3; i++) {
irsend.sendRaw(raw1,68,38);
delay(40);
}
if (Serial.read() != -2) {
for (int i = 0; i < 3; i++) {
irsend.sendRaw(raw2,68,38);
delay(40);
}
}
}
Now arduino with this sketch read any number ,from Easy Remote app
procees and send
For #1 send unsigned int raw1 ,For #2 send unsigned int raw2
Step 3: How to Prepare the Arduino to Send Ir Signal
Bluetooth Vcc to 5v Arduino
Bluetooth GND to GND Arduino
Bluetooth TXDto RXD Arduino
Bluetooth RXD to TXD Arduino
Led Leg Positive + to Pin 3 Arduino
Led Leg Ground to GND Arduino
To send signal:
NEC,Sony,Samsung ect... uses EasySender sketch
Send Raw uses EasySendRaw sketch
Step 4: How to Used Easy App on Tvs Mode
** Before you try connect Easy Remote with arduino Bluetooth , you need pair with***
Next :
Now select the brand of tv from list and enjoy :)
Done
Step 5: How to Used Easy App With Custom Code
When finished decode your remote will have a list of Codes which we use in Easy Remote App.
Example:
Decoded NEC: FFA35C (32 bits)Power
Decoded NEC: FF00C (32 bits) Input
Decoded NEC: FF88C (32 bits)Vol+
Step1
Easy Remote and go to Custom Remote Control , and choose option.
step 2
Its ready now connect to arduino with Bluetooth + ir led.
Step 6: How to Used Easy App With Raw Code
Its same process of custom remote , the only change is you can only change name of button from empty to you wich want.
Long Click To Change RawCode To you wich want.
Press Save button
Have 17 button to config
Each button send # to arduino .
Ex; when you press button #1 the app send 1 to arduino.
If you press button 17 the app send #17 to arduino ect ect..
Step 7: Another Thnig With Easy Remote
Easy Remote controller Relays
Easy way to controller relays with Easy Remote and simple sketch.
Easy Remote +Arduino+Relays+Bluetooth
on app I used Raw Code Layout Button 1 =off, Buton 2 = on
sketch.Here
/*
simple relay on/off
*/
char val; // variable to receive data from the serial port
int ledpin = 2; // relay connected to pin 2
void setup()
{
pinMode(ledpin = 2, OUTPUT); // pin 2 as OUTPUT
Serial.begin(9600); // start serial communication at 9600bps
}
void loop()
{
if( Serial.available() ) // if data is available to read
{
;
}
val = Serial.read(); // read it and store it in 'val'
if( val == '1' ) // if '1' was received led 2 is switched off
{
digitalWrite(ledpin = 2, LOW); // turn Off pin 2
}
if( val == '2' ) // if '2' was received led 2 on
{
digitalWrite(ledpin = 2, HIGH); // turn ON pin 2
}
}