Introduction: Tiffany "Light Fan" LED Ornament

This is a pretty Tiffany glass work made by my wife Mieke.
Adhesive copper strips are stuck to the edges of the cut glass pieces. The copper strips of the adjacent glass pieces are then soldered so the glass pieces get connected to each other.

The light effects are generated by a Microchip PIC12F683 microcontroller. The microcontroller controls the LED's using a shift register, a latch and a darlington transistor array. The microcontroller uses software PWM (pulse width modulation) to control the intensity of the LEDs.

For the LED's i used pieces of cuttable LED strip cut down to pieces with 3 LED's (see pictures).
Each piece with 3 LED's illuminates one of the individual glass compartments in the glass work.
The glass pieces that form the compartments are pieces of mirroring glass, to reflect the light as much as possible instead of absorbing it. The glass itself is semi-transparent. Without diffusing the light, you would be able to see the individual illuminated LED's throughout the glass. To diffuse the light, i used pieces of paper with the same size as the glass pieces and dipped the paper with olive oil using cotton wool. When the oil soaks into the paper, the paper becomes a bit transparent and becomes a very good diffusor for the intense LED light. Let the paper dry first before it can be glued to the back of the glass pieces to diffuse the LED light, so it gives a more uniform lighting effect.

Step 1: Schematic

The beating heart of the circuit is a 8-pin Microchip PIC12F683, pimped up with an external 20MHz xtal oscillator, so it runs at it's maximum speed. We need this extra speed because we want to drive 8 LED's and control their intensity individually using software generated PWM (pulse width modulation) signals with 8 bit resolution. Because the small microcontroller does not have enough digital output pins for the job, i expanded it's output capabilities using a using a 74HC164 serial input shift register followed by a 74LS573 latch. The microcontroller only needs 3 digital output pins (DATA, CLOCK and LATCH) to create 8 digital output channels for the LED's. The RESET for the shift register is connected to the reset of the microcontroller and resets the shift register at power up. To control one of the LED's, the microcontroller needs to shift in a complete byte into the 74HC164 shift register, so this byte appears at the 8 outputs of the shift register. Therefore the microcontroller sets each individual bit of the byte using the DATA pin and toggles the CLOCK pin to shift in this bit. After 8 CLOCK pulses, the complete byte is present at the output of the shift register. Then the microcontroller toggles the LATCH pin, latching the byte to the output of the Then it has to toggle the LATCH pin, so the shift register byte is latched into the 74LS573 latch. The byte is now present at the output of the 74LS573 latch and stays there, even when shift in a new byte into the shift register. While shifting in a byte into the shift register, the output of the shift register changes with each bit that is shifted in, because the output data reflects the current data. That is why we need the 74LS573 latch, so we can "store" the byte at the output of the shift register after the full byte is shifted in. Once the byte is "stored" in the latch, we can start shifting in a new byte. The ULN2803 is used as a buffer (current booster) and level converter at the output of the latch. The latch outputs are +5V and we need to drive LED's from a LED strip that is rated for +12 V DC. The ULN2803 is a darlington transistor array with open-collector outputs that are capable of sinking 500mA at 50V. That is way more than enough to drive the LED strip pieces with 3 LEDs consuming 45 mA at +12 V. The inputs of the ULN2803 can be driven with max 0.4 mA, so it will not make the latch outputs sweat. The combination between a 74HC164 and a 74LS573 might be a little strange. Why not using 2 chips of the same type. The answer is the usual one : i didn't have a 74HC573 in my junk box. Besides that, it is no problem to connect a HC chip to a LS chip, because the voltage levels are compatible, so no level shifting is necessary.
For info on the logic family interfacing subject, see :

The circuit is powered by a +12V DC / minimum 0.5 A adapter.
Each of the 8 LED strip pieces draws a maximum current of 45 mA, so the total current, when all 8 LED strip pieces are all switched on at 100% PWM, is about 360 mA at +12V DC.

Step 2: Pictures

See comment boxes in the pictures for more information.

Step 3: Firmware

Here you can download the firmware hex file for the Microchip PIC12F683 microcontroller.