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

0 Members and 2 Guests are viewing this topic.

Offline DeadlyChemistTopic starter

  • Regular Contributor
  • *
  • Posts: 51
  • Country: de
Re: How do I drive LEDs without flicker ?
« Reply #25 on: April 07, 2022, 07:54:41 pm »
Small Update:

someone on discord told me the 21.0v-22.4v characteristic is incorrect and the range is WAY wider (starting at like 15v)

ordered one last month

tested Warm White today:
Voltage   Current
18,90   17,20
19,50   43,90
20,00   66,00
21,00   130,00
22,00   230,00

the voltage might be inaccurate but the range seems close enough

assuming worst 19V and 50mA
that's about max 250mW to burn on the low end

will also try to see how the defusing/color mixing works
only had it powered for few minutes but already like it, the warm isn't super red, just slightly warm, cold didn't try yet

will work on the driver/buying parts i think next month
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 5896
  • Country: es
Re: How do I drive LEDs without flicker ?
« Reply #26 on: April 07, 2022, 09:12:25 pm »
What I posted is a constant current regulator (not direct pwm drive), thus no flickering.
Add a decent mains capacitor to avoid any 50/60Hz ripple and should be fine.
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline OM222O

  • Frequent Contributor
  • **
  • Posts: 768
  • Country: gb
Re: How do I drive LEDs without flicker ?
« Reply #27 on: April 21, 2022, 02:01:46 pm »
Did you manage to test the circuit? did any of the parts arrive?
 

Offline DeadlyChemistTopic starter

  • Regular Contributor
  • *
  • Posts: 51
  • Country: de
Re: How do I drive LEDs without flicker ?
« Reply #28 on: April 21, 2022, 07:43:03 pm »
Did you manage to test the circuit? did any of the parts arrive?

I haven't ordered any yet (money problems + monitor needs replacing, beeing jobless sucks lol)

I ordered 1 Led to test the color (great!) and tested voltage-current curve (more above)
also ordered CHEAPEST 50 mini heatsinks for like 5€ will slap them on the final product (i dont mind weight)

Will order some parts prob next month or month after... depends how cheap i can get a 32 inch 144hz or higher used monitor on ebay... *sigh*

Will post more updates by then

What I posted is a constant current regulator (not direct pwm drive), thus no flickering.
Add a decent mains capacitor to avoid any 50/60Hz ripple and should be fine.

Will stick to the current method... these regulators would be more expensive as i have 4*4 matrix + 2 channels each... so would need 32 of these boards...
 

Offline cdev

  • Super Contributor
  • ***
  • !
  • Posts: 7350
  • Country: 00
Re: How do I drive LEDs without flicker ?
« Reply #29 on: April 29, 2022, 01:10:19 pm »
LEDs simply require a DC voltage and current, a given LED will require a steady current amount.. say 20 ma might be typical for a given LED.

So they will provide a constant current driver. They sometimes use PWM above the frequency most eyes can detect flicker. So its not DC buy it looks like DC.

You could use DC but how do you vary it? PWM uses duty cycle.. on and off.

Computers do this for their fans.

They vary the time on and off.


« Last Edit: April 29, 2022, 01:16:39 pm by cdev »
"What the large print giveth, the small print taketh away."
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3342
  • Country: nl
Re: How do I drive LEDs without flicker ?
« Reply #30 on: April 29, 2022, 02:18:04 pm »
TLDnR.

There are two different conceptual problems here.

First, When LED's are PWM'ed they blink at the PWM frequency, unless the PWM circuit has some way to keep the LED current steady, for example with an inductor in series with the LED's.
Even high PWM frequencies can interact with the shutter time of camera's.

Second:
When changing the dimmer setting, the light outputs may change in "steps".
I think you need at least 14 bits of resolution before the individual steps become small enough to be unnoticeable.

And even then, you will probably always see a big difference between 0 and 1, and also between 1 and 2.
Human eyes are very sensitive to changes in brightness.
 
The following users thanked this post: tooki

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 5896
  • Country: es
Re: How do I drive LEDs without flicker ?
« Reply #31 on: April 29, 2022, 05:20:02 pm »
so would need 32 of these boards...
What? It's using rectified mains. Put them in 8series*4parallel array with 0.1R balancing resistors, you'll get 160-180Vf.
I've driven a 100W ~200Vf led array with it, just had to replace the output capacitor and the voltage limiter feedback resistor which is 100V by default in that design. The controller can handle up to 400V or something like that.
It's a high frequency buck converter, you don't get any flickering at xxxKHz, the only possible issue could be being a non-isolated converter, not a problem if you properly ground the lamp.
« Last Edit: April 29, 2022, 05:30:29 pm 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 #32 on: June 08, 2022, 12:52:30 am »
Update:

bought 16x MC 33204 (the op amp)
only need like 10 but yeah, i prefer spares than paying shipping again

most likely next month will get the transistors as the fees on mouser are bit expensive :/

with resistors I will deal some other time (at pcb desigh state), and voltage reference i have no clue what to pick.
 

Offline OM222O

  • Frequent Contributor
  • **
  • Posts: 768
  • Country: gb
Re: How do I drive LEDs without flicker ?
« Reply #33 on: June 09, 2022, 02:29:52 pm »
The voltate refrence isn't critical here, buy whatever is cheapest / easiest to find. It can even be as simple as a 1v zener but to be honest since you only need 1, I'd go with a 1.024 IC because they're more stable.

For PCB, you need to design 2 boards: a control board that produces the different voltage levels for each LED (control board) which houses the voltage refrence, digital pot, micro controller etc. Then you have to design a second board that has the mosfet, op amp and sense resistors (power board) which takes VCC (24v) and the control voltages from the control board. If you're using the quad op amp, each power board can handle 4 LEDs
 

Offline DeadlyChemistTopic starter

  • Regular Contributor
  • *
  • Posts: 51
  • Country: de
Re: How do I drive LEDs without flicker ?
« Reply #34 on: June 10, 2022, 01:19:44 pm »
The voltate refrence isn't critical here, buy whatever is cheapest / easiest to find. It can even be as simple as a 1v zener but to be honest since you only need 1, I'd go with a 1.024 IC because they're more stable.
yeah, i'll just get something from digikey/lcsc when im ordering the transistors/resistors there, temperature sensors, thermal/current fuses and other stuff i'll most likely get from aliexpress, good enough for me

For PCB, you need to design 2 boards: a control board that produces the different voltage levels for each LED (control board) which houses the voltage refrence, digital pot, micro controller etc. Then you have to design a second board that has the mosfet, op amp and sense resistors (power board) which takes VCC (24v) and the control voltages from the control board. If you're using the quad op amp, each power board can handle 4 LEDs
thats a worry for later, also found another small issue, but that can be dealt with later
once i get the transistors and run few tests i'll make schematics...

thanks for your help !
 

Offline wraper

  • Supporter
  • ****
  • Posts: 16849
  • Country: lv
Re: How do I drive LEDs without flicker ?
« Reply #35 on: June 10, 2022, 03:05:42 pm »
temperature sensors, thermale /current fuses and other stuff i'll most likely get from aliexpress, good enough for me
Most if that is usually counterfeit on Aliexpress and in most cases dirt cheap on LCSC, unless you want western branded stuff. And using counterfeit fuses is not smart as minimum and potentially very dangerous.
 

Offline DeadlyChemistTopic starter

  • Regular Contributor
  • *
  • Posts: 51
  • Country: de
Re: How do I drive LEDs without flicker ?
« Reply #36 on: June 18, 2022, 02:35:37 am »
temperature sensors, thermale /current fuses and other stuff i'll most likely get from aliexpress, good enough for me
Most if that is usually counterfeit on Aliexpress and in most cases dirt cheap on LCSC, unless you want western branded stuff. And using counterfeit fuses is not smart as minimum and potentially very dangerous.

true, but i trust them enough actually, they arent that bad + fuses are only ment for huge overcurrents anyways, the only thing i won't order from questionable sources is the power supply

as for counterfeit stuff, i usually don't care, they perform the same way as original ones as the margin of error is huge (never had issues when fixing stuff with ebay/alli junk)
and stuff like "normal" caps or resistors, i can't care enough, never had issues (because never needed precision parts?)



guys, might need help with the transistor, i dont think i wanna pay 50€ or more for 40 transistors because both digikey and mouser have like 20€ fee..., (technically need only 32 but 40 would be good)
i need something available in more places :/

also i'm moving across country next month (600 km) so this project will get delayed by about few months untill i can pack and unpack all my gear and start working on this again... *sigh* + money ofc
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 11473
  • Country: ch
Re: How do I drive LEDs without flicker ?
« Reply #37 on: June 18, 2022, 11:33:14 am »
Well yeah, it’s stupid to pay the 20€ shipping for small orders. If you need 30€ of product, just spend 25€ more on other stuff you need so that you hit the minimum for free shipping (€50). I always maintain a list of low-priority things I want, but don’t need urgently, to use as “padding” for small orders, be it soldering supplies, standard components I’m getting low on, wire, tools, microcontroller boards and eval boards I wanna play with, etc.
 

Offline tepalia02

  • Regular Contributor
  • *
  • Posts: 100
  • Country: bd
Re: How do I drive LEDs without flicker ?
« Reply #38 on: June 18, 2022, 12:54:31 pm »
Constant current LED driver circuits may help.
 

Offline DeadlyChemistTopic starter

  • Regular Contributor
  • *
  • Posts: 51
  • Country: de
Re: How do I drive LEDs without flicker ?
« Reply #39 on: June 18, 2022, 02:12:57 pm »
Well yeah, it’s stupid to pay the 20€ shipping for small orders. If you need 30€ of product, just spend 25€ more on other stuff you need so that you hit the minimum for free shipping (€50). I always maintain a list of low-priority things I want, but don’t need urgently, to use as “padding” for small orders, be it soldering supplies, standard components I’m getting low on, wire, tools, microcontroller boards and eval boards I wanna play with, etc.

EDIT: the fuses seem like a crappy idea tbh, the leds can do max of 300mA but willing to drive them with 250mA, looking at blow characteristics https://belfuse.com/resources/datasheets/circuitprotection/ds-cp-c2q-series.pdf it just looks like crappy idea tbh.

true, but then not sure what could i want from digikey, ~35€ is the max i can think of, unsure what i can fit for 15€, i rarely need electronics parts and when i do i just buy a bunch of random kits for aliexpress to have
for 35€ i can get 50 transistors (need 32) 200 1ohm resistors (need 32*4) and 2 voltage references (need 1)
this gives me spares when i do break something, which is good !

maybe i can get some overpriced fuses
maybe this https://www.digikey.de/de/products/detail/bel-fuse-inc/C2Q-300/615176 300mA fuse, 40 of them = 10€, kinda useless but yeah... could get it

ideas?

Constant current LED driver circuits may help.
this is what i'm trying to build
« Last Edit: June 18, 2022, 02:19:50 pm by DeadlyChemist »
 

Offline OM222O

  • Frequent Contributor
  • **
  • Posts: 768
  • Country: gb
Re: How do I drive LEDs without flicker ?
« Reply #40 on: June 22, 2022, 10:21:48 am »
Before ordering large quantities of parts, it's always worth buying a few to test the circuit with those specific components. RS usually has most ICs / transistors in stock and you can buy them in low volume.

For 15 bucks you can get 2 or 3 different micro controller boards to play around with. I'm not sure if you used STM 32, Pi Pico or ESP 32 before, but they're fun to play with.
 

Offline DeadlyChemistTopic starter

  • Regular Contributor
  • *
  • Posts: 51
  • Country: de
Re: How do I drive LEDs without flicker ?
« Reply #41 on: June 22, 2022, 01:56:04 pm »
Before ordering large quantities of parts, it's always worth buying a few to test the circuit with those specific components. RS usually has most ICs / transistors in stock and you can buy them in low volume.
True, but i'd rather buy everything/too much than pay 18€ shipping/50€ total next time
would order 50 trannies, 2 references, 200 1R 1/2W resistors and some other stuff (more below)

For 15 bucks you can get 2 or 3 different micro controller boards to play around with. I'm not sure if you used STM 32, Pi Pico or ESP 32 before, but they're fun to play with.
already got some, also digikey is bloody expensive
what i picked is random IR leds (diff wavelenght) not super accurate but crudy way to test what my camera can/cannot use as nightvision.

also could you please check if this voltage reference is good enough (probably overkill)/easy to use? https://ww1.microchip.com/downloads/en/DeviceDoc/20005474E.pdf
i assume i should grab some parts for "5.1.1 BASIC APPLICATION CIRCUIT"
is there anything else i should add?
« Last Edit: June 22, 2022, 01:59:49 pm by DeadlyChemist »
 

Offline OM222O

  • Frequent Contributor
  • **
  • Posts: 768
  • Country: gb
Re: How do I drive LEDs without flicker ?
« Reply #42 on: June 22, 2022, 09:09:57 pm »
I have no idea what "5.1.1 BASIC APPLICATION CIRCUIT" is  ???

The reference you chose is definitely good enough with 0.1% accuracy and 20mA drive capability  :-+
 

Offline DeadlyChemistTopic starter

  • Regular Contributor
  • *
  • Posts: 51
  • Country: de
Re: How do I drive LEDs without flicker ?
« Reply #43 on: June 22, 2022, 10:34:26 pm »
I have no idea what "5.1.1 BASIC APPLICATION CIRCUIT" is  ???

The reference you chose is definitely good enough with 0.1% accuracy and 20mA drive capability  :-+
look at the datasheet page 15.

will also order 2.2µ and 300pf, ceramics, in big package (1206, 3216 metric) so it's even easier for me (both good brands)

willl update here once i order and receive the parts, might run a test as well

thanks for the help !
 

Offline DeadlyChemistTopic starter

  • Regular Contributor
  • *
  • Posts: 51
  • Country: de
Re: How do I drive LEDs without flicker ?
« Reply #44 on: June 29, 2022, 11:40:47 pm »
okay the parts from digikey arrived !

so I don't want to make any drama or anything but holy sh*t that's a LOT of plastic  :-//

Anyways: here is the rundown:
FQD7N10LTMCT-ND - MOSFET N-CH 100V 5.8A DPAK (50)
RNCP1206FTD1R00CT-ND - RES 1 OHM 1% 1/2W 1206 (200)
MCP1501-10E/SN-ND - IC VREF SERIES 0.1% 8SOIC  (got 2)
1276-1072-1-ND - CAP CER 2.2UF 25V X7R 1206 (5)
399-C1206C301J5GAC7800CT-ND - CAP CER 300PF 50V C0G/NP0 1206 (5)
other orders:
MCP 4461-103E/ST - digital pot quad channel 256 step (7)
MC 33204 DG  - op amp 4 channel SO-14 (15?)

I did try a setup with 1 op-amp, 5v source, 10R resistor and no potentiometer, just some resistors
it did work, kinda?
was very touchy, probably because of beeing on a breadboard and mid air
also the current wasn't right, at all, should have been 300mA was like 100mA, should be 600mA was like 250mA
i assume this is because breadboard + no resistors/caps anywhere

here the the plan:
https://tinyurl.com/2d2zq6m7 - simulation does not work anymore, but will be relevant

basically i would use EasyEDA to make the curcuit and later maybe @OM222O can help with the PCB because you guys know tricks, i don't... or maybe he can do both, that be appreciated, more below

the led grid will be 4x4 and every led has 2 channels
because everything is quad channel (pot, op-amp)
i assume the best is to fit 1 quad potentiometer which will control 8 leds, 2 zones x 2 colors x 2 leds
this would give me current control over 2 leds at a time
if you imagine the grid beeing like this:
11 12 13 14
21 22 23 24
31 32 33 34
41 42 43 44

also every number having W for warm and C or cold
first board would allow me to control current to:
11C + 12C (pair) (one pot, 2op amps, 1 follower)
11W + 12W (pair) (one pot, 2op amps, 1 follower)
13C + 14C (pair) (one pot, 2op amps, 1 follower)
13W + 14W (pair) (one pot, 2op amps, 1 follower)
i could split it from 2 to 1 or expand it from 2 to 4 (basically have 4 zones/rows)
but if i split it, i need more digital pots (i only have 7 i think)
and if i expand it to 4 to would be messier design

or maybe we put the follower and potentiometer on the same board as arduino/raspi ? that would be even better now i think? and 1 board is 4 leds (instead of 8), so 11W, 11C, 12W, 12C and takes 2 signals/voltages 0 - 1.024v

I dont know the best way, please let me know what's smartest

anyways, please add/or let me know what and where caps/resistors for stability/stop oscilations from the opamps/followers as well as general stability

the mains (well, 24v) fuse will go in circuit without a board, but if you have ideas what to add on the board, let me know !

i will also need a carrier board for the leds, but that will come later

don't need the full pcb design now, just approx size/plans
currently my next step is getting the heatsinks, however im in a middle on moving 600km

thanks, this wouldn't be possible without your help ! (i will set up github and everything once im mostly done)
« Last Edit: June 30, 2022, 01:01:50 am by DeadlyChemist »
 

Offline John B

  • Frequent Contributor
  • **
  • Posts: 800
  • Country: au
Re: How do I drive LEDs without flicker ?
« Reply #45 on: June 30, 2022, 02:44:26 am »
I'm in the process of making something similar to you. I would echo some sentiments in that you should try to make a small batch of units (like 5 tops) and actually using them and testing them for a good while. I'm working on a lighting project, where I have about ~30 LED driver boards, ~20 LED driver PSU boards, ~20 microcontroller boards etc. I purchased a lot of components ahead of time (I was also mindful of the supply chain shortages) and then radically changed the design halfway, and while I have been able to reuse the vast majority of components, a lot of things like inductors, switchmode LED drivers, and capacitors aren't going to be used leaving me with a lot of money tied up in components I'm not sure I'll get around to using in a reasonable time frame.

Also have you looked into automated assembly? I am hand soldering, and have literally thousands of components to solder, lol FML. I would have looked into partial automated assembly. It would have been a massive help even just to do the cheap resistors and caps.
 

Offline DeadlyChemistTopic starter

  • Regular Contributor
  • *
  • Posts: 51
  • Country: de
Re: How do I drive LEDs without flicker ?
« Reply #46 on: June 30, 2022, 02:36:46 pm »
Also have you looked into automated assembly? I am hand soldering, and have literally thousands of components to solder, lol FML. I would have looked into partial automated assembly. It would have been a massive help even just to do the cheap resistors and caps.

expensive + i actually enjoy soldering, it's a nice activity to have while having some beer and youtube
so most likely i'll do everything by myself

for now i need a final design/schematic with all the stuff (please help)
meanwhile im working on getting money for the heatsink (+ making the actual heatsink, yikes...)
but again, i'm in middle of moving right now, so the project is going slow...
 

Offline OM222O

  • Frequent Contributor
  • **
  • Posts: 768
  • Country: gb
Re: How do I drive LEDs without flicker ?
« Reply #47 on: June 30, 2022, 04:51:18 pm »
The current not being what you expect is a very good sign that the op amp that is driving the mosfet is oscilalting. I'm away from home now so can't give detailed inatructions on how to fix it, but a simple test would be adding a 100 ohm resistor between the output of the op amp and the mosfet gate. If that doesn't fix it, 2 resistors and 1 capacitor should do the job. I'll post that tomorrow when I have time.

Edit: something like this usually fixes even the worst oscillations: https://electronics.stackexchange.com/questions/162351/why-is-my-op-amp-oscillating

If this doesn't fix the issue then the mosfets don't have enough "gain" ( I think it's called trans conductance). I'm pretty sure I checked the fets current capability at 5v Vgs, but I'll double check later.

Edit 2: how did you calculate the current? 10R and 5V is a max of 500m, so 600 is impossible even with no load 🤔 I'd double check that
« Last Edit: June 30, 2022, 05:41:00 pm by OM222O »
 

Offline DeadlyChemistTopic starter

  • Regular Contributor
  • *
  • Posts: 51
  • Country: de
Re: How do I drive LEDs without flicker ?
« Reply #48 on: June 30, 2022, 09:17:17 pm »
Edit 2: how did you calculate the current? 10R and 5V is a max of 500m, so 600 is impossible even with no load 🤔 I'd double check that
tried 3.3v, 5v and also other resistances, so my math was correct i hope lol

Edit: something like this usually fixes even the worst oscillations: https://electronics.stackexchange.com/questions/162351/why-is-my-op-amp-oscillating

If this doesn't fix the issue then the mosfets don't have enough "gain" ( I think it's called trans conductance). I'm pretty sure I checked the fets current capability at 5v Vgs, but I'll double check later.
the voltage is 1v from reference remember? 4 ohms 1 volt?

i wont be able to test anything in the next ugh, 2 months?
but yeah, might even go straight to PCB, does not cost THAT much

as for oscilations, might take the fix anyways, because i dont wanna find out that it's oscilates at some weird frequency or whatever, i'll chuck a cap wherever i can tbh

just tell me what extra to get
 

Offline OM222O

  • Frequent Contributor
  • **
  • Posts: 768
  • Country: gb
Re: How do I drive LEDs without flicker ?
« Reply #49 on: June 30, 2022, 09:27:18 pm »

I did try a setup with 1 op-amp, 5v source, 10R resistor and no potentiometer, just some resistors
it did work, kinda?

if you put 5v directly across a 10R resistor (ignore MOSFETs or other things) you can have a maximum of 500mA, that's just ohms law!
to calculate current you should divide whatever voltage is at the non-inverting pin (+) of the op-amp by the current sensing resistor.

DO NOT order PCBs if you don't have a working circuit, trust me on that one. if you're worried about the breadboard causing issues, solder the components with short wires (for SMD parts you can buy breakout boards similar to this: https://www.ebay.co.uk/itm/362262676455)

also, your simulation is broken because of the voltage reference you added. I'm not sure how you created the model for it, but the error says there is a wire loop somewhere (most likely connecting the grounds together with no resistor). If you remove it, the sim runs fine.

Edit: If you can give me a schematic of exactly what you tried, that would be helpful.

The only extra components you will need to solve oscillations are resistors and capacitors (I assume you have some common values on hand to test, for example, 100ohm, 1kohm, and 100nF). If you really want to jump straight to PCB design, it's a good idea to include the extra components and not populate them later on.
« Last Edit: June 30, 2022, 10:17:59 pm by OM222O »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf