Flickering LEDs when drivers are in parallel? - Page 1
Forum section: electronics / projects

author: Artlav
author_rank: Frequent Contributor
timestamp: July 06, 2014, 09:01:41 pm
content: Good evening.I made a controllable LED driver with ZXLD1360 and attiny85, running 3 series white LEDs at 500mA from 12V.It works perfectly when it is alone.But when i connect several of these in parallel (one battery, each with it's own LEDs), the lights start to flicker.No signal wires attached, attiny outputting full bright by default.One - all is well.Two or more - both are flickering.The flicker is faint, but nerve-jarring - the lights dim and brighten slightly at what feels like 5-15Hz.I've been staring at the schematic, i've been probing with a scope for any difference - nothing.Anyone have an idea what is going on here?Schematic (it's ZXLD1360 even though it says otherwise):Layout:

author: David_AVD
author_rank: Super Contributor
timestamp: July 06, 2014, 09:12:11 pm
content: Bypass (remove) the micro first to make sure it's not causing the modulation.Have you tried adding a bulk capacitor (say 470uF) to the input of each board?

author: Artlav
author_rank: Frequent Contributor
timestamp: July 06, 2014, 10:01:33 pm
content: Quote from: David_AVD on July 06, 2014, 09:12:11 pmIt is the important part of the issue - driving at lower PWM values increase the apparentness of the flicker.In what way can it cause this?Quote from: David_AVD on July 06, 2014, 09:12:11 pmYes, no effect.

author: tautech
author_rank: Super Contributor
timestamp: July 06, 2014, 10:14:25 pm
content: From the ZXLD1360 DatasheetQuoteIt seems you are not following manufacturers recommendations.Further to this, it is wise to add decoupling caps to the V+ rails at all IC devices.

author: ajb
author_rank: Super Contributor
timestamp: July 06, 2014, 10:29:04 pm
content: The low frequency flicker is probably happening at beat frequencies of the current waveforms of the different modules. Slight variations in PWM frequency/driver switching frequency will cause the respective current waveforms of two or more modules to move in and out of phase with one another and the waveforms will alternately add or cancel resulting in lower frequency/higher amplitude total current fluctuations. Those interact with the impedance of your supply and you get voltage fluctuations the produce flicker.Were the caps that you added low ESR types, and did you fit them as close as possible to the driver as the datasheet indicates?

author: Psi
author_rank: Super Contributor
timestamp: July 06, 2014, 10:40:26 pm
content: yeah, add a 0.1uf ceramic between micro VCC and GND (near the pins)and do the same for the ZXLD1360

author: georges80
author_rank: Frequent Contributor
timestamp: July 06, 2014, 11:04:11 pm
content: You say you are driving the LEDs at 500mA, but you have a potential divider that will create 2.5V into the ADJ pin of the zxld1360 which means 200% drive, i.e. 1000mA to the LEDs.Your layout is 'electrically' correct, but quite awful for a switcher that is pushing 1A output. The ground connection is pretty nasty - just a long routed trace. I see no ground planes or flooded copper areas. Also, the inductor on the PCB looks tiny - is it rated for the job you are trying to do? i.e. push 1000mA to the LEDS?What PWM frequency are you using? What duty cycle? Have you measured ripple voltage at the LED? Current? How long are the leads to the LEDs?cheers,george.

author: Artlav
author_rank: Frequent Contributor
timestamp: July 07, 2014, 05:16:53 am
content: Quote from: georges80 on July 06, 2014, 11:04:11 pmInteresting, i haven't considered that.The datasheet does not explicitly state what PWM voltage to use, but lists the pin voltages between 0.2V and 2.5V, or up to 6V abs. max.So i limited the voltage from the attiny pin tp within the first range.What i'm seeing is 0.5A, or 0.1V across the 0.2Ohm resistor, being PWM-ed to approximate 0.35A, so apparently it's not getting overdriven to 1A.Not sure how good of a solution is that - what would be a right way to PWM-drive these?Dimming PWM is at 256Hz, 75% max, LED is on the opposite side of the board, a few cm of leads.Quote from: ajb on July 06, 2014, 10:29:04 pmTried electrolytics at each driver's connector.Somehow i can't visualise such beats that propagate outside over power lines.It's not beats in the light itself - if i obscure one LED, the other one still flickering.

author: mij59
author_rank: Frequent Contributor
timestamp: July 07, 2014, 05:51:04 am
content: The typical application circuit of the ZXLD1360 uses a 0.1 Ohm resistor, why do use a 0.2 resistor ?The pwm frequency will vary per ZXLD1360 , so it could be a optical interference.Put a 1 uF capacitor across the led output.

author: Artlav
author_rank: Frequent Contributor
timestamp: July 07, 2014, 08:52:20 am
content: Quote from: mij59 on July 07, 2014, 05:51:04 amTo set the max current at 0.5A.LED is only rated for 350mA, with 0.1 Ohm the valid control is only range 0-24 out of 255, and there is no fail safety in case of software bugs.With 0.2 Ohm it's naturally limited at 0.5A, and the control range is 0-180, with some reserve of overdrive capability over 0.35A.Quote from: mij59 on July 07, 2014, 05:51:04 amDon't think so - if i obscure one of the LEDs completely, the other still appear to be flickering.

author: mij59
author_rank: Frequent Contributor
timestamp: July 07, 2014, 09:16:36 am
content: Quote from: Artlav on July 07, 2014, 08:52:20 amGood point !The led strips may act as antenna's, if you put the 1uF capacitor on the output the ripple current through the decreases.

author: georges80
author_rank: Frequent Contributor
timestamp: July 07, 2014, 04:20:58 pm
content: Quote from: Artlav on July 07, 2014, 05:16:53 amRefer to the datasheet:Multi-function On/Off and brightness control pin:• Leave floating for normal operation.(VADJ = VREF = 1.25V giving nominal average output currento IOUTnom = 0.1/RS)• Drive to voltage below 0.2V to turn off output current• Drive with DC voltage (0.3V < VADJ < 2.5V) to adjust output current from 25% to 200% ofIOUTnom• Drive with PWM signal from open-collector or open-drain transistor, to adjust output current.• Adjustment range 25% to 100% of IOUTnom for f>10kHz and 1% to 100% of IOUTnom for f <500Hz• Connect a capacitor from this pin to ground to increase soft-start time.(Default soft-start time = 500?s. Additional soft-start time is approximately 500?s/nF)Note that the reference is 1.25V, so driving 2.5V will adjust the output current to be 200% of the IOUTnom (i.e. 1000mA in your case). If you are only getting 500mA (or somewhere near that) with 2.5V at the adj pin, your inductor may be saturating. Again, what inductor are you using?I asked about measurements in my post (ripple voltage etc), please take them and report back. Again, your PCB layout is poor for a switcher design. Noise injected into the adj node and sense nodes will cause instability (which will appear as flicker). I design LED drivers for a living, so have some experience in the many issues that can occur with poor layout.The datasheet describes various PWM frequency ranges (low freq and high freq) and explains the two approaches.I would suggest you disconnect the PWM signal to the adj pin and observe whether you still have a flicker issue.cheers,george.

author: Artlav
author_rank: Frequent Contributor
timestamp: July 07, 2014, 06:30:39 pm
content: Quote from: georges80 on July 07, 2014, 04:20:58 pmSorry, i couldn't try anything until evening, which is now, so i only commented on what i had answers for from before.The thing grows more and more mysterious.One thing got clearer - i took a better look at the input voltage, and there is a very interesting ripple there.But it does not seem to go away no matter what i do.With following total of modifications:-1uF replaced with 10uF ceramic at the ZXLD input.-Added 100uF electrolytic at the input.-Changed voltage divider to 3k/1k, to put PWM into 1.25V range.-One of the 1k resistors turned out to be 200 Ohm resistor, fixed (102 and 201 look almost exactly the same on 0805...)Ripple on the input, AC coupled:The beats are at 5Hz, just right for the flicker frequency.The large ripple is at 250Hz, the PWM control frequency.I missed that one before, not taking a wider time span into account.Current:For some inexplicable reason the current is now 100mA, no matter what i do.Tried changing the resistors back or changing PWM values - no effect.But it never been anything but a flat-ish line, no signs of saturation.Inductor is 47uH, 5 mm in diameter.No idea which part number or current limit, but it never saturated judging by what is on the sense resistor.Whatever the heck is going on here, it does not add up to the datasheet.

author: Artlav
author_rank: Frequent Contributor
timestamp: July 07, 2014, 06:48:46 pm
content: Well, problem solved.When the issue seems mysterious, check your assumptions.Turns out the battery was almost dead.I replaced it with a PSU, and everything was suddenly working perfectly and as expected.The 1k/1k gave out 200% current, 3k/1k gave out 100% current, no ripple on power rails, etc.Important changes were - capacitors and 1.25V resistor divider on PWM.Thanks everyone for advice!