This circuit makes use of LEDs for more that just an indicator. They are also used as a voltage regulator and as an IR detector.
Step 1: Parts and Schematic
Blue LED with Vf of 3.0 to 3.3
Green LED with Vf of 2.0 to 2.2 (not ultra-green or true-green)
Red LED with Vf of 1.8 to 2.0
Infrared LED with wavelength of 940 or 950 nm
1N4148 or similar diode
100 nF (0.1 uF) capacitor
Microchip PIC 12F629 microcontroller
Female DE9 connector
Wire (solid core 20 awg)
PIC Programmer (PicKit 2 or similar)
Step 2: Power Supply
Begin assembly by soldering three short solid core 20 awg wires to pins 2, 5 and 7 of a female DE9 connector. This is the only soldering required.
Insert the wires in to the breadboard as show. The wires for pins 5 and 2 must be in adjacent columns. The wire for pin 7 should be several columns to the left.
Install the blue LED with the cathode connected to the wire from pin 5 of the DE9 connector.
Install the green LED with the cathode connected to the anode of the blue LED.
Install the 1N4148 diode with the cathode connected to the anode of the green LED and the anode connected to the wire from pin 7 of the DE9 connector.
The power supply circuit is now complete.
To test the power supply, connect a USB to serial converter to the DE9 connector and use terminal software (Hyperterminal or similar) to open the COM port. The RTS line will switch to a positive voltage and the LEDs should light up. Measure the voltage to confirm it is close to 5 volts. Disconnect the serial cable and proceed to the next step.
Step 3: Microcontroller
Install the PIC in the breadboard as shown. Pin 8 must be in the same column as the wire from pin 5 of the DE9. Pin 7 must be in the same column as the wire from pin 2 of the DE9.
Install a short jumper wire from the cathode of the 1N4148 diode to pin 1 of the PIC.
Install a 100 nF capacitor across pins 1 and 8 of the PIC.
Step 4: Activity Indicator and IR Sensor
Install an infrared LED with the anode connected to ground and the cathode to pin 5 of the PIC. This LED is used as a IR detector rather that an emitter. It is reversed biased by a pull-up resistor in the PIC to enable operation in the photoconductive mode.
Assembly is now complete.