Author Topic: Help with LED Driver Circuit  (Read 2443 times)

0 Members and 1 Guest are viewing this topic.

Offline LuchikTopic starter

  • Newbie
  • Posts: 9
  • Country: il
Help with LED Driver Circuit
« on: July 18, 2018, 09:39:49 am »
I would appriciate your help, regarding this LED driver circuit i'm working on. Please see the attached schematic file.

I am using Diodes/BCD boost IC for driving a constant 400mA trough two HP-LED components: Green and Red.
I also have two push buttons that can turn-off one of the colors, if needed (I may use toggle switch instead of push buttons). I do that by simply shorting the LED via a MOSFET transistor.
I need to use more than one transistors for switching, since i have to connect the push buttons to 3V power (for very specific reasons - it will eventually be connected to an external 3V-IC, not push buttons).

My questions:
- Will it work?
- Should I be worried about shorting the two push-buttons together? (I do not have much experience with LED drivers, will it still provide 400mA trough the short?).
- when I push one of the buttons, the voltage drop will be smaller than the input voltage (of 5V). Should I be worried about it?

Please advise.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: Help with LED Driver Circuit
« Reply #1 on: July 18, 2018, 10:19:14 am »
That's a disaster.   As soon as you short out one LED, the AP3032K will loose control of the current.  Short out both, and  it will certainly let the magic smoke out.   The problem is your choice to use a CC boost chip.  That forces you to put the LEDs in series so the total Vf is greater than the supply voltage.

You need two separate buck chips (one for each LED) capable of being used for constant current, with enable pins.   Alternatively, if you need *fast* on/off modulation of the LEDs, two separate buck chips + MOSFETs to short out each LED
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19520
  • Country: gb
  • 0999
Re: Help with LED Driver Circuit
« Reply #2 on: July 18, 2018, 10:39:25 am »
The idea of using a constant current source and shorting the LEDs is not a bad one, but this implementation will not work. A boost converter can't regulate its output, once the output voltage drops below a diode drop of its input voltage. Look at L1 and D5. The inductor can be treated like a piece of wire at DC, which leaves the output connected to the input voltage, via a diode. When the output voltage is greater, than the input, the diode is reverse biased, but when the output, is less than the input voltage, the diode becomes forward biased, causing the output voltage to rise, whatever the controller does. If a single LED were connected to the output, it would smoke, since its forward voltage, is much less than 5V.

The P-MOSFETs will also never turn fully on, unless a negative gate voltage is applied and Q5's symbol is wrong and is connected incorrectly. The body diode's anode connects to the drain and cathode to the source, so it will conduct, causing the LED to be permanently short circuited.

As mentioned above: use two separate buck converters for each LED. A single constant current converter could be used, but it would need to be able to output both lower, than input, as well as higher, than input voltage, which rules out both buck and boost topologies. One could use: SEPIC, a transformer (flyback, or forward converter), buck-boost etc. but it's unlikely to be cheaper than two buck converters.
« Last Edit: July 18, 2018, 10:45:26 am by Hero999 »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: Help with LED Driver Circuit
« Reply #3 on: July 18, 2018, 11:02:32 am »
A single constant current converter could be used, but it would need to be able to output both lower, than input, as well as higher, than input voltage, which rules out both buck and boost topologies. One could use: SEPIC, a transformer (flyback, or forward converter), buck-boost etc. but it's unlikely to be cheaper than two buck converters.
.... and you'd also have the complexity of providing adequate drive to the transistors shorting the individual LEDs, and level shifting the control signal to the top one.   It just isn't worth it compared to using individual drivers for each LED.

 

Online mariush

  • Super Contributor
  • ***
  • Posts: 5026
  • Country: ro
  • .
Re: Help with LED Driver Circuit
« Reply #4 on: July 18, 2018, 12:04:16 pm »
It would be easier and probably cheaper to just use two buck led drivers.

For example, Diodes Inc. AL8860 is 40 cents in small quantities (<18 cents if you buy 1000) and has a control pin which allows you to turn off or on the output, or adjust the brightness either through pwm or a voltage ( off = < 0.2v  brightness 0..100% = 0.3v .. 2.5v , and also set max current with resistor, up to around 1A) .... so just tie to ground with a mosfet or transistor or with microcontroller pin and you turn off your led.

It's high frequency, so you can use small inductors, and buck regulators are  also more efficient than boost regulators...

Here's datasheet : https://www.diodes.com/assets/Datasheets/AL8860.pdf and digikey link : https://www.digikey.com/product-detail/en/diodes-incorporated/AL8860WT-7/AL8860WT-7DICT-ND/6226981

AL8861 is almost same price, but can do more current and may be available in other packages if those are better for you.
 

Offline LuchikTopic starter

  • Newbie
  • Posts: 9
  • Country: il
Re: Help with LED Driver Circuit
« Reply #5 on: July 18, 2018, 02:49:32 pm »
Thank you so much for all your answers!
I prepared a fixed version, based on your remarks - see attached.
This time I am using a trimmer-potentiometers instead of push buttons.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19520
  • Country: gb
  • 0999
Re: Help with LED Driver Circuit
« Reply #6 on: July 18, 2018, 03:03:36 pm »
Thank you so much for all your answers!
I prepared a fixed version, based on your remarks - see attached.
This time I am using a trimmer-potentiometers instead of push buttons.
Looks good to me. The only problem is it will only work up to full brightness, when the "3V OR 5V" node is at 5V. If it's set to 3V, the voltage into the control pin will be 1.5V, when the potentiometer is at its maximum setting, giving a maximum duty cycle of 60%.
 

Online mariush

  • Super Contributor
  • ***
  • Posts: 5026
  • Country: ro
  • .
Re: Help with LED Driver Circuit
« Reply #7 on: July 18, 2018, 03:12:47 pm »
I don't see anything really wrong with it.

My only comment would be about those sense resistors, not sure 250mOhm would be a common, easy to source from multiple vendors and all that ... may want to go with 270 mOhm (which will lower your peak current through the led at around 370mA but the led driver is only around 5% accurate anyway so it may actually help the life of the led by not running at 100% all the time)

270 mhm would be a standard value, like 470mOhm or 560mOhm ... you could parallel 2 x 560 mOhm to get 280 mOhm and therefore around 360mA of current through led.
Yeah, consider how important it is to adjust brightness or not, and think how reliable those trimpots are. May want to add a jumper or something to which you could solder wires and add button (to have a physical on/off button without losing the brightness setting ... you just have to tie down CTRL to ground to put the driver in standby.

So you could easily add a slide switch or something to have [ all off - red on - green on -  red and green on - all off ]  or something similar.

Pay attention to the inductor selection and the the graphs in the datasheet about  input voltage vs maximum current ... see page 7 and onwards.  follow the advice and instructions in the datasheet.
Pay attention to layout and how the current flows, keep loops small as possible... get that diode as close as possible to the Vin pin... 
 

Offline PCChazter

  • Contributor
  • Posts: 23
  • Country: ca
Re: Help with LED Driver Circuit
« Reply #8 on: July 19, 2018, 02:20:43 am »
Why not just use a transistor with a set base current to limit the collector current, then just run the LED off of your 5v rail, since you are going to use a 3V logic signal to trigger it anyways? Less parts and cheaper. The base resistor will limit the base current, which will in turn set your collector current to your LED. Which resistor you use will depend on the transistor you use.

I did a parametric search on digikey, and the BC817 seems like a good pick. It has a max collector current of 500mA, a VBE of 1.2V, and an HFE (gain) of 40 at 500mA. If you want 400mA collector current, you want a base current of 10mA, which means a 180Ohm Rb resistor would work.

Of course, the HFE is a bit variable depending on environment, so you would have to determine yourself if this is adequate for your application, and you may not choose the BC817, so you would have to determine your Rb for your application.
« Last Edit: July 19, 2018, 02:23:51 am by PCChazter »
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19520
  • Country: gb
  • 0999
Re: Help with LED Driver Circuit
« Reply #9 on: July 19, 2018, 08:45:04 am »
Why not just use a transistor with a set base current to limit the collector current, then just run the LED off of your 5v rail, since you are going to use a 3V logic signal to trigger it anyways? Less parts and cheaper. The base resistor will limit the base current, which will in turn set your collector current to your LED. Which resistor you use will depend on the transistor you use.

I did a parametric search on digikey, and the BC817 seems like a good pick. It has a max collector current of 500mA, a VBE of 1.2V, and an HFE (gain) of 40 at 500mA. If you want 400mA collector current, you want a base current of 10mA, which means a 180Ohm Rb resistor would work.

Of course, the HFE is a bit variable depending on environment, so you would have to determine yourself if this is adequate for your application, and you may not choose the BC817, so you would have to determine your Rb for your application.
That's a bad idea.

The Hfe is not a well controlled parameter and varies widely, from device to device, even with the same part number and temperature: it increases, the hotter the device gets. Look at the data sheet for the BC817. For the BC817-25, with a collector current of 100mA, and voltage of 1V, it can vary from 160 to 400. The power dissipation is also far too high for the BC817. The data sheet says 350mW maximum. A red LED will drop about 2.2V and the current is 400mA, giving a 2.8V drop at 400mA across the transistor, which would be a power dissipation of 1.12W!
https://www.diodes.com/assets/Datasheets/ds11107.pdf

A much more sensible solution is to add an emitter resistor and drive the base at a constant voltage. The voltage across the emitter resistor will then be equal to VB = VBE and the current VE / RE. The Hfe is now unimportant and can be removed from the equation.

Of course the solutions discussed here are linear and therefore very inefficient, which is why the original poster decided to go for a switched mode regulator.

« Last Edit: July 19, 2018, 09:36:38 am by Hero999 »
 
The following users thanked this post: Ian.M, PCChazter

Offline PCChazter

  • Contributor
  • Posts: 23
  • Country: ca
Re: Help with LED Driver Circuit
« Reply #10 on: July 22, 2018, 05:18:34 am »
The Hfe is not a well controlled parameter and varies widely, from device to device, even with the same part number and temperature: it increases, the hotter the device gets. Look at the data sheet for the BC817. For the BC817-25, with a collector current of 100mA, and voltage of 1V, it can vary from 160 to 400. The power dissipation is also far too high for the BC817. The data sheet says 350mW maximum. A red LED will drop about 2.2V and the current is 400mA, giving a 2.8V drop at 400mA across the transistor, which would be a power dissipation of 1.12W!
https://www.diodes.com/assets/Datasheets/ds11107.pdf

A much more sensible solution is to add an emitter resistor and drive the base at a constant voltage. The voltage across the emitter resistor will then be equal to VB = VBE and the current VE / RE. The Hfe is now unimportant and can be removed from the equation.

Of course the solutions discussed here are linear and therefore very inefficient, which is why the original poster decided to go for a switched mode regulator.



Right...1.12W is quite a bit for a transistor to dissipate, not sure where my head was with that one. I have used it in the past for low power (SMD) LEDs and haven't had a problem, which is why I thought of it, but you're absolutely right, it's inefficient, and would not suite OP's application. As well, the HFE being unreliable, but I had mentioned that as being something to consider whether or not it would be suitable. So thank you for showing the emitter resistor setup as an alternative.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf