Go Down

### Topic: constantcurrentiness (Read 5499 times)previous topic - next topic

#### mrboni

##### Nov 15, 2012, 06:02 pm
I'm trying to understand the circuit in figure 12, on page 6 of this data sheet - http://www.onsemi.com/pub_link/Collateral/NSI45090JD-D.PDF

'Dimming using PWM'

I want to use this constant current led driver with a ws2801 pwm driver (also cc) to allow me to control higher power leds with the ws2801, while retaining constant current functionality. I'm loaded with questions -

- What are the two resistors doing in this circuit, and how do I calculate their value?

- Am I right in thinking that while I can have an arbitrarily long chain of leds by supplying sufficient voltage, the maximum current through those leds (and therefore the ccr driver) can be 160mA?

- If need more current capacity than this, I see I can use 2 ccrs in parallel, which presumably will double this to 320mA.  What is figure 11 illustrating then with the use of a resistor on one ccr?  Is it used to set the max current to some value betwwen 160 and 320mA?

- If I need still more current than this, is there a better product or technique I could use? (bearing in mind the source is a pwm signal)

Thanks!

#### Grumpy_Mike

#1
##### Nov 15, 2012, 07:02 pm
Quote
What are the two resistors doing in this circuit, and how do I calculate their value?

Do you mean figure 12?
They limit the current into the base of the transistor (R1) and provide a DC path to ground when the PWM device is not active (R2).
R2 you don't calculate, for R1 you need to know the gain of the transistor you are using and the current you want to switch.

Quote
- Am I right in thinking that while I can have an arbitrarily long chain of leds by supplying sufficient voltage, the maximum current through those leds (and therefore the ccr driver) can be 160mA

Yes, it is the sufficient voltage that is the catch.

Quote
What is figure 11 illustrating then with the use of a resistor on one ccr?

It is showing that the current you regulate on one CCR is mirrored by the second to double the current and split over two devices the heat dissipation.

Quote
If I need still more current than this, is there a better product or technique I could use?

Yes there always is.

#### mrboni

#2
##### Nov 28, 2012, 12:27 pm
Thanks Grumpy.  All made sense and I got it working.

A thought though -  When using led strip like https://www.sparkfun.com/products/10259  Is a constant current driver not the best solution? I've configured a driver circuit to work with a particular length of strip, but now if I want to use a different length, requiring a different current, I'd need to change the value of the current setting resistor.  Is this correct?

If so, is this a situation when a constant voltage circuit is more suitable?

#### Grumpy_Mike

#3
##### Nov 28, 2012, 04:40 pm
Constant current is only useful for being able to omit resistors on small LEDs, power LEDs requiring currents over 60mA, for situations where the LED drive voltage is varying, like in an automobile or when you want a line if LEDs to do the same thing and you can wire them in series.

For strip LEDs like this that are meant to be driven by a constant voltage they are not much good.

#### mrboni

#4
##### Dec 10, 2012, 05:50 pmLast Edit: Dec 10, 2012, 05:53 pm by mrboni Reason: 1
Hi Grumpy.

I just built the attached circuit using a p channel mosfet with a TLC5940 to control the 12v led strip.  It works fine with a single channel,  but I just realised that because the strip is common anode, I can't control each rgb channel independently!  How do I change this circuit to allow me to use common anode?

#### MarkT

#5
##### Dec 10, 2012, 06:14 pmLast Edit: Dec 10, 2012, 06:17 pm by MarkT Reason: 1

I'm trying to understand the circuit in figure 12, on page 6 of this data sheet - http://www.onsemi.com/pub_link/Collateral/NSI45090JD-D.PDF

'Dimming using PWM'

I want to use this constant current led driver with a ws2801 pwm driver (also cc) to allow me to control higher power leds with the ws2801, while retaining constant current functionality. I'm loaded with questions -

I think I understand this - you use the 2801 in constant voltage drive mode and use the NSI45090JD to set current and dissipate the extra power (rather than fry the WS2801).

Note that this device is a particularly poor constant current diode, reducing current to 65% of nominal at 2V, 20% of nominal at 0.5V, and only
properly entering constant current zone at 7V or above - pretty much unsuitable for this task.  There are chips specifically designed for
providing constant current drive to LEDs which this isn't (despite what the datasheet claims).

I suggest telling us which LEDs you are thinking of and what power supply you will be using.

[edit: for an example of a decent LED driver http://www.onsemi.com/pub_link/Collateral/CAT4101-D.PDF ]
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

#### mrboni

#6
##### Dec 10, 2012, 06:27 pm
Thanks Mark, that looks useful for another project.

For this one though, I realised a few posts ago that id don't want constant current as I'm using led strip with integrated resistors!

So I've switched to using a TLC5940 as a pwm source ans a p channel mosfet to amplify the signal.  It works but I've just realised I can't use common anode strip, as described above

#### focalist

#7
##### Dec 10, 2012, 06:43 pm
Use an NPN transistor to switch the ground side.  I've used TIP120, N-Channel MOSFETS, and even 2n2222.  Works great.

Tech note on uber-cheap constant current driver from LM317: http://www.onsemi.com/pub_link/Collateral/AND8109-D.PDF

#### MarkT

#8
##### Dec 10, 2012, 06:46 pm
How much current is the strip needing?  Perhaps you can common several outputs of a TLC5940 - hopefully PWM still works
(assuming all the output drivers use the same counter).

You can also just use Arduino PWM and external n-channel MOSFETs, lose the TLC5940 altogether.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

#### mrboni

#9
##### Dec 10, 2012, 06:52 pmLast Edit: Dec 10, 2012, 07:35 pm by mrboni Reason: 1
A lot - something like 9A.

I need 16 outputs, more than the arduino has (pwm).  Maybe a ws2803 (18 channel version of the ws2801) and a n channel mosfet will do the job?

edit - just remembered why I started using the TLC5940 - 12 bit pwm.  Would be really nice to modify the schematic above to use common anode still...

#### Grumpy_Mike

#10
##### Dec 10, 2012, 10:38 pm
Quote
Would be really nice to modify the schematic above to use common anode still...

Reply #7 told you how to do this.

#### dhenry

#11
##### Dec 11, 2012, 12:00 am
Quote
Would be really nice to modify the schematic above to use common anode still...

Switch from the low side.

#12
ok, thanks guys

Go Up