LED Driver with a Square Wave

Thread Starter

Pedro Vilas-Boas

Joined Oct 27, 2015
14
Here is another way to make a pulsed constant-current LED driver.

I'm assuming that the pulser is the 555. Do not operate the 555 on more than 15V; that is getting close to its rated VccMax. It's output pin will swing from~1V to ~14V, see red trace.

Q1, M1, R1 and R3 constitute a constant-current LED driver. Current through the LEDs is Vbe(Q1)/R1 = 0.67/3.3, or about 0.2A, see yellow trace I(D4), which is in units of mA.

The addition of Q2 gates the CC driver on/off. See V(g), orange trace.

The power dissipation in M1 is a modest ~0.5W, which doesn't require much heatsinking... See green trace, which is in units of Watts.

View attachment 93606

This simulation shows what you can expect for an upper limit of pulsing frequency using this circuit. Note that the turn-on time is dominated by how long it takes to charge the gate capacitance of M1 through R3. Turn-off is much faster. Good enough to pulse at ~200KHz....

Thank you for this circuit, however i really would like to have my initial circuit working and understand whats wrong with it.
 

dl324

Joined Mar 30, 2015
16,839
i really would like to have my initial circuit working and understand whats wrong with it.
Do some research on how beta varies with current, collector-emitter voltage, temperature, and any other parameter you care about. That will give you a percentage beta variation. Then study the intensity vs current graphs for the LEDs you plan to use and see what effect that beta variation will have.

If your power source is well regulated, you may not need the added complexity of a current source.

I built a "power" IR transmitter consisting of 5 or 6 dozen LEDs when I was an R&D Tech (about 4 decades ago) and I didn't bother with current sources. I spent more time worrying about how to filter out interference from fluorescent lights on the receiver.
 

MikeML

Joined Oct 2, 2009
5,444
Im pretty sure i started it in homework forum.
Well then, ignore everything I posted except learn from what I did to test my circuit using the simulator... I would expect you to post a time-domain simulation showing the dynamics of how your circuit behaves when pulsed...

And a dc sweep to prove that your circuit really is constant-current, which I dont think it is...
 

crutschow

Joined Mar 14, 2008
34,280
I understand the opamp can cause some problems with time but from specs of opamp this really shouldnt be a problem i think. And isnt it "dangerous" to connect the timer output directly do base of transistor? I think some small variation in Hfe can cause the collector current to change.
What "danger" are you referring to?
The Hfe will have only an minor effect if you use an emitter feedback resistor to control the transistor current and the typical transistor current-limit circuit has (did you look up those type of circuits as I suggested?)
 

Thread Starter

Pedro Vilas-Boas

Joined Oct 27, 2015
14
Well then, ignore everything I posted except learn from what I did to test my circuit using the simulator... I would expect you to post a time-domain simulation showing the dynamics of how your circuit behaves when pulsed...

And a dc sweep to prove that your circuit really is constant-current, which I dont think it is...

Here in attachment is a time-domain simulation, as you can see the signal that enters the positive input is the same as it appears in the negative input, and therefore the current in collector of the transistor has the same shape.
 

Attachments

Thread Starter

Pedro Vilas-Boas

Joined Oct 27, 2015
14
What "danger" are you referring to?
The Hfe will have only an minor effect if you use an emitter feedback resistor to control the transistor current and the typical transistor current-limit circuit has (did you look up those type of circuits as I suggested?)

i was told by a coleague that the Hfe of the transistor can vary so if i dont use the opamp, the current in colector may go upper than maximum value. Maybe he is wrong.

I looked and i found some interest stuff like this for example (http://www.physics.unlv.edu/~bill/PHYS483/current_lim.pdf), tomorrow i will try it, thank you for suggestion
 

dl324

Joined Mar 30, 2015
16,839
i was told by a coleague that the Hfe of the transistor can vary so if i dont use the opamp, the current in colector may go upper than maximum value. Maybe he is wrong.
A typical opamp can source around 25mA. A base resistor could accomplish the same thing. Beta variations would result in more or less base current, but the current in your driver is controlled by the transistor emitter resistor and the forward voltage of the transistor BE junction. That voltage varies with temperature and current but that would happen regardless of whether the transistor was driven from an opamp or a resistor.
 

Thread Starter

Pedro Vilas-Boas

Joined Oct 27, 2015
14
Ok so it seems the problem of previous circuit really was the opamp not being able to buffer the signal fast enough, so i decided to change circuit to this:



Im sorry the timer is not more clearer but i dont know how to change package pins in my simulator.

I think this way it will work, i changed the opamp for a simple current limit circuit as suggested. In simulator everything works good, i will need a dissipator for Q1 but other than that i think this is the best.

Thank you all for help. If you have any suggestions about this circuit feel free to say so.
If i have any problems in pratical i will post here for help.
 
Last edited:
Top