# luxeon led dimmer circuit

Discussion in 'Electronic Basics' started by andy, Oct 2, 2005.

1. ### andyGuest

I've built the following circuit on breadboard as a dimmer circuit for 3
luxeon III Star ultrabright LEDs:

http://www.niftybits.ukfsn.org/electronics/luxeon-dimmer.png

any comments welcome. It does work at the moment, but when the battery is
low, the maximum current drops from 0.9 A to 0.7 A, and the op-amp swings
near to the top rail. The one thing I'm thinking of changing before I
solder it up is to change the 1 ohm sense resistor for a lower value
(maybe 0.5 ohm) so that the transistor has a bit more headroom to work
with, which should cure this I think.

The LEDs are /very/ bright by the way - 3 of them are enough to light a
small room well enough to read by. The light is a bit unkind on the eyes,
but not too bad. 3 at full current are about equivalent to an 11 Watt
energy saving fluorescent light bulb, which puts them in roughly the same
bracket as far as efficiency goes.

2. ### John PopelishGuest

Does the BD139 get very hot? I agree that you can use a lower value
current sense resistor. But you also have to scale the reference
voltage down by half. I think you don't need the first opamp to
supply the divider, since it is a constant load, so it can be factored
into the zener bias design. Also, the divider can be very much higher
value resistors, since the opamp draws almost no current from it. For
instance, a 10k pot in series with a 100k resistor (to use with a .5
ohm sense resistor). You could use the opamp to regulate the current
to the zener, instead, to make that voltage almost completely
independent of the battery.

The idea is to have the opamp output drive the zener through a current
limiting resistor, while the zener is also tied to non inverting
input. The inverting input is connected to a voltage divider (could
ground, which sets the voltage gain of the opamp to something a little
more than 1. Lets say you use a divider that creates 5.6 volts when
the opamp produces 8.4. (say, a 10k resistor to the opamp output and a
20k to ground) To bias the zener with about 5 mA, the resistor from
output to zener would have to be about 2.8/.005=560 ohms. you may
have to add a 10k pull up resistor to the opamp output to make sure it
starts positive when the power is applied. You tap off the lower half
volt across the lower part of the 20k resistor to produce the 0 to .5
volt needed for the current reference.

3. ### andyGuest

Yes, but not as bad as the other power components, so probably not
desperately in need of heat sinking. (The LEDs get hot enough to scald
when run at full current, so I'll probably heat sink them with some
aluminium sheet. They already have mini heat sinks built in though.)
Yes, I was assuming that.
Thanks for the idea - I'll give it a try.

cheers, andy.

4. ### Bob MonsenGuest

Another way to control brightness is to use what is called a PWM circuit.
Basically, you give your pass device a pulse every once in a while, and
control the percentage of time it is on. Since you aren't just burning up
energy with a resistor, it is often cooler and more efficient.

A simple circuit for this consists of a cmos 555, an N-channel JFET, a
cap, and a pot:

-----------------------o--------------o--Vcc
| |
| ||--'
.--------. | || J1=BF245B
.------+Vss Vcc+----' .->||--.
| | CN555 | | |
| | | | |
| | tr & th----------o------o
| | | R=470 |
| .---+OUT DISC+---o-\/\/\/\--------o
| | | | | ^ |
| | '--------' '----' |
| | |
| | |
| '-Gate of logic level NMOS ----- C=1uF
| -----
| |
-o------------------------------------o--Gnd

Call the current through J1 'I'.

The period is going to be the sum of the charging time

Tc = (1/3 * Vcc) * C / I

and the discharge time is

Td = R*C*ln((2Vcc - 3RI)/(Vcc - 3RI))

The duty cycle, which is what you are interested in, will obviously be

Tc/(Tc+Td)

since OUT is high during Tc.

The odd thing is that if you simplify this, the duty cycle doesn't depend
on the size of the capacitor; it only depends on vcc, Id(J1), and R. Thus,
you can pick a cap that is small enough so you don't see a flash, but not
too so the pass transistor requires too much dynamic current. The duty
cycle defined by this monster:

Vcc
D = ---------------------------------------------
Vcc + 3 R I ln((2 Vcc - 3 R I)/(Vcc - 3 R I))

So, when R is 0, D is 1, and when R is Vcc/3I, D is 0

That means that when R=Vcc/3I, the thing will simply stop, with output
low. The reason is that the discharge pin won't be able to pull the
trigger pin lower than Vcc/3. When R=0, it won't take any time to
discharge the timing node (well, almost no time) so D <- 1.

The N-JFET will vary as to how much current it will source in this
configuration. If it is sourcing too much, put a small resistor between
the drain and the point where the gate attaches; this will lower the
current. However, you need to make sure that your new resistor times the
current isn't bigger than Vcc/3. If it is, the output will get stuck
trying to pull the timing cap up to 2/3 Vcc, which means output will be
high and your pass transistor will be on all the time.

If you can't find a JFET, you can use a couple of PNP transistors as a
reasonable current source, like this:

--------o---------o-------vcc
| |
| [Rxx]
| |
e |
b--------o
c |
| e
o--------b
| c
| |
[Ryy] '----- current out
|
GND

Rxx sets the current to near I = 0.615/Rxx. Ryy should provide 1/10 of the
current through Rxx, so

Ryy = 10*(Vcc - 1.3)/I

5. ### redls1birdGuest

i am also working with some leds (lumileds superflux). My project i
to control a cicuit of leds that will be a parking light/turn signal
The light while illuminated as parking light mode is set at on
brightness, and gets almost twice as bright when turn signal is on.
The only diagram i can findf for this particular circuit i
thishttp://www.hidplanet.com/dmiller/PWM.jp
but being a beginner, im not sure how to construct this complicate
of a circuit. i know i should use pc board (or so ive been told)
but it is still pretty intimidating. Also, anyone know where i ca
get a 15v zener diode?

6. ### ehsjrGuest

For the 15 v zener
Cat #1N4744 from http://www.allelectronics.com/
4 for \$1.00

The circuit at the url does not give you the values for 3
of the resistors, nor the part to use for the darlington
PNP transistor.

Here's a different way to do it:

------- 1N4001
Tail -----in| LM317 |out---+---->|----+
------- | |
| | |
+----------+ |
| |
[POT] 5K |
| |
Gnd |
|
------- |
Turn -----in| LM317 |out---+---->|----+--- To led array
------- |
| |
+----------+
|
[POT] 5K
|
Gnd

Here's the LED array:

+----+----+----+---- Vcc
| | | |
V V V V
--- --- --- ---
| | | |
V V V V
--- --- --- ---
| | | |
V V V V
--- --- --- ---
| | | |
V V V V
--- --- --- ---
| | | |
[51R][51R][51R][51R]
| | | |
+----+----+----+----Gnd

All resistors are 1/2 watt. You can adjust the
pots for the desired brightness, and then replace
them with the next closest standard value resistor.

The 51 ohm value was determined assuming Vf of 2.5 volts
and max current of 70 mA for the LEDS - if your LEDS
are different, a new value needs to be computed.

Ed

7. ### redls1birdGuest

i dont want to sound like a total [email protected]\$\$, but i cant understand tha
kind of diagram!!! lol i really appreciate the help and the circui
appears to be much less complicated, but where can i get some help s
i can better understand that diagram

8. ### andyGuest

Not sure which circuit you're talking about, but the basics are:

- lines mean an electrical connection between one part and another. A
circle means a connection between three lines (you never show four lines
connecting, so a crossing without a dot means the wires don't touch)

- square boxes are resistors. resistors with 3 connectors and
an arrow on the middle one are variable resistors (pots)

- two lines with a space between are capacitors

- a circle with an arrow in it is a diode. If there's a lightning arrow
off it, it's a light emitting diode.

- a circle with a bar in it an 3 lines coming off is a transistor (the
line with the arrow is the emitter, the line into the middle of the bar
is the base, and the other line is the collector)

- triangles are 'operational amplifiers' - high gain amplifiers which you
'program' with external components to make them into reliable amplifiers
or control elements. These usually come in Dual In Line IC packages, often
with more than one on the same chip.

- a box with several lines coming off is a more complex chip, which could
do any number of things, so you have to look up the chip number.

The idea of these diagrams is that they show just the 'logic' of the
connections between the components. Given a circuit diagram, you should be
able to wire up the real parts to make a working circuit. Or else you can
use these diagrams to look at the circuit before you build it and see how
it's going to work, or show other people, etc.

any decent electronics book or website should tell you enough to make
sense of diagrams like this, at least enough to build the circuit and
understand it at a simple level.

9. ### ehsjrGuest

Is it the ascii art that you have trouble viewing?
in a fixed width font such as courier.
When you see something like this: -[240R]- it is a
240 ohm resistor. [51R] is a 51 ohm resistor
--->|--- is a diode - so is V
---
It was used as an LED (light emitting Diode)

[POT] is a potientiometer
and the LM317 is a three terminal voltage regulator
whose pins are labeled in, out and Adj

Does that help?
Ed

10. ### redls1birdGuest

very much so. for some reason i just couldnt wrap my brain aroun
that. its definitely less complicated than the original circuit
found. ill give it a shot