Introduction: Arduino IR Sensor and LEDs

This is a project for my physics 308 lab.  Initially, I was not sure what I was going to build using an arduino.  I decided to make something with an IR sensor.  I was given an idea by my instructor to use remote to control the LEDs.  I saw a YouTube video where someone using a common remote to control LEDs.  I decided that was going to be my project.  It seemed simple enough; however, it was not as easy as I initially thought considering this is my first project building a circuit or using an arduino.  One website was particularly helpful in my endeavor (http://www.ladyada.net/learn/sensors/ir.html).

Step 1: Test IR Sensor and Materials

List of materials:
Arduino Uno
Jumper kit
Breadboard
Four LEDs
Four 560-Ohm resistors
IR Sensor
Remote control

The website I mentioned earlier has a nearly step-by-step instruction.  Using a breadboard with a 5V power supply, I connected an LED and the IR sensor together (initial ir sensing led on).  The IR sensor has three prongs.  Using the 5Vs, I was able to use a common remote to make the LEDs blink without any arduino just as a test.  I used a 5V power supply rather than batteries like in the picture from the website (Initial circuit).  I wanted to test the IR sensor because I have never used such a set up.

Step 2: IR Decoding

I used the arduino code (ir_decoder.h) to find the on and off times for the particular Samsung remote I was using.  After you upload the program to the arduino, you use the serial monitor option on the arduino program to view the on and off times.  I pressed the power button on the remote to view the times.  I wanted to be able to program different buttons on the remote so I decoded the time for play, rewind, and forward buttons.

Step 3: IR Commander

I downloaded the final code from Github (https://github.com/adafruit/IR-Commander).  Once, I knew the on/off times for the buttons I plugged them into the IR commander code (ir commander.h).  However, I found the coding complicated being this was my first time using an arduino.  I was unable to make my arduino respond to the three remote buttons.  Using the serial monitor, the arduino kept telling me it heard the pulses but nothing happened.  I have added the coding as an attachment called ir commander.h.  In addition, the original code was designed to act on an Apple remote.

Step 4: Conculsion

I uploaded pictures of my initial prototype, my on/off times for the Samsung remote, and the arduino codes.  Obviously, I was not able to complete a functional prototype, which was disappointing.  However, I learned valuable knowledge for my first time working with an arduino.  In addition this the link to my Github project (https://github.com/georgej2/Arduino-Project-for-308L).  I would like to thank the owner of the website (http://www.ladyada.net/learn/sensors/ir.html) who helped me greatly with my project.