The DVR shipped with a cheap nasty little remote that didn’t even work when I first came to look at this project – the diode at the top was attached so badly (a dry solder joint) that I needed to exact some repairs before even getting started.
The plan is to have a device to receive the IR signal downstairs at the TV, transport it over Ethernet to the loft space where the DVR lives, then transmit it as though the remote was being used in the loft:
Since the house is already nicely wired for Ethernet, it seems the most sensible way of transporting the data to the loft. I could have done something fancy with 802.15 (Zigbee) but I don’t really want to tie up any of my XRF or Xbee modules on this.
A will be an Arduino, fitted with the Ethernet shield and connected to an IR detector (which I actually ripped out of an old Sky+ box).
B will be a Raspberry Pi. My Pi spends most of its time connected to Ethernet and Power and nothing else, so it won’t be missed in the loft and it can continue doing the things it does now. The Pi will have an IR emitting diode attached to it to simulate the DVR remote being used in the loft space.
The IR Receiver – “A”
The receiver is quite straightforward electronically speaking. The detector is connected to the Arduino directly with no interstitial circuitry. Looking from the front (the business end, so to speak) – the center pin is Ground (0V), the rightmost pin is 5V and the leftmost pin is the output – which I connected to one of the digital inputs on the Arduino board.
I’ll probably find a more suitable way of connecting them without the breadboard before I deploy the project to the loft/downstairs media center area.
The code for the Arduino side of things is quite simple, I will psuedocodeize it here for simplicity, but you can view it on GitHub too:
detect incoming IR codes if code is valid then: make HTTP request to raspberry pi with the code
Each time the Arduino receives a valid code using the IRRemote Arduino library (here is the library on GitHub), it makes a HTTP request to the Raspberry Pi in the form:
GET /?code=SOME_CODE_NAME HTTP/1.1
The Raspberry Pi then performs the appropriate actions to transmit the code sequence for SOME_CODE_NAME.
The IR Transmitter – “B”
The first actual step was creating the circuit for the IR transmitter. This is really the more challenging bit of electronics of the two (but still not really challenging). The Raspberry Pi GPIO pins can’t sink enough current to run the IR LED bright enough to reach the DVR, so it’s necessary to use a transistor to switch current from the 3V3 pin (3.3 volts) on the Raspberry Pi.
For more detail: Project: IR over IP