Low Cost IR Decoder

Its just a IR Decoder that can decode the HEXADECIMAL IR signals from the TV remote for further use. like programming any TV remote etc.
Its made with Freeduino (not Arduino). Freeduino is a arduino compatible low cost micro controller. You can program using Arduino IDE (just like coding for Arduino UNO). Its based ob Atmega 328 chip.
Items Used:






1. Freeduino Board (Any arduino board can do the work as well)
2. 16/2 LCD (Blue)
3. Jumper Cables
4. Female Header Pins.
5. IR Remote (For Testing)
6. Soldering Machine
7. An old CD/DVD to mount on.
Connecting Headers to LCD


Solder your female header in the uper side on the LCD panel so that mounting on a CD will be easier.
Connecting the LCD to Arduino



First of all..
Shot the following Terminals:
Vcc with Led +
Gnd with Led -
Vcc with R/W
42 ohm resister between Vee and DB4
(I have used the resistor instead of connecting a potentiometer. That will help in reducing the cable connection and reduce the cost but the LCD will bw glowing at full brightness..!!)
Connecting the Jumper Cables:
Arduino > LCD
5v > Vcc
Gnd > Gnd,R/W
Pin 7 > RS
Pin 6 > EN
Pin 5 > DB4
Pin 4 > DB5
Pin 3 > DB6
Pin 2 > DB7
Connecting an IR Receiver



Connect the IR:
Vss to Pin 13
Gnd to Cnd (Arduino)
OUT to Pin 11
Coding:
#include<LiquidCrystal.h>
#include<IRremote.h>
LiquidCrystal lcd(7,6, 5, 4, 3, 2);
int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup()
{ Serial.begin(9600); pinMode(13,OUTPUT); digitalWrite(13,1); lcd.begin(16, 2); irrecv.enableIRIn(); // Start the receiver } // Dumps out the decode_results structure. // Call this after IRrecv::decode() // void * to work around compiler issue //void dump(void *v) { // decode_results *results = (decode_results *)v void dump(decode_results *results) { lcd.setCursor(0, 0); int count = results->rawlen; if (results->decode_type == UNKNOWN) { Serial.print("Unknown encoding: "); lcd.print("Unknown encoding: "); } else if (results->decode_type == NEC) { Serial.print("Decoded NEC: "); lcd.print("Decoded NEC: "); } else if (results->decode_type == SONY) { Serial.print("Decoded SONY: "); lcd.print("Decoded SONY: "); } else if (results->decode_type == RC5) { Serial.print("Decoded RC5: "); lcd.print("Decoded RC5: "); } else if (results->decode_type == RC6) { Serial.print("Decoded RC6: "); lcd.print("Decoded RC6: "); } else if (results->decode_type == PANASONIC) { Serial.print("Decoded PANASONIC - Address: "); Serial.print(results->panasonicAddress,HEX); Serial.print(" Value: "); } else if (results->decode_type == LG) { Serial.print("Decoded LG: "); lcd.print("Decoded LG: "); } else if (results->decode_type == JVC) { Serial.print("Decoded JVC: "); lcd.print("Decoded JVC: "); } lcd.setCursor(0, 1); Serial.print(results->value, HEX); lcd.print(results->value, HEX); Serial.print(" ("); Serial.print(results->bits, DEC); Serial.println(" bits)"); Serial.print("Raw ("); Serial.print(count, DEC); Serial.print("): ");for (int i = 0; i < count; i++) { if ((i % 2) == 1) { Serial.print(results->rawbuf[i]*USECPERTICK, DEC); } else { Serial.print(-(int)results->rawbuf[i]*USECPERTICK, DEC); } Serial.print(" "); } Serial.println(""); }
void loop() { if (irrecv.decode(&results)) { Serial.println(results.value, HEX); dump(&results); irrecv.resume(); // Receive the next value } }
For this code to run you will be needing a IR Remote Library.
Jusr Goole it or you can download from here too.
The Final Step:




Now with a dual sided tape, attach the LCD and the Arduino to the CD.. and Test with some remote and decode the signals..