Moodlight

Skip to Navigation »

Single LED

Schematics of single-LED version

This version is designed for a single LED using less than 40 mA of current, the absolute maximum per I/O pin for the ATtiny2313. Series resistors for the LED must be adjusted depending on the LED used.

C1, C410µF
C2330nF
C3100nF
D1, D21N4001
U1LM78L05
U2ATtiny2313
J1ISP connector
LED1Red LED
LED2Green LED
LED3Blue LED
R110kΩ
R2130Ω (~2.4V at LED1)
R3, R4100Ω (~3V at LED2..3)
NameComment
moodlight1.pngSchema as image
moodlight1.gschemSchema for gschem

Multiple LEDs

Schematics of multi-LED version

This version uses transistors to drive higher currents than the absolute maximum 40 mA per I/O pin. The type of transistor depends on the current to be driven (the BC337 used below is good for up to 400 mA). More LEDs can easily be added. Series resistors for the LEDs must be adjusted depending on the LEDs used.

C1, C410µF
C2330nF
C3100nF
D1, D21N4001
U1LM78L05
U2ATtiny2313
J1ISP connector
LED1, LED2Red LED
LED3, LED4Green LED
LED5, LED6Blue LED
R110kΩ
R2, R3, R410kΩ
R5, R6130Ω (~2.4V at LED1..2)
R7, R8, R9, R10100Ω (~3V at LED1..4)
Q1, Q2, Q3BC337 or 2SD467
NameComment
moodlight2.pngSchema as image
moodlight2.gschemSchema for gschem

Multiple LEDs with colour selection

Schematics of multi-LED, colour selection version
Blue colour
Green colour
Purple colour
The innards

A while ago, I ordered cheap RGB LEDs via an auction platform. I wanted to make use of them and designed this lamp. It’s based on an Ikea lamp called “Lock”. The version pictured has four LEDs installed, but the used transistors could drive up to about twelve of them.

This circuit uses all pins of an ATtiny45 µC, except for the reset pin. The user can change between automatic and manual mode using a switch. In automatic mode, the lamp changes colours automatically and speed can be changed using a potentiometer. In manual mode, the colour is selected using the potentiometer.

C1, C410µF
C2330nF
C3100nF
C410nF
D1, D21N4001
U1LM7805
U2ATtiny25/45/85
J1ISP connector
LED1..2Red LED
LED3..4Green LED
LED5..6Blue LED
R11kΩ
R210kΩ
R310kΩ potentiometer
R4..6560Ω
R7..8130Ω (~2.4V at LED1..2)
R9..12100Ω (~3V at LED3..6)
Q1..3BC327
NameComment
moodlight3.pngSchema as image
moodlight3.gschemSchema for gschem
Makefile-moodlight3Makefile
moodlight3.cC source

Licence

The schematics are released under the Creative Commons Attribution-Share Alike 2.5 licence.