Load current spread - Page 1
Forum section: electronics / projects

author: Krotow
author_rank: Regular Contributor
timestamp: September 02, 2024, 12:14:41 pm
content: Was asked to redesign the PCB for custom controller circuit used to control 4 load switches and powered from rail mounted 24V 2.5A power supply. I realized that I must spread the the load current in some smart way to avoid brownout an microcontroller. Which happened several times earlier and together with extremely crappy design of current PCB (customer without any EE background who imagined himself as EE engineer) is the cause why previous circuit is now redesigned not by him. Particular circuit has:Atmel328PB MCU (circuit where it is used is basically Arduino Nano circuit with two extra GPIOs minus USB part) with ISL8487EIBZ for communication, 4 extra logic gate packages and 8 status LEDs.Four 24V solenoid valves with 1.25A load current, controlled by ITS4100S-SJ-N load switches.Status panel with buttons and 120+ WS2812B LEDs.MCU with surrounding logic and status LEDs draw up to 1A current. Valves are switched on exclusively - when one is turned on, the rest are inactive. So with inrush current they draw around 2A max for short time. The real pain are panel LEDs which are capable to draw 4A+ without warning. Setting panel brightness to 70-80% (still enough to see the information on panel under direct sun at middle of day) helps, but panel still draw 2-2.5A. And customer wants to install another panel with next 72 WS2812B which will raise current draw to 11A on full brightness. I warned him that this will not work as he wants and he agreed to change PSU to more powerful then. But that is a question for future.For now customer denied my request to replace PSU for another that is capable to give at least 5A because reasons. He considered WAGO 787-1212 as ultimate PSU and cling to it as if his life depended on it. I don't share his "religion" in this aspect, but customer is a king. Now the question is - how to share load current? 1A PPTC which trip above 1.5A for 24V load, 1A LDO for logic and 2-3A switched voltage controller for LED strip would be an answer. But maybe there is some better way? No place for huge shunt resistors and other components unfortunately, because all thing is placed in 72x72 mm box which will not be changed for this particular controller.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: September 02, 2024, 10:30:42 pm
content: Quote from: Krotow on September 02, 2024, 12:14:41 pmYou want to be peak power paranoid.If you know how fast the solenoid valves inrush is, you can current feed a large capacitor.That keeps the MAX solenoid current under a defined limit, but can still deliver higher peaks.Certainly, the high energy LEDs should have a focused SMPS solution and you can lower 24V current here by nudge of the operate LED Vcc down.Specs say min 3.7V, but you may need to measure brightness vs Vcc.The MCU power could be reduced with a switcher too, or change to high brightness LEDs may be simpler and give enough saving ?

author: Smokey
author_rank: Super Contributor
timestamp: September 02, 2024, 10:52:18 pm
content: Cut out the display LED current when you have peak demand on the rest of the system. If it's just charging a coil for a solenoid, the user probably won't even notice the 50ms LED panel drop out.I've worked with those WS2812B LEDs a fair bit. They won't care if you just cut the power. When they come back on, the next data transmission will get picked up and it will keep going as normal.Funny story. Many people that use WS2812B LEDs either undersize the power supply or undersize the wiring so peak current causes voltage drop that can glitch out the uC in the LEDs. Glitches are usually attributed to a "data" problem, but it's usually a power supply problem.

author: Smokey
author_rank: Super Contributor
timestamp: September 02, 2024, 10:53:57 pm
content: Just thought of another one.There are other types of addressable LEDs and use significantly less current at full brightness than the WS2812B. Unless it's an exterior panel you may be able to use the lower current (and lower max brightness) LEDs.

author: moffy
author_rank: Super Contributor
timestamp: September 02, 2024, 11:05:21 pm
content: I think you are being asked to compromise unreasonably by the customer, if he doesn't understand the simple demands of the situation, then sometimes it is better to not have certain jobs.

author: Krotow
author_rank: Regular Contributor
timestamp: September 02, 2024, 11:37:09 pm
content: Quote from: PCB.Wiz on September 02, 2024, 10:30:42 pmI only want to avoid controller brownout. Occasional panel flicker is better than random installation reboot. In worst event combination somebody may become very wet and dirtyNot good, especially at winter.WS2812B works from +5V directly. LED strip brightness is configurable in firmware (Adafruit_NeoPixel library support brightness configuration on fly) which lower current draw accordingly. I already measured whole panel current draw. 4.65A on full brightness, 2.5A on 70% (all LEDs in a strip set to white during measuring). Below 2A on 50% and less, but then LEDs start to become hard to distinguish in bright daylight. At usual information density (only 1/4 of LEDs are active) current draw is below/around 1A, but I can't guess which kind of blinky stunts my customer will try to show in future. Maybe I should convince him to stay around 60% brightness for begin. I'm now figure out preferable power converters that use less space on PCB. LDO most likely will be LM2940IMPX-5.0/NOPB. Switching DC converter for panel - TPS62932 (5V, 2A) as safer choice. Or TPS62933 (5V, 3A) - with hope that controller power supply might be upgraded still in this revision.I agree that external capacitors at solenoid side might help with inrush current. Will require one-two trips to site in person to test and see how it works. Luckily nearest sites are in 20 km radius around me so it is not a big problem.Quote from: Smokey on September 02, 2024, 10:53:57 pmIt is exterior panel unfortunately.Quote from: moffy on September 02, 2024, 11:05:21 pmSo far I'll keep him. From how things are happening, next revision will be made by my terms in adequate housing with proper power supply. Consider this revision as R&D grind

author: PCB.Wiz
author_rank: Super Contributor
timestamp: September 03, 2024, 12:19:47 am
content: Quote from: Krotow on September 02, 2024, 11:37:09 pmYou can also improve brown out tolerance to short peaks, by lowering the MCU module current as much as possible and using a resistor/diode/ decent cap to hold up the MCU.The LM2940 is old, and has a high Iq of 15mA max 10mA typ, maybe a better LDO can lower total drain, to giver longer hold-up times for a given cap ?A rough calc has 470uF able to droop 12V in ~565ms with 10mA load.Quote from: Krotow on September 02, 2024, 11:37:09 pmMaybe upgrade to a SMPS with an adjustable current limit, to allow better control of the LEDs and avoid surprises ?A somewhat overrated SMPS will also waste less power, giving more LED current.

author: Krotow
author_rank: Regular Contributor
timestamp: September 03, 2024, 01:01:29 am
content: Quote from: PCB.Wiz on September 03, 2024, 12:19:47 amI'm aware about LM2940 age. Unfortunately there is not many choices for small space on PCB with up to 1A output. And particular LDO is still manufactured not only by TI but also by TSMC. I believe that it will still be around when this controller revision will get retired. I will think about capacitor for MCU though.Quote from: PCB.Wiz on September 03, 2024, 12:19:47 amSwitching DC converter with available input current sensing would be very cool solution. But I have no idea how that part of circuit should look and how to put it in tight space left on board.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: September 03, 2024, 01:16:09 am
content: Quote from: Krotow on September 03, 2024, 01:01:29 amHow doesAtmel328PB MCU + 4 extra logic gate packages + 8 status LEDsmanage to get to 1A ?!If youreallyhave that much draw, you should separate out the MCU supply for brownout hardening.

author: Krotow
author_rank: Regular Contributor
timestamp: September 03, 2024, 01:29:55 am
content: Quote from: PCB.Wiz on September 03, 2024, 01:16:09 amDid napkin math about max Arduino Nano current draw as reference with max current draw from used logic package datasheets + LED current draw in worst case and so on. I'm pretty sure that over-exaggerated my expectations about real current draw at least twice. But have no wish to run into unexpected LDO overload when board will be already completed.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: September 03, 2024, 01:43:57 am
content: Quote from: Krotow on September 03, 2024, 01:29:55 amLogic package datasheets are worst case damage values, not typical operating values.Tip: since you have a current-budget and brownout problem here, do actuallymeasureyour currents

author: Smokey
author_rank: Super Contributor
timestamp: September 03, 2024, 01:45:54 am
content: You didn't like my "just don't turn on the WS2812 LEDs during a solenoid event" idea? That's what I would do.Here is another one if you are just interested in not having the microcontroller brown out.Add a super-cap, or rechargeable battery backup, or some other secondary power storage/source for the microcontroller and (ideal) diode or it with the main supply. If you main supply drops out (which will still glitch the WS2812s), at least your microcontroller will ride through. As the other dude said, you are overestimating your microcontroller current demand.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: September 03, 2024, 02:29:12 am
content: Quote from: Krotow on September 03, 2024, 01:01:29 amIt's not that complex, you just buy a SMPS part with current sense.Some examples :https://www.lcsc.com/products/DC-DC-Converters_484.html?brand=15343

author: ArdWar
author_rank: Frequent Contributor
timestamp: September 03, 2024, 02:55:54 am
content: Planning for worst case scenario is a good practice, but you need to figure out what amount is expected and reasonable from such scenario. Otherwise you'd get stuck in it with ridiculous design requirement.In your case allocating 1A for a small MCU is in most cases way too generous. You're probably overprovisioning by a whole order of magnitude. If your logic circuit managed to draw 1A you don't expect it to still work afterward, or still exist for that matter, so brownout consideration is moot here.

author: Smokey
author_rank: Super Contributor
timestamp: September 03, 2024, 03:04:05 am
content: All In One, board mount DC-DC Converter Modules that can do 5V at 5A from 24V:(Note: DC DC converters are power converters, so 5V at 4A = 20W. That means 20W/12V = only 1.66A from your 24V supply)https://www.digikey.com/en/products/detail/delta-electronics-cyntec/MUN12AD06-SM/9761499https://www.digikey.com/en/products/detail/microchip-technology/MIC45205-1YMP-TR/4958997https://www.digikey.com/en/products/detail/texas-instruments/TLVM13660RDLR/18159491https://www.digikey.com/en/products/detail/murata-power-solutions-inc/MYMGA5R03ECLA5RA/22256121

author: Jeroen3
author_rank: Super Contributor
timestamp: September 03, 2024, 06:34:03 am
content: Try to only solve the problem.The problem: mcu brownout.A solution: diode with big capacitor, doesn't need much, the mcu takes how many mA, one 470uF is probably enough?The LEDs will recover anyway, so will a display.Don't make it more complicated, this sounds like a "you touched it last" guy.And perhaps drop in a recom R-87 smps module instead of a LDO if you're not doing anything analog.You could even buy a Wago 787-916?

author: Krotow
author_rank: Regular Contributor
timestamp: September 03, 2024, 10:17:25 am
content: Good morning. MCU brownout definitely is the main issue, the rest is (mostly) irrelevant. After a bad night's sleep I realized that I over-engineered this part. Indeed, you turned me in right direction. I should return to my first power solution with single 5V 5A DC-DC converter, but with added capacitor as backup to survive occasional brownouts and diode in middle between these two. It might be KVR-5R0H105-R (1F 5V) - the board has exactly one suitable corner for it far away from hot electronic components in a spot which is not quite usable for other components due to long terminal connector. Probably also small rechargeable battery as secondary backup power in a form of pluggable module. For the rest - seems I should pay a visit to one of customer sites and measure actual loads.Wago 787-916 - the guy will not accept it here. But thanks about mentioning. It might become useful elsewhere.As welcomed side effect was extra free space on PCB top side which appeared while I rearranged the logic and status LEDs when tried various split power combinations. Now a third of PCB top area is empty. It is now possible to move also DC converter components topside thus everything is accessible without turning the board around. I know somebody who will like that.

author: xvr
author_rank: Frequent Contributor
timestamp: September 03, 2024, 09:46:25 pm
content: QuoteYou can evaluate total brightness/current of picture that currently emitted to LEDs and scale down brightness of whole picture when estimated consumption raise above threshold.High brightness not only lead to high current but also to considerable heat dissipation in LEDs. Not sure will it be problem for front panel or not.

author: Krotow
author_rank: Regular Contributor
timestamp: September 04, 2024, 10:17:10 am
content: Quote from: xvr on September 03, 2024, 09:46:25 pmPanel PCB with LEDs is completely potted in epoxy to avoid water damage. That is not good for heat dissipation. However guy told me that it wasn't a problem so far so it is not my concern too. His firmware also hasn't any brightness regulation measures... I will introduce that