You know the problem: you're sat in bed reading a good book (or on Facebook, whatever) and you want to turn the light off without getting out of bed. Maybe some remote controlled lights would be perfect? That's what I thought anyway :) My imagination then got a bit carried away, and I decided it should have different colours, red, green and blue for mood lighting, and white for reading etc. Hence this project :)
This instructable is for making lights (or pretty much anything) respond to signals from a tv remote control. To showcase this, I have made this LED mood lighting thingy, where you can choose what colour lights you want on by pressing different buttons on the remote. I have tried to make this instructable as easy to adapt as possible so you can use your remote control to er, control anything :)
The backbone of this project is the PICaxe series of programmable ICs, If you're not familiar with them there are loads of good instructables around and they are very easy to work with. You could adapt this project to make it run several motors for a robot, or an OLED screen or much, much more. The good thing about PICaxe is that the chips are so cheap you can make a project and leave the chip in, rather than for example using arduino (the chip featured in this project cost £1, and an arduino uno board costs £20)
This project is split into three main sections, the input, the control board and the download circuit. The input features an infrared receiver, the main board houses the PIC and the output connections and decodes the signal from the infrared receiver and the download circuit connects to the main board to allow you to download a program from your PC to the PICaxe chip.
This may not be the simplest as it does require you to know how to use transistors and resistors and create a reasonably simple circuit using stripboard, but anyone should be able to do it with a bit of care. So let's get started!
Step 1: Preparation
You will need quite a bit of stuff for this project, as well as a reasonable working knowledge of electronics:
Main Board Components:
PICaxe 08m chip (or larger if you want more outputs)
DIL socket with the same number of pins as your chip
Stripboard (size depends on chip and output components)
Transistors (I used bc639s for the LEDs, you may need TIP31s for motors)
Terminal Blocks (I used 7)
Resistors (300r, 100r, several of each, close values can be used instead)
5v power supply (I used 4xAA rechargable batteries to make 4.8v)
Whatever output components you want :) I used a pack of these LEDs
Infrared Reciever Components:
38khz Infrared photo module (has three legs and a sort of dome thing on the front)
Resistors (330r, 4k7, one of each)
Download Circuit Components:
3.5mm Stereo download socket
Resistors (180r, 22k, 10k, one of each)
All these components shouldn't cost more than about £5 ($8) if you know where to look :)
Saw capable of cutting stripboard (I used an x-acto)
Something to make a case out of (I used cardboard and PVA glue; you could make a nice version from wood or acrylic, maybe)
Sony TV remote (or a universal remote programmed to Sony tv codes, or this)
PICaxe download cable (USB or serial, both work with the version of the download circuit in this instructable)
Drill with 3mm bit
There is some very useful info here and here in the PICaxe manuals.
Step 2: Download Circuit
Let's start with the download circuit. This provides the interface into which plugs the download cable. All it involves is fitting the components onto the stripboard. This is fairly straightforward so I'll let the pictures do the talking :)
Step 3: Infrared Receiver
This is pretty similar to the download circuit. It is crucial though that you get the capacitor and IR module the correct way round. For the connection wires I have used my standard wiring protocol where orange = +5v, white = 0v and yellow = data line.
Step 4: The Main Board
This is the big, (slightly) complicated, impressive bit :) Start by locating the DIL somewhere near the top centre of the stripboard and work out the locations of the other components from there. Use the pictures as a guide; the output circuitry resistor values will differ if you want to use more powerful components such as motors.
It may also help to label the terminal blocks as in the picture. You will also need to cut some of the tracks to prevent a short-circuit; to do this, use the drill to get rid of the copper section of the track.
If you are using an 08m chip:
-and want 4 outputs (as I have) then you will need to include a switch to change pin 7 from a terminal block for programming to a transistor for output.
-you will need to connect the data line for the receiver to pin 4; no others will work
-the serial in pin needs to be connected to the orange wire from the download circuit
-the serial out pin needs to be connected to the yellow wire from the download circuit
-the serial in pin needs to be connected to 0v with a 10k resistor when the download circuit is not plugged in
I have provided a circuit diagram of the main board in the pictures (design using Circuit Wizard 2).
Step 5: Programming
After you've wired the download circuit to the main board, you can program it. The code I used is in the picture (the document wouldn't upload) and you can use/edit it as much as you want.
One set of LEDs turns on when the button 1 is pressed, one on 3, one on 7 and one on 9. The code is set to have only one set of LEDs running at a time; you can change this if necessary. The LEDs turn off when you press the remote's power button.
Useful programming stuff here
Step 6: Finishing Touches
Adding the LEDs is easy; they are simply 4 sets of 4 LEDs wired in parallel, then plugged into the terminal blocks. Once all is wired and programmed, give it a test. If everything is fine, you'll need something to put it in. I made this case out of quality cardboard, but if I had access to a decent workshop I would have used wood. Plastic is also an option, maybe 3mm acrylic sheet. Whatever you choose to do, make sure that the infrared receiver is on the outside of the case!
That's pretty much it, thanks for reading and please post your version in the comments! Feel free to ask me any questions, I know I'm not the best person at explaining things in Instructables :) Contest votes would also be nice :P