Author Topic: Sanity check constant current LED driver  (Read 3712 times)

0 Members and 1 Guest are viewing this topic.

Offline CountChoculaTopic starter

  • Supporter
  • ****
  • Posts: 199
  • Country: ca
  • I break things—sometimes on purpose.
Re: Sanity check constant current LED driver
« Reply #25 on: January 25, 2023, 01:22:27 pm »
What do you mean by high gain?

A Darlington pair has a lower voltage gain than a single transistor, but a massively higher current gain. In both cases, an emitter follower has a slight voltage loss, not gain.
I think you're going off on a tangent here that's not helpful to the OP. Again: been there, done that (hint: the sense resistors translate to voltage gain. Also, I never said the voltage gain was the problem with the Darlingtons).
Please do go on all the tangents you like. I'm learning lots and really appreciate all the discussion :)
Lab is where your DMM is.
 

Offline CountChoculaTopic starter

  • Supporter
  • ****
  • Posts: 199
  • Country: ca
  • I break things—sometimes on purpose.
Re: Sanity check constant current LED driver
« Reply #26 on: January 25, 2023, 01:26:46 pm »
Original schematic: why not use a NMOS, in a current sink topology (rather than a PMOS in a current source topology) and get rid of the NPN transistor? This is a very common approach that works well. (You can add a cap in the feedback loop to avoid possible oscillations, but often just using a relatively slow opamp is enough to get something stable.)

Sure otherwise you can use a single bipolar transitor as shown above, but the current sink topology with an opamp and a NMOS works plenty fine in most cases and just takes minimal care with the feedback loop to ensure it won't oscillate.
Thank you! I think I'm going to try a bunch of different circuits, including moving to a NMOS sink topology like you suggest. The reason I didn't go for it the first time around was that I didn't want the circuit to be energized when the lights are supposed to be off, so high-side regulation seemed better, but I guess that's not a huge deal in this case.

This started as a scratch-an-itch problem, but it's turning into a cool opportunity to try all kinds of different things, so I like the idea of exploring various possibilities.
Lab is where your DMM is.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19527
  • Country: gb
  • 0999
Re: Sanity check constant current LED driver
« Reply #27 on: January 25, 2023, 07:22:11 pm »
What do you mean by high gain?

A Darlington pair has a lower voltage gain than a single transistor, but a massively higher current gain. In both cases, an emitter follower has a slight voltage loss, not gain.
I think you're going off on a tangent here that's not helpful to the OP. Again: been there, done that (hint: the sense resistors translate to voltage gain. Also, I never said the voltage gain was the problem with the Darlingtons).
How can resistors translate to voltage gain? Resistors attenuate, not amplify.

You just said.
The problem using a Darlington is that it's almost impossible to stifle the oscillation due to the high gain.

Without specifying whether you were talking about voltage or current gain. Please explain why adding a Darlington pair causes oscillation.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5877
  • Country: de
Re: Sanity check constant current LED driver
« Reply #28 on: January 25, 2023, 08:17:22 pm »
Try it out yourself. Over and out.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19527
  • Country: gb
  • 0999
Re: Sanity check constant current LED driver
« Reply #29 on: January 25, 2023, 08:23:57 pm »
Try it out yourself. Over and out.
I could, but what would be the point? It would not help me understand why.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5877
  • Country: de
Re: Sanity check constant current LED driver
« Reply #30 on: January 26, 2023, 12:40:21 am »
OK, I've now played around with replacing the pass transistor with a MOSFET (IRFZ14, pretty standard, I think) and using a TL431 as reference instead.
The results are sobering, to say the least.
The TL431 gives no problems compared to the the TLV431, so that's fine.
But the combination TL431+IRFZ14 has produced one of the most powerful oscillators I've seen. And it's impossible to tame.
I was sceptical to start with, but that was only my "gut feeling" Now I've seen it in real life.
This is the circuit (ignore the gate resistor, it makes no difference). Feel free to try it out yourself:
 
The following users thanked this post: CountChocula

Offline CountChoculaTopic starter

  • Supporter
  • ****
  • Posts: 199
  • Country: ca
  • I break things—sometimes on purpose.
Re: Sanity check constant current LED driver
« Reply #31 on: January 26, 2023, 01:16:49 pm »
OK, I've now played around with replacing the pass transistor with a MOSFET (IRFZ14, pretty standard, I think) and using a TL431 as reference instead.
The results are sobering, to say the least.
Thanks for trying, very interesting find. When I'm back home this weekend, I'm going to try putting together a version of my original circuit using a low-side topology just for fun as well—I recognize that yours is superior, but I'm still keen to try it out, if only for the sake of completeness, since we ended up looking at all kinds of different solutions in the thread. I'll report back once I have some results.

Thanks again for all the suggestions and help, I really appreciate the support.


—CC
Lab is where your DMM is.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19527
  • Country: gb
  • 0999
Re: Sanity check constant current LED driver
« Reply #32 on: January 26, 2023, 02:29:21 pm »
You want dimming, so as nice and simple as the TL431+transistor circuit is, it won't do on its own.

If you don't have a suitable power BJT, then four of those PN2222As could be connected in parallel.

Attached is the practical schematic and an LTSpice simulation, with the potentiometer and TL431 replaced with a voltage source to make it easier to simulate. If it oscillates add some base resistors: try 1k, then increase it, if it's still a problem.

« Last Edit: January 26, 2023, 02:35:11 pm by Zero999 »
 
The following users thanked this post: CountChocula

Offline CountChoculaTopic starter

  • Supporter
  • ****
  • Posts: 199
  • Country: ca
  • I break things—sometimes on purpose.
Re: Sanity check constant current LED driver
« Reply #33 on: January 26, 2023, 08:42:21 pm »
You want dimming, so as nice and simple as the TL431+transistor circuit is, it won't do on its own.

Thank you! Interesting idea to put the dimmer pot on the feedback pin of the 437. I'll try it out!
Lab is where your DMM is.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19527
  • Country: gb
  • 0999
Re: Sanity check constant current LED driver
« Reply #34 on: January 26, 2023, 08:50:43 pm »
You want dimming, so as nice and simple as the TL431+transistor circuit is, it won't do on its own.

Thank you! Interesting idea to put the dimmer pot on the feedback pin of the 437. I'll try it out!
The voltage across the sense resistors, R1 to R4, tracks the reference voltage. I = V/R so the current changes. All the potentiometer does is vary the reference voltage.

I used four transistors, rather than one, because a single PN2222A can't dissipate that amount of power, without smoking.
 
The following users thanked this post: CountChocula

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5877
  • Country: de
Re: Sanity check constant current LED driver
« Reply #35 on: January 26, 2023, 09:05:38 pm »
Thanks for trying, very interesting find. When I'm back home this weekend, I'm going to try putting together a version of my original circuit using a low-side topology just for fun as well—I recognize that yours is superior, but I'm still keen to try it out, if only for the sake of completeness, since we ended up looking at all kinds of different solutions in the thread. I'll report back once I have some results.
Nothing "superior" about it, it's mainly optimized for simplicity. It can be made even simpler, but with less LED current precision.
Dimming is not in the circuit. Either a more complex solution is needed for that, or you use PWM dimming, which will work fine.

 
The following users thanked this post: CountChocula

Offline CountChoculaTopic starter

  • Supporter
  • ****
  • Posts: 199
  • Country: ca
  • I break things—sometimes on purpose.
Re: Sanity check constant current LED driver
« Reply #36 on: January 31, 2023, 12:27:08 am »
Just thought I'd give one final update—I ended up going with a variant of Benta's original circuit; the only thing I changed is using a slightly larger sense resistor (I didn't need to run the LEDs at maximum brightness for my application) and adding a simple PWM circuit for dimming. I'm a bit concerned about thermal management—the pass transistor gets quite hot and, while I have added a heatsink, I'm worried that there won't be enough air circulation inside the enclosure, but I'll give it a test and see how it goes.

Thanks again for all the help!


—CC
Lab is where your DMM is.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5877
  • Country: de
Re: Sanity check constant current LED driver
« Reply #37 on: January 31, 2023, 12:46:37 am »
I'm a bit concerned about thermal management
Glad you found a solution. You'll have the thermal issue no matter which circuit you choose, so I canẗ help you there.
 
The following users thanked this post: CountChocula


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf