Moz's Lego Pages
Moz Home Lego Home MOC: Skid-steer loader Technic Road Train Pictures Storing Lego DIY pneumatic valves IR remote control
Building an Infrared Remote Controller Unit
I did this a few years ago, about the time I finished a Masters degree in Electrical Engineering. I'm going to keep this short and complex, so that it doesn't eat my web page. Hopefully the average electronics hobbyist will be able to take it from here.
The guts of my system was an integrated remote control chipset (never build what you can buy in a single IC). The chipset was 16 pin DIPs, Tx is MC145026P, receivers MC145028P. You could wire this straight into the parallel port of a PC, just using a few resistors as pullups. The output of the Tx amplitude modulates a clock signal (38kHz is traditional for IR) into a driver transistor and the output diode. You can get away with a stock red LED prototyping.
To make mine I used the serial port because it seemed interesting. I had a couple of dual 16550s (dunno the part number) already on the breadboard, driving a bar graph display via a serial/ parallel chips and a couple of dividers. Very pretty to watch. So I just ripped out the display and used what I had. I think the original came from the data sheets on the 16550 chips. All up the transmitter sank about 30mA, almost all of which went through the output LED. I found that it worked off the serial port just fine, so I never bothered with the required external power supply. If you cut down to a single LED on the output you should be able to get that down to about 5mA or so, which is almost legal to drain off an RS232C.
The Rx demodulates from an active IR device, I used a 2 pin for size reasons, which drives a diode into an RC filter into the Rx chip. Again, everything seemed to be standardised, the SMD I found (ie, swiped from a friends workbench) was compatible.
There's an article in Electronics Australia, November 1988 about a UHF remote control that it looks like I took the basics from, IR isn't too different (a bit easier in some ways).
Once I had the receiver working as a dead bug (lying upside down on the table, no circuit board) I bought the receivers as CMOS SMDs so I could put them into 2x4 bricks and run them off the 9V input rail. I used the 2x4 electric plates on the bottom to get the contacts, cut electrically into two 2x2 plates for input and output. For the receiver I cut off a stud on a 4x2 brick, then cleared the 'gunk' out of the center of the brick to give a hollow shell.
I drilled three 1.5mm holes in each long side of the brick so that they would later fill with epoxy and that way hold everything in place. Once the receiver was working in place I made up some nice runny epoxy resin (two-part glue, like Araldite(tm)) and filled the brick with it. I used a jig made of Lego bricks around it to block up the holes in the sides. Pressing the electrical plate on the bottom forced the side holes full of epoxy, which in turn held the plate onto the brick. So, a totally sealed, mechanically robust, smart Lego Brick.
I tried a few different things that didn't work out so well. Not
gluing the bricks together meant the wires broke off when I took the
brick out, since the cut-up brick didn't hold onto the plate very
tightly, but plates grip very well to stuff under them. I tried PWM
chips in the bricks, but since I had the IR bandwidth it proved just as
effective to do it from the PC end, making the whole in-brick thing
pretty simple. Likewise the original TTL was a pain, running off 5V, so
I got CMOS stuff instead (3-15V, anyone?). Static doesn't seem to have
been a problem - five years later they still work, and they've been
loose in my Lego box for a lot of that time. Thinking about this I don't
recommend it, but YMMV