Author Topic: How do I drive LEDs without flicker ?  (Read 13897 times)

0 Members and 1 Guest are viewing this topic.

Offline DeadlyChemistTopic starter

  • Regular Contributor
  • *
  • Posts: 51
  • Country: de
How do I drive LEDs without flicker ?
« on: March 15, 2022, 10:28:39 pm »
Hey,
First some background:
I have been struggling with LED lights for 4 or 5 years (or maybe more...)
They usually fall in multiple of these categories:
unpractical / big / super expensive | (never bought)
awful color quality | (skin looks green/magenta, super hard to remove in post even with correct tint/WB)
too dim (the placement in my room is pretty bad so need multiple ones anyways but that’s fine)
flicker, flicker, flicker, I like to make nice videos and I like to be creative with my framerate and shutter angle
They just die very fast due to probably overheating?

What I plan to make:
Custom celling lights!
Decent quality (~95 Ra ~90 Re) light
High Brightness
Underdriven LEDs on a big heatsink (should increase the life massively)
RGB-whatever for casual party (and red to keep nightvision)
basically a overkill light I can enjoy and fix for many years to use both as a room light, recording light (well, from above at least) and other purposes
everything should be dimmable (more below).

What I have:
bunch of designs, tests
Basically got the heatsinks/frame figure out, as well as Decent Quality LEDs, basic idea of the software, what features I want, over-whatever protection, both software and automatic (like fuses, other things)

What I don’t have:
didn’t order many parts (more below)
a working LED driver ☹ (more below)
fan-less power-supply (I’ll deal with it last myself, don’t worry about it)

So basically
First thing I went for is well, googling, after hours of looking at sold out super expensive chips , I resorted to ask on random discords, everyone suggested PWM, but I feel like that would flicker pretty badly? (please tell me)
later someone suggested using lm2596 CC CV module like THIS looking at this diagram from some weird website LINK it shouldn’t flicker? It’s only 300mV at 48kHz (also I would use max 1A per module)

I already had one and bunch of 5W leds, so powered them up on nearly max (mistake), pointed my camera (120fps 8.6°) and didn’t find any flicker also made sure they can deliver 1A over long time while being pretty insulated (they got warm but not really hot)

So instead of using a trimmer to set the voltage and current, I set the voltage using trimmer and used a MCP 4461-103E/ST MCP 4461-103E/ST digital potentiometer for current (ordered 8, needed 6 to power 1 light)
took me about 6.5h to write a working I2C code… oh well
so I pointed my camera at 5W LED and used I2C to change the potentiometer wiper position (because the potentiometer controls the current to the LED) and well, it flickers, badly

I repeated the experiment with unmodified lm2596 module, used pots to set the current lower and lower… the flicker appears, gets worse and worse. So I feel like lm2596 is dead path? Please let me know!

I’m pretty sure I can throw these chips away (put into “forever” parts bin) which well, my fault, didn’t test enough but kind of unfortunate ☹

But anyways, what options do I have? How do I dim a light without flicker, I feel like even at 1MHz there will be flicker (let’s say I rented phantom v2512 and shot video at 500k fps and 10° shutter speed, for whatever reason) isn’t there another way than PWM? Or am I just wrong?

For white leds (majority) I don’t really need “infinite” brightness levels, I’d say 10 is ok, but seamless would be even better. For RGB it’s a must because of mixing.

Also I would prefer something “easy”, I do not have 100’s of euros to just prototype and find out 99% does not work. My budget for the project was 200€ per light, but would end up at around 300€ (the drivers were 30-40ish euro I think)
The leds I wanna use are 23V 300mA (would limit to 225mA) cool white + warm white in 4x4 matrix so 32 LED dies but was thinking to put them in 2x pairs (I know one should not do this) (plus like 5 rgb ones in the middle…)

What options do I have?, Please help !
note: by flicker i mean anything from visible turning on-off to weird bands on the walls or similar. when i test with sunlight or battery and resistor, i do not get that
« Last Edit: March 15, 2022, 10:31:31 pm by DeadlyChemist »
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8517
  • Country: us
    • SiliconValleyGarage
Re: How do I drive LEDs without flicker ?
« Reply #1 on: March 15, 2022, 10:38:38 pm »
you need a current mode driver. a LINEAR one, not switching.
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 
The following users thanked this post: cdev

Offline DeadlyChemistTopic starter

  • Regular Contributor
  • *
  • Posts: 51
  • Country: de
Re: How do I drive LEDs without flicker ?
« Reply #2 on: March 15, 2022, 10:44:25 pm »
Can i have an example please? also how would i change the current with a microcontroller? (i.e. get dimming working)
 

Offline DeadlyChemistTopic starter

  • Regular Contributor
  • *
  • Posts: 51
  • Country: de
Re: How do I drive LEDs without flicker ?
« Reply #3 on: March 15, 2022, 11:22:15 pm »
For low/no flicker, you need a constant voltage across the LED (PWM won't work). It's preferred to supply an LED with a current source vs a voltage since since the intensity is a much stronger function of current and not voltage.

Switching converters, with enough filtering, should work well (assuming the ripple current is small enough). You might be able to get the 'flicker' down to a few percent of amplitude change.

What you have, a LM2596 module, is a voltage regulator module, but what you want is a current regulator. With that module, you'd need a series resistor to form a "poor-man's current regulator". Sufficient output capacitance is also required, though I expect your module already has that. Provide more details about the particular LED you have (what's its max current, forward voltage range, model number, etc) if you need help determining a reasonable series resistor value. The resistor itself will burn a lot of power, so needs a sufficiently high power rating. If you don't have a series resistor when using that module, I'd guess that the module is hitting an over-current fault condition and causing flicker.

If you need higher efficiency, use a switching converter IC designed for powering a high-power LED, such as LM3402 or LM3406. With these, a capacitor can be added in parallel to the LED in order to reduce the ripple and/or higher-value inductors. With these controllers, the brightness can dimmed based on an input PWM signal.

An oscilloscope may be useful, to be able to measure the LED's voltage ripple.

Also, as free_electron said, the BEST would be using a linear regulator. You'd likely use a DAC (or filter a PWM signal) as an input to an op-amp with a nFET or NPN output transistor, and feedback through a current sense resistor.

(I don't have experience with filming LEDs, so I could be a little wrong.)

Hi, here is the link https://www.aliexpress.com/item/1005003210480731.html they aren't amazing, but decent, the quality is decent

I sadly do not have a scope, storage is premium and pc/handheld ones arent worth it in my opinion

well, also i need to controll it with micro so i can get my brightness adjustment. and i have no idea how to achieve that... 4x4 leds each with 2 channels... so that's 32 leds, 16 if i group then

I dont really care about efficiency... the amount of leds i would use is MAX 170W, so burning like 30W or 50W or whatever in inefficiencies is fine

is there some easy proof of concept i can make/buy and test? 23V 225mA or 23V and 450mA (or maybe someone can do me a favour...)

I really dont know what's best / works, so i'm happy to use whatever you guys offer...
 

Offline OM222O

  • Frequent Contributor
  • **
  • Posts: 768
  • Country: gb
Re: How do I drive LEDs without flicker ?
« Reply #4 on: March 16, 2022, 12:06:56 am »
You can build a constant current source pretty easily, if you have the digital potentiometers, you don't even need to order many more parts.

look at this basic schematic: https://tinyurl.com/yc9kgv2s
The potentiometer acts as a voltage divider to provide a voltage reference between 0 and 5 volts. The op-amp uses that voltage and a reference resistor (100 ohm here) drives the MOSFET so that the output current equals reference voltage/reference resistor (here it would be from 0 to 50 milliamps (5v / 100ohm) ). All of the unused voltage will be applied across the MOSFET, which will heat it up, so make sure to use a heatsink and add as many LEDs in series as possible (to calculate that subtract the max reference voltage (5v) from the supply voltage (12v) and divide by the maximum voltage of the LEDs at their peak current).

If you have time, it'd be worth replacing the voltage source with a boost converter which allows for fine adjusting the voltage, so that the heat dissipated in the MOSFET is always minimum. To do this, just measure the voltage drop across the MOSFET with a differential op-amp that connects to your micro controller's ADC. then use another digital potentiometer to adjust the feedback resistor of the boost convertor so that the voltage across the MOSFET is a low value (for example 500mV). Here is an example of how to do this: Adjust your brightness and set the voltage source to its maximum output value (let's assume 12v). Then measure the voltage between the drain and source of your MOSFET (using differential amplifier connected to ADC).  Assume it reads 2 volts, but you want it to be 500mV, so you need to lower the voltage source by 1.5V (12 - 1.5 = 10.5).
« Last Edit: March 16, 2022, 12:16:53 am by OM222O »
 

Offline DeadlyChemistTopic starter

  • Regular Contributor
  • *
  • Posts: 51
  • Country: de
Re: How do I drive LEDs without flicker ?
« Reply #5 on: March 16, 2022, 12:26:03 am »
You can build a constant current source pretty easily, if you have the digital potentiometers, you don't even need to order many more parts.

look at this basic schematic: https://tinyurl.com/yc9kgv2s
The potentiometer acts as a voltage divider to provide a voltage reference between 0 and 5 volts. The op-amp uses that voltage and a reference resistor (100 ohm here) drives the MOSFET so that the output current equals reference voltage/reference resistor (here it would be from 0 to 50 milliamps (5v / 100ohm) ). All of the unused voltage will be applied across the MOSFET, which will heat it up, so make sure to use a heatsink and add as many LEDs in series as possible (to calculate that subtract the max reference voltage (5v) from the supply voltage (12v) and divide by the maximum voltage of the LEDs at their peak current).

If you have time, it'd be worth replacing the voltage source with a boost converter which allows for fine adjusting the voltage, so that the heat dissipated in the MOSFET is always minimum.

what mosfet would you recommend? what specs am i looking at even?
also, the specs of op-amp shouldn't matter?
i played with the simulation a little... looks like in this case i need 20R or so

how would i calculate the power needed for both resistor and mosfet? like this:
the leds I plan to use are 22.4V maximum
24V power supplies are easy to come by
so let's say i need 8 amps for all of them
so basically (24-22.4)*8 =~16W? how is that split between resistor and mosfet...? 16W does not look like a big deal when you split it up between many modules...
   

The only thing i don't like is that the 0-5V need to be precise-ish, else the current goes way up, but because op-amp is in follower mode + it's a gate of a mosfet I assume we are talking miliamps for 10's of modules?

what should i be cautious of? anything that can be upgraded here? any component I need to take extra care of?

if i wanna control 2 leds, i could just feed 1 pot into 2 opamps and get 2 nearly exactly same current sources?

are there better approaches? (this looks very cheap tho, I like it)
 

Offline OM222O

  • Frequent Contributor
  • **
  • Posts: 768
  • Country: gb
Re: How do I drive LEDs without flicker ?
« Reply #6 on: March 16, 2022, 01:16:23 am »
Power is simply voltage X current. The voltage across the resistor is always going to be exactly the same as the reference voltage (0 to 5v in simulation) and the current is Vref / Rref. The voltage across LEDs depends on their voltage-current curve. Whatever remains (Vsupply - (Vref + Vled)) is applied to the MOSFET. Current will be the same for all of them, so it's a basic multiplication step to find the power (or you can hover your mouse over the component in the simulator to find these values).

The only things to look for: Op-amp MUST be rail to rail input/output for these low voltages, other characteristics don't really matter, but a low input offset (less than 10mV) would be nice. If you want to connect the reference voltage to multiple op-amps, using a voltage follower on the output of the voltage divider would be a good idea.
If you plan on using a 24V supply and 23V LEDs, that leaves 1V for the reference voltage, which means a resistor value of 4 ohms. 1.024v reference ICs should be easy to find and they'll be a perfect fit here.

The only thing to look out for the MOSFET is the safe DC operating area (middle left chart on page 6 of this datasheet: https://www.mouser.co.uk/datasheet/2/308/1/NTP125N65S3H_D-2318962.pdf (there is one table of contents page so it's labeled as page 5 on datasheet itself). For 1 amp, it should be safe to around 100 volts, but this is specified for a temperature of 125c. I think you'll be fine using this for 250mA and a max voltage of less than 10V. It's not a super cheap fet, so feel free to look at other datasheets. If you use a normal fet, you should also drive the Op-amp with a suitable voltage range (12 or 16v). I've never used this IC before but it seems to be a good fit: TLC2252 https://www.ti.com/lit/ds/symlink/tlc2252.pdf?HQS=dis-mous-null-mousermode-dsf-pf-null-wwe&ts=1647392636961. If you can find a logic level fet with a suitable DC operating area, then you can use 5v for the op-amp so something like the MCP6002 would be nice. The only problem is that most logic level fets can't handle 24V drain-source voltage. This is the most annoying part of any project because you have to browse datasheets and use filters to find suitable parts that can work together.

I'm not really sure what you meant by: "The only thing I don't like is that the 0-5V need to be precise-ish, else the current goes way up, but because op-amp is in follower mode + it's a gate of a MOSFET I assume we are talking milliamps for 10's of modules?" can you explain again?

The only thing you need to be careful of would be the op-amp oscillating. You can't really measure this without a scope but you can add resistors and capacitors to the feedback of the op-amp to stabilize it. If you build a prototype and it works, don't worry about it.

I also suggest you control each LED channel separately using copies of this circuit. Have a look at this simulation:
https://tinyurl.com/yccd49w4

The only other approach would be PWM which will cause flickering, if you want a constant current solution, this would be ideal and cheap.

Edit: ignore anything I said about using a boost converter and adjusting the supply voltage. When you drop the current, the voltage does increase across the mosfet, but the decrease in current results in a net reduction in waste power. maximum heat would be at maximum LED brightness, so choose your values based on that.
« Last Edit: March 16, 2022, 02:15:24 am by OM222O »
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 11473
  • Country: ch
Re: How do I drive LEDs without flicker ?
« Reply #7 on: March 16, 2022, 12:23:17 pm »
PWM is fine (and in fact a great choice) if done at a high enough frequency. I made a dimmer (in daily use at home) with a PWM frequency of something like 25KHz, and it’s absolutely flicker free.
 

Offline OM222O

  • Frequent Contributor
  • **
  • Posts: 768
  • Country: gb
Re: How do I drive LEDs without flicker ?
« Reply #8 on: March 16, 2022, 12:27:11 pm »
depending on the framerate of a camera and the drive frequency of the LEDs, there will always be flickering, unless they perfectly sync up (drive frequency being an exact multiple of the framerate). That's exactly why they always use a linear driver for the light sources when filming with a high-speed camera.
 

Online wraper

  • Supporter
  • ****
  • Posts: 16847
  • Country: lv
Re: How do I drive LEDs without flicker ?
« Reply #9 on: March 16, 2022, 12:35:42 pm »
you need a current mode driver. a LINEAR one, not switching.
Why would you need linear? You just need to avoid PWMing the LEDs directly.
 

Offline cdev

  • Super Contributor
  • ***
  • !
  • Posts: 7350
  • Country: 00
Re: How do I drive LEDs without flicker ?
« Reply #10 on: March 16, 2022, 12:53:14 pm »
Is there a way you can use regulated DC?

You just have to avoid an overcurrent situation.
"What the large print giveth, the small print taketh away."
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8168
  • Country: fi
Re: How do I drive LEDs without flicker ?
« Reply #11 on: March 16, 2022, 02:27:13 pm »
Of course a switching converter.

Current controlled, totally.

You can add output capacitance but it isn't really needed; if the converter runs in CCM at some hundred kHz, the "flicker" (really just the inductor current ripple, maybe 30-40% of the intensity, not fully on/off) is at such high frequency it isn't visible to any living object or even high-speed photography!

Of course, high enough frequency PWM is fine too, but there really is no need in general purpose illumination, IMHO. Better use adjustable current in the supply. For very low output level, further PWMing may be necessary, though.

Start by looking at LED driver ICs; typical topologies are buck or boost. Current poor availability of everything makes selection process easier, look what you can buy, and look for current feedback / constant current operation.
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 11473
  • Country: ch
Re: How do I drive LEDs without flicker ?
« Reply #12 on: March 16, 2022, 04:03:37 pm »
depending on the framerate of a camera and the drive frequency of the LEDs, there will always be flickering, unless they perfectly sync up (drive frequency being an exact multiple of the framerate). That's exactly why they always use a linear driver for the light sources when filming with a high-speed camera.
The faster the PWM, the less it matters that it sync up exactly. I have actually tested mine with various cameras. Up to the 1/500s of my DSLR, and even the 240fps slow-mo of my phone. Absolutely no flicker or banding. The frequency is so much higher than the shutter speed that it doesn’t matter.
 
The following users thanked this post: cdev

Offline DeadlyChemistTopic starter

  • Regular Contributor
  • *
  • Posts: 51
  • Country: de
Re: How do I drive LEDs without flicker ?
« Reply #13 on: March 16, 2022, 07:36:54 pm »
EDIT:
I might try with 5R resistor and 1-whatever volt reference
the simulation gives me range between 1mA and 203.8mA
the leds are 300mA leds, but i wanted to drive them at 225mA (75% power)
66% power isn't that bad... not ideal but not bad
or 4.5R, not sure what i can get easily and cheaply (again i have 4x4x2 leds to drive)

PWM is fine (and in fact a great choice) if done at a high enough frequency. I made a dimmer (in daily use at home) with a PWM frequency of something like 25KHz, and it’s absolutely flicker free.

I'm pretty sure it will flicker at at 25k fps and 90° shutter...

depending on the framerate of a camera and the drive frequency of the LEDs, there will always be flickering, unless they perfectly sync up (drive frequency being an exact multiple of the framerate). That's exactly why they always use a linear driver for the light sources when filming with a high-speed camera.
The faster the PWM, the less it matters that it sync up exactly. I have actually tested mine with various cameras. Up to the 1/500s of my DSLR, and even the 240fps slow-mo of my phone. Absolutely no flicker or banding. The frequency is so much higher than the shutter speed that it doesn’t matter.

what shutter speed/angle? 1/500's is only 2ms (if my math is correct)
with my 120fps and 8.6° i'm getting 0.19ms per frame (if my math is correct)

for my tests i just go to 120fps 360° and slowly decrease to 8.6° (can't go lower sadly)

later I import the footage and slow down 2x to 60fps and just watch it and look for weird shit like banding or litteral darker and brighter frames
tried with sunlight and there is none of that weird stuff
tried with the dc-dc converter that apperanty runs at 48khz and you can see terrible results above at lower power

my shutter is rolling so that "helps" with finding such weird things...

Is there a way you can use regulated DC?

You just have to avoid an overcurrent situation.

I'm asking you ? I tried my stuff and it failed so i'd appreciate if you guys can throw another idea (wil the the mosfet one)

The only things to look for: Op-amp MUST be rail to rail input/output for these low voltages, other characteristics don't really matter, but a low input offset (less than 10mV) would be nice. If you want to connect the reference voltage to multiple op-amps, using a voltage follower on the output of the voltage divider would be a good idea.

I can just use another power source or use the 24V for the opamp...
most likely i'll use 3.3V micro but not sure...

yeah iirc op-amps cost pennies so i don't mind...

If you plan on using a 24V supply and 23V LEDs, that leaves 1V for the reference voltage, which means a resistor value of 4 ohms. 1.024v reference ICs should be easy to find and they'll be a perfect fit here.
not sure how that works or what that means but yeah, i'll try these values...
if i want 250mA max then 1W 4R and basically any mosfet with enough voltage? please confirm/deny

The only thing to look out for the MOSFET is the safe DC operating area (middle left chart on page 6 of this datasheet: https://www.mouser.co.uk/datasheet/2/308/1/NTP125N65S3H_D-2318962.pdf (there is one table of contents page so it's labeled as page 5 on datasheet itself). For 1 amp, it should be safe to around 100 volts, but this is specified for a temperature of 125c. I think you'll be fine using this for 250mA and a max voltage of less than 10V. It's not a super cheap fet, so feel free to look at other datasheets. If you use a normal fet, you should also drive the Op-amp with a suitable voltage range (12 or 16v). I've never used this IC before but it seems to be a good fit: TLC2252 https://www.ti.com/lit/ds/symlink/tlc2252.pdf?HQS=dis-mous-null-mousermode-dsf-pf-null-wwe&ts=1647392636961. If you can find a logic level fet with a suitable DC operating area, then you can use 5v for the op-amp so something like the MCP6002 would be nice. The only problem is that most logic level fets can't handle 24V drain-source voltage. This is the most annoying part of any project because you have to browse datasheets and use filters to find suitable parts that can work together.
so what you basically say is, use the 24V power supply or something high for the op-amp and get the cheapest fet with decent characteristics...?

I'm not really sure what you meant by: "The only thing I don't like is that the 0-5V need to be precise-ish, else the current goes way up, but because op-amp is in follower mode + it's a gate of a MOSFET I assume we are talking milliamps for 10's of modules?" can you explain again?
doesn't matter anymore

The only thing you need to be careful of would be the op-amp oscillating. You can't really measure this without a scope but you can add resistors and capacitors to the feedback of the op-amp to stabilize it. If you build a prototype and it works, don't worry about it.

well i'll first try a prototope on breadboard (and post results here...), then probably move to pcb...
also planning inbetween...

The only other approach would be PWM which will cause flickering, if you want a constant current solution, this would be ideal and cheap.

I could have done this years ago with a cheap 100W led with a scrap heatsink and a cheap 100W led driver and a horrible dimmer
"great" for general lighting or soldering or whatever but useless for photo/video (flicker and color quality)


Again, i'm not shooting everyday at 100's of thousands of fps with single digit shutter angle, but i wanna make something that can handle any camera, I do not want to be limited in my creativity just because my lighting sucks (current plan is to make 3 of them...
that would be 9000 lumen cool 9000 lumen warm times 3
it is overkill and unnesecary 99% of the time, but for me it's like buying a ifixit tool tech kit just to take apart a broken nokia 3310, it's investment for later)

are there other good appreaches except mosfet? I'll take a look in few days for parts

next few weeks i would order:
I guess any mosfet that can handle few watts with max 30V or more...
then any op-amp, 1V reference and 4R 1W
powersupplies i have a bunch of things, this is just a test anyways to see if it works
@OM222O please verify
« Last Edit: March 16, 2022, 07:45:15 pm by DeadlyChemist »
 

Offline strawberry

  • Super Contributor
  • ***
  • Posts: 1161
  • Country: lv
Re: How do I drive LEDs without flicker ?
« Reply #14 on: March 16, 2022, 08:14:06 pm »
LM2596 feedback loop oscillate (maybe ~100Hz)due to bad circuit design(or fake IC) . need some oscilloscope waveform and circuits to confirm.
 
 

Offline DeadlyChemistTopic starter

  • Regular Contributor
  • *
  • Posts: 51
  • Country: de
Re: How do I drive LEDs without flicker ?
« Reply #15 on: March 16, 2022, 08:34:50 pm »
LM2596 feedback loop oscillate (maybe ~100Hz)due to bad circuit design(or fake IC) . need some oscilloscope waveform and circuits to confirm.
don't have a scope...
also it oscilated pretty bad at lower power only... again, not sure... cheap module, but had higher hopes

what other options do i have except mosfet?
 

Offline OM222O

  • Frequent Contributor
  • **
  • Posts: 768
  • Country: gb
Re: How do I drive LEDs without flicker ?
« Reply #16 on: March 16, 2022, 09:05:49 pm »
If you have 4x4 LEDs (16 panels), each with a warm and cool channel, you will need 32 copies of the current sink, which is not ideal, but if you choose lower spec parts, it shouldn't be too expensive.

I had another look and this cheaper MOSFET should also be fine:
https://www.diodes.com/assets/Datasheets/DMT6009LCT.pdf

you don't need to drive the op-amp with 24v, 12 to 16V should be enough. It just needs to be able to drive the gate of the MOSFET with a high enough voltage to turn it on, which is around 12v for most MOSFETs. higher voltage op-amps tend to not be rail to rail, but I found this quad-channel one to be reasonably priced: https://www.mouser.co.uk/datasheet/2/308/1/MC33201_D-2315666.pdf
The op-amps don't draw much current, so you can even use an LDO to generate the 12V or 16V from the 24V supply.

I updated the simulation to show you the math of how to budget the voltage for the LEDs, voltage reference, and MOSFET. Instead of connecting a bunch of LEDs, I just used a 22.4 voltage reference.
https://tinyurl.com/y8g4dllr

The power dissipated in the resistor will be around 1 watt at 250 mA, so ideally choose a higher rated resistor. A better choice would be buying a pack of 1 ohm, 1-watt resistors, and connecting 4 in series to get a 4 ohm, 4-watt resistor (dissipating the heat over multiple components). This should end up being cheaper and give you more flexibility in the range of values you can create. For example, to get 4.5R, you can put 2 1R in parallel to get 0.5R, then put that in series with 4 1R to get 4.5R.

You don't need to buy the exact parts I posted, anything similar should be fine. buy a few for prototyping and if it worked as you expected, then order the parts for all 32 channels and design a PCB for it.
« Last Edit: March 16, 2022, 09:12:25 pm by OM222O »
 

Offline DeadlyChemistTopic starter

  • Regular Contributor
  • *
  • Posts: 51
  • Country: de
Re: How do I drive LEDs without flicker ?
« Reply #17 on: March 17, 2022, 01:08:55 am »
The power dissipated in the resistor will be around 1 watt at 250 mA, so ideally choose a higher rated resistor. A better choice would be buying a pack of 1 ohm, 1-watt resistors, and connecting 4 in series to get a 4 ohm, 4-watt resistor (dissipating the heat over multiple components). This should end up being cheaper and give you more flexibility in the range of values you can create. For example, to get 4.5R, you can put 2 1R in parallel to get 0.5R, then put that in series with 4 1R to get 4.5R.
found
this
and
this
i assume both will work?
i'd rather use 2ohm ones but yeah, this is cheap and small enough so might go with it unless i find 2ohm or so ones, for tests i'll use whatever i find.. maybe even bunch of quarter watt ones

you don't need to drive the op-amp with 24v, 12 to 16V should be enough. It just needs to be able to drive the gate of the MOSFET with a high enough voltage to turn it on, which is around 12v for most MOSFETs. higher voltage op-amps tend to not be rail to rail, but I found this quad-channel one to be reasonably priced: https://www.mouser.co.uk/datasheet/2/308/1/MC33201_D-2315666.pdf
found the MC33204 for 1.14€ or so, 30 cents per op-amp not bad but will look for cheaper tbh, or is there a reason i might want something higher quality?
i'd say i need 4*4*2 opamps and 1*4*2 followers (will make the micro adjust them in pairs of 4) so 40 op amps give or take, might pick some cheapies for followers... not sure yet... it's just following 0-1v (are there reasons why i shouldn't cheap out on followers?)

I updated the simulation to show you the math of how to budget the voltage for the LEDs, voltage reference, and MOSFET. Instead of connecting a bunch of LEDs, I just used a 22.4 voltage reference.
https://tinyurl.com/y8g4dllr
Thank You !

I had another look and this cheaper MOSFET should also be fine:
https://www.diodes.com/assets/Datasheets/DMT6009LCT.pdf
website does not load
found same part tho, 80 cents per piece isn't good but seen worse... maybe 50-70 or less cent range is possible? unless it's not worth the trouble
not sure about thermals either? how many watts can the package get rid off on its own? maybe i can bend it over and mount it to pcb somehow (use the copper/traces as heatsink) (just mount it like smd part...) i dont wanna buy/make 32 heatsinks unless i really have to (please let me know)
1W does not sound like a lot to get rid of (well times 32...)

(the leds will be on a 300x300 heatsink, maybe 400x400 if i feel so (did all the math with overhead already (dont intend to drive both channels at max))
math says with 75% maximum (225mA) at full blast (both channels) i'll reach 51C and 85% maximun (250mA) i'll reach 55C (both channels) (both assuming leds are 30% efficient with room temp 25C)
so might go for bigger heatsinks for the leds... also not sure what the metal part of the mosfet is connected to? source/ground? then i can hook them all up together with 1 heatsink... then use wires to connect to pcb...

also already got a bunch of ideas, might even buy few cheap i2C ADC's and bam, got basically free current measurment for every led (just because I can)

did some math on 1% of 4 ohms... worst case i'm getting +- 0.04ohms which is 3 miliamps difference so that's great

thanks for the help @OM222O!

sorry for overexplaining, i'm pretty bad at electronics, i'd rather avoid stupid mistakes
« Last Edit: March 17, 2022, 01:14:23 am by DeadlyChemist »
 

Offline Circlotron

  • Super Contributor
  • ***
  • Posts: 3178
  • Country: au
Re: How do I drive LEDs without flicker ?
« Reply #18 on: March 17, 2022, 01:39:38 am »
I'd put an inductor in series with the LED on the PWM setup you already have. An inductor always tries to make the current through itself constant, and consequently the LED brightness will be constant. The actual inductance value will depend on the PWM frequency.   
 

Offline DeadlyChemistTopic starter

  • Regular Contributor
  • *
  • Posts: 51
  • Country: de
Re: How do I drive LEDs without flicker ?
« Reply #19 on: March 17, 2022, 01:59:56 am »
I'd put an inductor in series with the LED on the PWM setup you already have. An inductor always tries to make the current through itself constant, and consequently the LED brightness will be constant. The actual inductance value will depend on the PWM frequency.
tempted to try...
bit feel lile that would be a temporary fix...?
can chuck 22uH and try but the option above with mosfet does not sound bad...
 

Offline OM222O

  • Frequent Contributor
  • **
  • Posts: 768
  • Country: gb
Re: How do I drive LEDs without flicker ?
« Reply #20 on: March 17, 2022, 04:21:35 am »
I made a really stupid mistake and instead of using (I^2) * R, I just calculated I*R  :palm: the power dissipated in the resistor is actually 250mW, not 1 watt.
both resistors should be fine, although 2512 is a huge package. I think if you use 4 1206 ones you should be fine. Or maybe find a 1 watt 4R 2512. Depends on how much time you want to spend on soldering.

MC33204 seems like a really nice part. You can try to find cheaper (if you search for 1 channel op-amps with similar specs, you can find many that are cheaper, but it makes soldering them a nightmare if you have about 40 to solder. Feel free to have a look for them though. It'll usually be cheaper if you buy in quantity (buying 10 is actually cheaper than buying 8 ) and 10x4 = 40 op-amps, which should be enough for everything. You can try to cheap out on the voltage follower but it would be buying a separate part for no reason.

To see how hot the package gets, multi[ly the thermal resistance by the power dissipated in the MOSFET. The best packages are TO-220 and DPAK. If you want to solder it to a large copper area, DPAK would be easier to use. This one is about 0.5€ if you buy 30 of them.
https://www.mouser.co.uk/datasheet/2/308/1/FQD7N10L_D-2313768.pdf

It actually won't be dissipating more than half a watt (simulation says 150mW) so I wouldn't worry too much about heat sinking them, but the most important thing is the safe DC operating area. You can try cheaper MOSFETs that don't have a DC operating curve, but they may die after a while. I personally wouldn't take my chances with that.

If you want to use an ADC, a much better option would be buying some thermistors and using the ADC to measure temperature instead of current, because you're setting the current using the digital potentiometer and it'll be fairly accurate with 1% resistors.

using inductors/capacitors to smooth out the PWM doesn't sound like a bad idea either, you can try both methods.

If you decide to go with my method, it would be a good idea to design a PCB that can only drive 4 MOSFETs (one quad-channel op-amp) and have connectors for daisy-chaining them together (VCC, Vref, GND, etc.) then you can build 8 of them to drive all of your LEDs. This would be easier than designing a massive PCB with all components on 1 board. If you want, I can help you with the PCB design as well.
« Last Edit: March 17, 2022, 04:35:36 am by OM222O »
 

Offline DeadlyChemistTopic starter

  • Regular Contributor
  • *
  • Posts: 51
  • Country: de
Re: How do I drive LEDs without flicker ?
« Reply #21 on: March 18, 2022, 01:20:25 am »
I made a really stupid mistake and instead of using (I^2) * R, I just calculated I*R  :palm: the power dissipated in the resistor is actually 250mW, not 1 watt.
both resistors should be fine, although 2512 is a huge package. I think if you use 4 1206 ones you should be fine. Or maybe find a 1 watt 4R 2512. Depends on how much time you want to spend on soldering.
My time is free, i'll just buy whatever i can get really

MC33204 seems like a really nice part. You can try to find cheaper (if you search for 1 channel op-amps with similar specs, you can find many that are cheaper, but it makes soldering them a nightmare if you have about 40 to solder. Feel free to have a look for them though. It'll usually be cheaper if you buy in quantity (buying 10 is actually cheaper than buying 8 ) and 10x4 = 40 op-amps, which should be enough for everything. You can try to cheap out on the voltage follower but it would be buying a separate part for no reason.

will go with the MC33204 can't be bothered to look elsewhere...  cheap enough
as for followers, might pick something else, not sure as of now
gives me a solid base i guess

To see how hot the package gets, multi[ly the thermal resistance by the power dissipated in the MOSFET. The best packages are TO-220 and DPAK. If you want to solder it to a large copper area, DPAK would be easier to use. This one is about 0.5€ if you buy 30 of them.
https://www.mouser.co.uk/datasheet/2/308/1/FQD7N10L_D-2313768.pdf
found it only here
but i really dislike mouser (stupid fees)
will look for something else (unless you can recommend something? (more below))

It actually won't be dissipating more than half a watt (simulation says 150mW) so I wouldn't worry too much about heat sinking them, but the most important thing is the safe DC operating area. You can try cheaper MOSFETs that don't have a DC operating curve, but they may die after a while. I personally wouldn't take my chances with that.

yeah, the mosfet looks good, good enough, again, i'd rather overspec...
 might even buy this and slap it on aswell

If you want to use an ADC, a much better option would be buying some thermistors and using the ADC to measure temperature instead of current, because you're setting the current using the digital potentiometer and it'll be fairly accurate with 1% resistors.

Im actually planning to use 3 (in different spots) ds18b20 one-wire thermometers (as they are cheap and easy to use + can be chained)
might even use more as they are dirt cheap, get a heatmap of the heatsink, just because i can lol (more reasons why i'm making my own stuff, i can make it how i want it to be)

If you decide to go with my method, it would be a good idea to design a PCB that can only drive 4 MOSFETs (one quad-channel op-amp) and have connectors for daisy-chaining them together (VCC, Vref, GND, etc.) then you can build 8 of them to drive all of your LEDs. This would be easier than designing a massive PCB with all components on 1 board.

yeah, this would be split obviously + would make a spare pcb when in few years something finally gives up
as for daisy chaining, i don't mind running lots of wires... (excuse when i don't know how todo something lol)

If you want, I can help you with the PCB design as well.
thanks !
I willl need that in few months, for now first need todo few tests (few questions below)
i prefer to use EasyEDA because it's easy + i order from JLCPCB anyways, I don't wanna exploit you into making a full PCB design, so not sure, maybe i'll just send you file from there or something to just look over
this will be in months from now anyways

Another question:
I'll be using 6 of them (18W variant) (will look kinda stupid, 5 would be better) unless you know an easy way to get 8 or 9 working? voltage between 2.2-3.6V *6 pieces that's 13.2V-21,6V at 500mA
if i go into simulation and make a 13.2V led @500mA with 24V psu (worst case scenario)
I get 5.2W on mosfet
and 0.5W on resistor
I assume i can use same op-amp as they are overkill anyways
as for mosfet i think DMT6009LCT with heatsink sounds good but 5W is still a lot to sink
adding more leds won't work because 2.2-3.6V*7 >24V
do you know of a way to approach/solve this? also how bad is my assumption of "worst case scenario"? i can deal with the 5W of heat but rather not

Again, thanks for the help :)
didn't even know this easy path exists

will start drawing schematics/writing final features-list as well as build of materials
might take few weeks...
« Last Edit: March 18, 2022, 01:23:20 am by DeadlyChemist »
 

Offline OM222O

  • Frequent Contributor
  • **
  • Posts: 768
  • Country: gb
Re: How do I drive LEDs without flicker ?
« Reply #22 on: March 18, 2022, 04:05:21 am »
Edit:
DMT6009LCT has a thermal resistance of 55c/w which means it can't get rid of more than 1 watt without a heatsink, if you want to dissipate 5 watts, you will definitely need some sort of heatsink. The ones you posted don't seem to be designed for MOSFETs, I would try searching for TO-220 heatsink. If you want to use the ones you listed, you need to create a large copper area that you can place those heatsinks on, or you may want to try the suggestion below.

There sadly isn't an easy way to add more LEDs because the voltage will be too high and you don't have an adjustable output boost converter, but yes, you can use the same circuit to drive those as well. If you want to dissipate the 5 watts over multiple components, you can put a small resistor in series with the LEDs (voltage drop across it will be I*V and power dissipated will be (I^2)*R) this will reduce the load on the MOSFET and distribute the heat over multiple components. You should only need to do that for the lower voltage LEDs (red and yellow). At 500mA you can dissipate 250mW for each ohm of resistance. Here is a quick simulation and you can see without the resistor, the MOSFET is dissipating 5 watts, but with the series resistor, it's about 1.5 watts and the rest is dumped into the resistor. Again you can spread the load across many resistors to avoid the need for a high power 5-watt resistor (for example 7 2R resistors or 14 1R resistors).

https://tinyurl.com/yblq3z6p

I don't mind designing the PCBs either and I have used easyEDA before so that should be fine. I think you'll like a few of the tricks that I use when designing boards. Just make sure to build a breadboard prototype first to make sure the op-amp will be stable and won't oscillate. If it did, it'll be an easy fix (2 resistors and a capacitor) but you need to know that before designing the final version of the circuit.
« Last Edit: March 18, 2022, 07:23:39 am by OM222O »
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 5895
  • Country: es
Re: How do I drive LEDs without flicker ?
« Reply #23 on: March 18, 2022, 06:13:41 am »
I've used these (380mA version), it's a step-down, non-isollated DC/DC constant current driver.
It's high frequency so you shouldn't get any flickering.
If so, then it's input ac ripple, increase the input capacitor to 22-100uF.

By default it limits the voltage to ~90V (has 100V output capacitor).
I modified It for 250Vout, just by changing the resistor ratio and output capacitor, so it could drive a 50W led board (Needs at least ~215V).
The current can be modified easily by changing the another resistors.
I've tested it from 10 to 50W, didn't overheat.
Can't remember the details of the driver IC, but it was pretty capable.
https://a.aliexpress.com/_vlrQJB
« Last Edit: March 18, 2022, 06:17:17 am by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline DeadlyChemistTopic starter

  • Regular Contributor
  • *
  • Posts: 51
  • Country: de
Re: How do I drive LEDs without flicker ?
« Reply #24 on: March 22, 2022, 10:02:59 am »
DMT6009LCT has a thermal resistance of 55c/w which means it can't get rid of more than 1 watt without a heatsink

https://tinyurl.com/yblq3z6p

yeah, i'll worry about it later

I don't mind designing the PCBs either and I have used easyEDA before so that should be fine. I think you'll like a few of the tricks that I use when designing boards. Just make sure to build a breadboard prototype first to make sure the op-amp will be stable and won't oscillate. If it did, it'll be an easy fix (2 resistors and a capacitor) but you need to know that before designing the final version of the circuit.

I'll let you know, will use the offer

few days ago i ordered one of the leds, should be here in 1-2 months
will try to get the current-voltage relationship/characterize it to get a better model
also size, brightness and other factors

will also try to get few parts to test the op-amp and mosfet setup

I've used these (380mA version), it's a step-down, non-isollated DC/DC constant current driver.
It's high frequency so you shouldn't get any flickering.
If so, then it's input ac ripple, increase the input capacitor to 22-100uF.

By default it limits the voltage to ~90V (has 100V output capacitor).
I modified It for 250Vout, just by changing the resistor ratio and output capacitor, so it could drive a 50W led board (Needs at least ~215V).
The current can be modified easily by changing the another resistors.
I've tested it from 10 to 50W, didn't overheat.
Can't remember the details of the driver IC, but it was pretty capable.
https://a.aliexpress.com/_vlrQJB

yeah i will pass, because with dc-dc or anything switching the current i feel like there will be some framerate/shutter speed which makes flicker... i am so done with flicker
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf