|
|||||||
![]() |
Forum Index > General > Ask an Evil Mad Scientist! | ||
Best way to control multiple 1.5v lights including brightness (basic stamp) |
|||
| | | Printable Version |
|
Anonymous: johnbot | ||||||||
|
Hi Evil Mad Scientist, |
|
||||||||
|
|||||||||
|
Windell | ||||||||
|
Sheesh, why not use LEDs and make life easy? Actually, it sounds like you've already got your lamps under (simple) control with the uln2803, so you're most of the way done already. From your post title I infer that you have a Basic Stamp handy. So, unless I'm missing something, you should just be able to take seven outputs of the Basic Stamp and use those to drive seven inputs of the uln2803. Once you've done that, you have arbitrary control of which lights are on at any given time. You can get intensity control this way as well by reducing how much of the time each light is on, using pulse-width modulation. Suppose that you want one of the lights to be half as bright: just run it with a 50% duty cycle, 1 kHz square wave. If you reload the entire 7-bit output array once every ms (not difficult on a microcontroller), you can control a wide range of intensities, by varying the duty cycle. Alternative plan: You can use a parallel-output shift register like the 74hc595 to translate seven sequential values into seven parallel outputs. Advantage: Uses fewer pins of your micro. Disadvantage: much slower, so you will be only able to get a few levels of intensity. Windell H. Oskay drwho(at)evilmadscientist.com http://www.evilmadscientist.com/ |
![]() Evil Scientist ![]() Status: offline
Registered: 06/15/06 |
||||||||
|
|||||||||
|
|
| All times are PDT. The time is now 07:43 PM. |
|
|
Octolively
Interactive LED kits
Meggy Jr RGB
LED matrix game
development kit.
Business-card sized
AVR target boards
Peggy 2
LED Pegboard kits