Pages: 1 2 [3]   Go Down
Author Topic: "Fooling" constant-current control loops in LED driving?  (Read 6961 times)
0 Members and 1 Guest are viewing this topic.
Troy, NY, USA
Offline Offline
Newbie
*
Karma: 0
Posts: 20
Finnish in USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Perhaps you should use another NPN to drive the " off " shunt, with the base driven from the collector of the " on " driver, with a similar load resistor to smooth the load from the PSU ?

That is quite easy to test when I am around the setup tomorrow again, thanks for the tip

Quote
You happen to have any insights what to look for when trying to find similar example circuits / projects?

Yes, I am thinking about a high-power current mirror.

Due to the cathode being floating, you cannot regulate it from the low side and you have to do it via the high side.

If you use the transistors as a resistor, their non-linearity means that they are fairly difficult to control and the current transistion would be sudden.

So here is my solution - totally unproven: use two p-channel mosfets to form a current mirror, with one of the mosfet in parallel with the led string. The other mosfet's drain goes to ground through a current sink controlled by your mcu. This current sink could be a constant current source with a voltage input (typically done by an opamp + npn).

Thanks for the tip on using a current mirror, I wouldn't had ended up there probably without your tip smiley I found similar thread from Parallax forums with the following design for driving LEDs (with UP04401 PNP composite transistor and 2SC5658 general purpose NPN transistor)



I found possibly functioning design examples from datasheetarchive.com which I have to study a bit.
« Last Edit: October 28, 2012, 07:50:03 am by petteri_t » Logged

Troy, NY, USA
Offline Offline
Newbie
*
Karma: 0
Posts: 20
Finnish in USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I calibrated the light output with the previously desribed "brute force" npn-pnp combination, and got the following light output as a function of the duty cycle (8bit, 0-255). Light output was quasilinear from ~125 until 255 which was indeed not very good use of duty cycle (black line - linear regression):

« Last Edit: October 26, 2012, 05:27:51 pm by petteri_t » Logged

Troy, NY, USA
Offline Offline
Newbie
*
Karma: 0
Posts: 20
Finnish in USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
You happen to have any insights what to look for when trying to find similar example circuits / projects?

Yes, I am thinking about a high-power current mirror.

So here is my solution - totally unproven: use two p-channel mosfets to form a current mirror, with one of the mosfet in parallel with the led string. The other mosfet's drain goes to ground through a current sink controlled by your mcu. This current sink could be a constant current source with a voltage input (typically done by an opamp + npn).

I did some more research on this topic, and found a nice summary on current sources/mirrors by Rod Elliott mainly taken from "Designing Analog Chips" by Hans Camenzind. So there I picked up the Four Transistor Circuit Mirror circuit (Figure 11b):



And then tried to find a transistor array with all the four transistors thermally coupled but ran into some problems as most components seemed to be for low current applications (e.g. That 300 series, 20 mA),and the high current ones were in mA-range for example at 100 mA (Intersil CA-3083). The ULN2075B Quad NPN Darlington switch could take 1.5 A with the downside of slowing down the response times a bit due to the Darlington design.

So when not finding really high current (more than 1 A) PNP arrays (or P-channel MOSFET arrays) I decided to try to build the idea around the ULN2075B, however I was not quite sure about how to implement the constant current part for the current mirror branches. I would not like to use some fixed resistor values as at least LED current should be able to be varied from the constant current source, thus changing voltages across the transistors and ideally the circuit would not be that picky in regard to voltage supply if I want to put more LEDs in series for example.

So would the low-cost constant current circuit of the following Instructables work? A bit like replacing the resistors from Recom's example sheet using current mirror to balance current for parallel LED strings (Figure 7 on Page 9).

So my bare design without the constant current blocks looked like that:



And if I add the constant current parts with a limiting resistor of 0.5 ohms (R6 and R8) for 1 A then the circuit would look like that:



The ~V_in taken from the emitters of the Darlingtons would correspond to the supply voltage of the Instructables that was allowed to vary between 2 and 18 volts in the Instructables still getting the constant current operation.

So as a summary, do you think dhenry that this would be a feasible alternative to what you proposed or did I miss something and the circuit would not work as designed while waiting to get the transistor array?
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If I recall correctly, your led driver will be providing a constant current and the purpose of the current mirror is really to divert current away from your leds without letting the driver know.

If that is true, you will need pnp current mirrors, and switch on your "current shunt" on the low side.

That is not what your circuit is trying to do.
Logged

Troy, NY, USA
Offline Offline
Newbie
*
Karma: 0
Posts: 20
Finnish in USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If I recall correctly, your led driver will be providing a constant current and the purpose of the current mirror is really to divert current away from your leds without letting the driver know.

If that is true, you will need pnp current mirrors, and switch on your "current shunt" on the low side.

That is not what your circuit is trying to do.


That is very true, so okay for the clarification, and clearly I messed a bit when trying to ensure constant current operation. I updated the circuit with PNPs, and it looks like that:



And I have to try to find the matched PNP pairs or quad arrays
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
it looks like that:

I don't fully understand the purpose of having T2, as that leg of the mirror should be shunting the led so nothing should be there (other than the led driver's current sensing resistor).

T1 turns on / off the shunt. So what is LED1?
Logged

Troy, NY, USA
Offline Offline
Newbie
*
Karma: 0
Posts: 20
Finnish in USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
it looks like that:

I don't fully understand the purpose of having T2, as that leg of the mirror should be shunting the led so nothing should be there (other than the led driver's current sensing resistor).

T1 turns on / off the shunt. So what is LED1?

You mean if I put the shunt and the LED in parallel the shunt would take all the current? I thought that the resistance of the LED would be so small so that if I shunt the LED driver via the switching transistor T1 then I would need another leg of the mirror to take the LED current or did I misunderstood this?

So the LED1 is the LED that I want to control and which would be normally connected to the LED driver, and then for example with 50% duty cycle half of the time the T1 leg would take the 1000 mA of the LED driver and half of the time the T2 leg would take the 1000 mA.
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
You mean if I put the shunt and the LED in parallel the shunt would take all the current?

Since the shunt is one half of a current mirror, how much current it will take depends on the current you designed for the other leg of the current mirror.
Logged

Pages: 1 2 [3]   Go Up
Jump to: