[ QUOTE ]
DIYLite said:
Hi All,
How is possible that a D.I.Y. 3*LED flashlight can use a circuitry able to select between 1, 2 or all 3 LEDs to be lit-up by press a single switch button? Is there such a circuit diagram available online? /ubbthreads/images/graemlins/confused.gif
Thanks!
[/ QUOTE ]
I have on eright here in CPF.
This is what I did for
H&M Contest 2004 Class4 and it runs with a PIC.
Many AVR experts here provably would have better ideas, but I use PIC because that's what I have. As long as you have the control over the program, what you can do is limited by just your imagination only. (Well, almost, there are many limitations!)
But you will need to decide what you want and how you want -- led type, brightness, color, host, power supply and so forth.
For example, turning on 1, 2 or 3 leds to control the brightness is heritage from a mechanical switch. It would be better to control the brightness with PWM. Instead you may want to have 2 different color led sets to toggle between in addition to the brightness control.
If you just want to control a small light with less than 100mA current, a PIC can handle with direct digital output upto 100mA with each pin sourcing 20-25mA. If you want to control higher current, you can add an FET to do that.
If you want current regulation, you can add a transistor to the FET circuit as UK Owl did, or you can use a LDO regulator as Doug_S did.
Now you see, there are really too many options to choose from.
If you state what you are trying to do, I can supply a pre-programmed PIC for you -- PIC12F675, 8pin 150mm SOIC size.
-- dj