"high" power led dimmer circuit not working.

Hi.

I have this circuit which purpose is to control the brightness of an LED through serial. (see the attachment for schematic)
So here is the calculations.

The TIP120 has a DC current gain of 1000, and the LED needs 350 mA at full power.
That gives 350mA/1000 = 0.35 mA at the base, am I correct?

The TIP120 has a forward voltage of 2.5V as far as I can see from the datasheet, so if I want 0.35 mA at the base, I have to use a 7K resistor. Arduino output 5V - forward voltage = 2.5V

(2.5V/0,00035A)=7142 ohm.

Are the calculations correct?

So I tried to test circuit, and it didn't worked properly. If I send 0 at the serial port, the LED would become a little bit dimmer, barely visible, and if I send 255 at the serial port, the LED would become a little bit brighter.

No, you do not use the gain - that is the parameter of interest when
using the device as a signal amplifier. As a switch you want enough
base current to saturate the device. A 1k resistor might be about right.

BUT more importantly your circuit cannot work, its not a switching
configuration at all.

You need a common-emitter configuration, NOT emitter-follower. With
an NPN device that means the switching is done on the low side of the
load.

HOWEVER you are switching the whole DC-DC converter at PWM
speeds which is a very bad idea, since it has significant capacitance
built in.

You need to switch the LOAD, not the power supply for the load.

So, assuming the DC-DC converter has constant current output (ie designed
for LEDs), move the transistor to the output of the converter, emitter to ground,
collector to load.

[ What is the part number / datasheet for the DC-DC converter? ]

MarkT:
So, assuming the DC-DC converter has constant current output (ie designed for LEDs), move the transistor to the output of the converter, emitter to ground, collector to load.

And of course, if it is a constant-current driver, that is not going to work either!

Okay I have tried to draw a new schematic.

I brought the DC-DC converter here https://eud.dx.com/product/mini-dc-dc-voltage-stabilizer-regulator-module-red-844126106#.VVhHwJfhC_4 I don't think it's a constant-current driver.

So the gain parameter is only interesting if I am using it as an amplifier am I right? And why do I need a resistor, and should it not be as small as possible, like 220 ohm, then I would waste less power?

You need a resistor in the base of the transistor to limit the base current.
You need a constant current regulator to drive a 350mA LED.

Boye:
And why do I need a resistor, and should it not be as small as possible, like 220 ohm, then I would waste less power?

The resistor controls how much current goes into the gate and out the emitter. The useful work is the current going through the collector and out the emitter, so you want to use as large a resistor on the gate as you can to eliminate the wasteful current coming in the gate -- but not too large that you don't turn the transistor fully on.

Regarding using that DC/DC converter I'd suggest trying to get a wire onto pin 5 of the LM2596 (the rightmost pin) and use that as a "DIM" pin. You need to grab your soldering iron and lift that leg off the board then solder a wire onto it. Digital low (or floating) turns the output on and digital high (>2V) turns it off. But beware that it doesn't have a sharp on/off time; there's enough granularity for dimming but it has a noticeably slow off time (1/4 sec?). But that might be the 470R resistor and 5mm LED I'm using on the output that slows it down.

But all in all this is a bad way to be doing things. You have to get that output voltage just right to avoid burning out the LED. But, you got me curious if it could be done so take it as you will.

You have to get that output voltage just right to avoid burning out the LED.

And that voltage will have to change depending on the temperature of the LED, the ambient temperature, and the age of the LED. In short it is best to set the voltage dependent on the measured current, which is what a constant current supply does all by its self.

So if this is a bad way to control the led, how should I do it?
The end project is going to be 4 12v led panels hooked up to a car battery and controlled with an Arduino through IR.

PS. Thanks for the help :slight_smile:

The end project is going to be 4 12v led panels

What does a panel consist of?

You can connect several LEDs in series up to a total forward volt drop of about 2V lower than your supply.
For each series chain like this you need a constant current supply.

One way to make a constant current supply is shown in the attached circuit. But there are many other ways to make them.

A panel does not consist of multiply LEDs, but 1 of these: http://eud.dx.com/product/10w-1050lm-3000k-1-led-warm-white-light-ceiling-spotlight-lamp-yellow-silver-dc-12-14v-844195839

I would highly recommend the AMC7135 and AMC7140.

These are, respectively, a fixed 350mA current limiter, and one adjustable up to 700mA.

The 7135's can't be used with series strings, but the 7140 can be.

For the 7135, PWM the low side. Don't stress about the caps; I never use them, and it doesn't seem to mind.

For the 7140, there's a special pin you're supposed to pwm, and you do need a cap on the supply.

But you said:-

and the LED needs 350 mA at full power.

and that page said:-

Features Current: 720mA

There is a world of difference between the two. We can only give sensible answers if you give us the correct data.

Sadly that page does not give enough information as to what it actually is and if if works off just an applied voltage or it needs a driver like this one:-
http://eud.dx.com/product/jr-led-10w-800lm-3176k-48-cob-led-warm-white-light-module-w-driver-silver-yellow-dc-12-14v-844371166#.VVo8hWbxqvU

That panel absolutely does consist of multiple LEDs. You can see when running on low voltage, when the lights just start to come on, you'll see that there are like 16 or 24 LEDs in there - something like that. They're well under 1W per LED, unlike the common LED panels (the square ones that go up to 150W+ ), which have 1 LED per spec'ed watt, and that's why you see the improved efficiency and higher price (those are an unusually good price for COB panels like that) - LED efficiency falls off as a function of the current per unit area due to carrier recombination at high current.

Also why COB LEDs are so expensive - more dies per watt :wink:

Om sorry for the incorrect data.
The test was done with a 350mA led, which the original question was about, but the end result should be, so I can control 4 of 10w led panels in pairs of two with PWM.

A 4- or 6-LED constant current shield might solve your problems.

Leo..