IR Controlled Light Dimmer

Background

The goal of this project is to control the brightness of a light bulb with an IR remote control. The chips being used are the SIS-2 IR receiver/decoder and the AD8402 digital potentiometer. The SIS-2 is used in coordination with an IR receiver module to learn and respond to two different IR codes. The learned IR codes being used are those of the "channel up" and "channel down" buttons on a standard television remote.The digital potentiometer was used to react to the button presses and adjust an ouput voltage, leading to the DC light bulb, accordingly. Pressing the "channel up" button would brigthen the light, while pressing the "channel down" button would dim it. The pin descriptions for the SIS-2 and the AD8402 can be found at these corresponding links.

Procedure

The SIS-2 chip first needed to learn the two buttons used. A video showing how this is done is in the next section. Once the buttons are learned, the chip is able to save that information in its nonvolatile memory, and does not need to be programmed again. Any time one of the learned IR codes is received from then on, one of the ouput pins will react accordingly. It was desired to set up a test circuit before linking the outputs of the IR decoder to the digital potentiometer through the Arduino. The test circuit is shown below and the corresponding code can be found here.

 

In this circuit, the LEDs are lit according to the button presses. Pressing the "channel up" button on the remote would move the lighting to the above LED, or back to the bottom LED if it had reached the top. The opposite was true for pressing the "channel down" button. A video demonstration can be seen in the next section.

The next step was testing the digital potentiometer. A test circuit was set up with pushbuttons as the input commands:

The code that goes along with this test circuit can be found here. In this circuit, push buttons were used to mimic the actions of the remote control. When setting Vss to ground and Vdd to 5 V, the output voltage could vary between about 10 mV and 4.9 V at steps of about 20 mV. A DC light bulb was connected to this output voltage and should have been able to brighten and dim according to this voltage. However, at the time, I was unaware that DC light bulbs do not have a resistance, like bulbs designed for the typical AC outlet. A video showing the monitor output of the program can be found in the next section.

I decided to go ahead and wire a circuit and code for the final toy design, despite not getting the test circuit for the digital potentiometer to work. The final circuit design is shown below:

Here, the Arduino responds to the SIS-2 outputs by loading the digital potentiometer with a varying wiper value. The AD8402 identifies which of the two pots to output to, and computes the corresponding output voltage. It was during this set up that I found out about my problem with the DC light bulb. Because of this little fact, I had to modify my project so that LEDs would be dimmed instead of the light bulb. A demo of the final IR controlled dimmer can be seen in the next section.

Videos

Programming the IR decoder and LED control demo

Here, programming is done while the LEDs are scrolling downward uniformly. First, the pushbutton is pressed to indicate the chip is in learning mode. Each button needs to be pressed four times in succession for the chip to learn its IR code. Once this has been done, the LEDs stop scrolling and respond to the "channel up" and "channel down" button presses on the remote. 

 

Screen output from digital potentiometer test

Because the light could not be shown to brighten and dim in the digital potentiometer test circuit, serial output is shown on the screen. Buttons are being pressed when I say "up" or "down" in the video. The Arduino program recognizes this and increases or decreases the value of the digital potentiometer. This value, along with the address of the potentiometer (there are 2 on the chip) are sent to the Serial Data Input pin on the AD8402. Values on the screen show either UP or DOWN, the output POT value, and SENDING.

 

Final demo of LED light dimmer

 

Log

04/05 - Began research on SIS-2 IR receiver/decoder chip and IR protocol. Ordered SIS-2 chip. 

04/11 - Received SIS-2 chip. Got wrong IR receiver module. Ordered new one. Looked into how Harrison and Robert interfaced with the chip for midterm. Began modifying their code to suit what I wanted to do with the chip.

04/12 - Looked into what I wanted to do with commands from IR receiver. Original idea was to recreate "Tin Can Alley" game by using remote control as a "gun" that would knock cans off of a platform when it was aimed at them.

04/13 - Looked into using a solenoid for the action of knocking cans off platform. Found it wouldn't provide the desired 'pop'.

04/15 - Received new IR receiver module to use with SIS-2.

04/18 - Decided to use SIS-2 in coordination with digital potentiometer to adjust the brightness of a light bulb. Ordered AD8402 digital potentiometer chip. Started wiring for testing the SIS-2 with LEDs. Was able to successfully program the chip to recognize two buttons from remote control. 

04/20 - Debugging program to test SIS-2 with LEDs. Found that both outputs from the chip were sometimes going HIGH when either up or down was pressed on remote. Decided that a new remote was needed, as the one I was using was old and program seemed be fine otherwise. 

04/22 - Researched how Matt and Derek used the chip for their midterm.

04/24 - Used new remote and found that program for SIS-2 worked successfully with it.

04/26 - Received AD8402. 

04/27 - Began wiring test circuit for digital potentiometer and writing program to use with Arduino.

04/28 - Debugging POT program.

04/29 - Debugging POT circuit/program. Not getting any voltage off either wiper.

04/30 - Still same problems with POT. Tried rewiring and adjusting program.

05/01 - Still no luck with getting any voltage from POT. Starting to get angry.

05/02 - After further debugging and talking with Matt, have come to the conclusion that AD8402 chip does not work properly. Took video of screen output, showing that buttons are recognized as "up" or "down" and that Arduino was sending info to the SDI pin on the AD8402. Designed and wired circuitry for what the final product should be and wrote program for what the final product would use with Arduino if the AD8402 chip worked. 

05/03 - Discovered that it was actually the light bulb that was causing all the problems. DC light bulbs do not have a resistance. Therefore, the voltage output pin on the POT was reacting to being grounded, rather than outputting the desired voltage. Due to this, the original toy idea would not work. Set up LEDs to respond to varying voltage instead. Got this modified toy working properly.

Links

IR Receiver/Decoder Datasheet

Digital Potentiometer Datasheet