bob said:
Hi
Im looking for a circuit to control 5 banks of 4 LEDs
I want to use a single potentiometer, so as you turn
the pot the first set of 4 LEDs start to light up and as
they reach full brightness, I want the second bank to start
lighting up, as they reach full brightness etc etc until all
5 banks are at full brightness when the pot is at full throw.
It need to give a nice smooth transition from one bank to
the next, not just switching on one after the other.
Not sure if this makes any odds but im thinking of using white LEDS.
Thanks in advance
BoB
One thing to do would be to use the capabilities of the opamp to map the
values appropriately, while using the fact that the output is clipped to
the power rails.
I would use a dual rail-to-rail opamp for each of the 5 LED circuits.
Each would look like this (view with courier font):
+-----------------------------------------+---------+
12V | |
500k / /
.----/\/\/-----. \ 47R \ 47R
| | / /
pot 100k | | \ \
trimmer-/\/\/-. | | | |
| | |\ | | |
100k o----o---|-\ | .o-. .-o.
| | >-------o | | | | 2 3.6V LEDs
Vy ----/\/\/-' .---|+/ | '-o' 'o-' in series
| |/ / | |
| 47k \ | |
' / ----o---|
/ \ |
\ 47k | |\ |
/ o-----|+\ |/
\ | | >--| NPN
| | .--|-/ |>
| | | |/ |
6V | '----------o
| |
/ |
\ \
1k / /
\ \ 10R
| /
GND | |
--------------------------------o-------------'
Vy for each is one of A - E
12V--- [1k] -A- [2k] -B- [2k] -C- [2k] -D- [2k] -E- [1k] --- GND
created by Andy´s ASCII-Circuit v1.25.250804
www.tech-chat.de
When the voltage at the trimmer is varied from 0V to 12V, the circuit
will vary the current through the LEDs. The clipping will occur at
different places, depending on the value of Vy.
If the voltage at Vy is E, which is 1.2V, then the output will
(mathematically) range from 0 to 60V. However, the output is constrained
to be within the power rails of the opamp, so it'll really go from 0 to
12 as the input goes from 12 to 9.6V, and then stay at 12V while the
input goes the rest of the way to 0V. This will make the output current
through the LEDs go from 0 to 12mA only on the first 1/5 of the range
from 12V to 0V of the pot trimmer.
Likewise, for the second segment, set Vy to be D, which is 3.6V. Then,
mathematically, as the input goes from 12V to 0V, the output of the
first opamp will go from -12 to 48V. However, again, its clipped, so the
real action from 0 to 12V on the output will occur during the 2nd 5th of
the input range, and so the LEDs will be off from 0 to 1/5 of the input
range, will vary on linearly from 1/5 to 2/5 of the input range, and
will be completely on for the rest of the range.
Likewise for the other three LED drivers, using C will make the change
during 2/5 to 3/5 of the input range, using B will make the change
during 3/5 to 4/5 of the input range, and using A will make the change
during the last 1/5 of the input range.
The opamp should be rail-to-rail, otherwise the mappings won't be as
exact. Also, the current through an LED isn't linear with its
brightness. Doing that requires a multiplier.
The 6V input voltage can be obtained from C. However, that might mess up
the comparison voltages. I'd actually use a 1k/1k voltage divider from
12V to GND.
--
Regards,
Robert Monsen
"Your Highness, I have no need of this hypothesis."
- Pierre Laplace (1749-1827), to Napoleon,
on why his works on celestial mechanics make no mention of God.