Author Topic: Load current spread  (Read 775 times)

0 Members and 6 Guests are viewing this topic.

Offline KrotowTopic starter

  • Contributor
  • Posts: 44
  • Country: lv
Load current spread
« on: September 02, 2024, 12:14:41 pm »
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.
« Last Edit: September 02, 2024, 12:29:19 pm by Krotow »
 

Online PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1938
  • Country: au
Re: Load current spread
« Reply #1 on: September 02, 2024, 10:30:42 pm »
... 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.
You 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 ?
 
 

Online Smokey

  • Super Contributor
  • ***
  • Posts: 2925
  • Country: us
  • Not An Expert
Re: Load current spread
« Reply #2 on: September 02, 2024, 10:52:18 pm »
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.
 

Online Smokey

  • Super Contributor
  • ***
  • Posts: 2925
  • Country: us
  • Not An Expert
Re: Load current spread
« Reply #3 on: September 02, 2024, 10:53:57 pm »
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. 
 

Online moffy

  • Super Contributor
  • ***
  • Posts: 2132
  • Country: au
Re: Load current spread
« Reply #4 on: September 02, 2024, 11:05:21 pm »
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.
 

Offline KrotowTopic starter

  • Contributor
  • Posts: 44
  • Country: lv
Re: Load current spread
« Reply #5 on: September 02, 2024, 11:37:09 pm »
You 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.

I 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 dirty :scared:  Not 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.

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. 

It is exterior panel unfortunately.

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.

So 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 :)
 
The following users thanked this post: moffy

Online PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1938
  • Country: au
Re: Load current spread
« Reply #6 on: September 03, 2024, 12:19:47 am »

I 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 dirty :scared:  Not good, especially at winter.
You 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.

... 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.

Maybe 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.
« Last Edit: September 03, 2024, 12:28:23 am by PCB.Wiz »
 

Offline KrotowTopic starter

  • Contributor
  • Posts: 44
  • Country: lv
Re: Load current spread
« Reply #7 on: September 03, 2024, 01:01:29 am »
You 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.

I'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.

Maybe 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.

Switching 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.
 

Online PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1938
  • Country: au
Re: Load current spread
« Reply #8 on: September 03, 2024, 01:16:09 am »
I'm aware about LM2940 age. Unfortunately there is not many choices for small space on PCB with up to 1A output.

How does Atmel328PB MCU + 4 extra logic gate packages + 8 status LEDs manage to get to 1A ?!  :-//
If you really have that much draw, you should separate out the MCU supply for brownout hardening.
 
The following users thanked this post: Someone

Offline KrotowTopic starter

  • Contributor
  • Posts: 44
  • Country: lv
Re: Load current spread
« Reply #9 on: September 03, 2024, 01:29:55 am »
How does Atmel328PB MCU + 4 extra logic gate packages + 8 status LEDs manage to get to 1A ?!  :-//
If you really have that much draw, you should separate out the MCU supply for brownout hardening.

Did 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.
 

Online PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1938
  • Country: au
Re: Load current spread
« Reply #10 on: September 03, 2024, 01:43:57 am »
How does Atmel328PB MCU + 4 extra logic gate packages + 8 status LEDs manage to get to 1A ?!  :-//
If you really have that much draw, you should separate out the MCU supply for brownout hardening.

Did 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.
Logic package datasheets are worst case damage values, not typical operating values.

Tip: since you have a current-budget and brownout problem here, do actually measure your currents  :-DMM
 

Online Smokey

  • Super Contributor
  • ***
  • Posts: 2925
  • Country: us
  • Not An Expert
Re: Load current spread
« Reply #11 on: September 03, 2024, 01:45:54 am »
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.
 

Online PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1938
  • Country: au
Re: Load current spread
« Reply #12 on: September 03, 2024, 02:29:12 am »
Switching 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.
It'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
 

Offline ArdWar

  • Frequent Contributor
  • **
  • Posts: 721
  • Country: sc
Re: Load current spread
« Reply #13 on: September 03, 2024, 02:55:54 am »
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.
 

Online Smokey

  • Super Contributor
  • ***
  • Posts: 2925
  • Country: us
  • Not An Expert
Re: Load current spread
« Reply #14 on: September 03, 2024, 03:04:05 am »
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4195
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: Load current spread
« Reply #15 on: September 03, 2024, 06:34:03 am »
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?
 

Offline KrotowTopic starter

  • Contributor
  • Posts: 44
  • Country: lv
Re: Load current spread
« Reply #16 on: September 03, 2024, 10:17:25 am »
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.
 

Offline xvr

  • Frequent Contributor
  • **
  • Posts: 434
  • Country: ie
    • LinkedIn
Re: Load current spread
« Reply #17 on: September 03, 2024, 09:46:25 pm »
Quote
Maybe I should convince him to stay around 60% brightness for begin.
You 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.
 

Offline KrotowTopic starter

  • Contributor
  • Posts: 44
  • Country: lv
Re: Load current spread
« Reply #18 on: September 04, 2024, 10:17:10 am »
Quote
Maybe I should convince him to stay around 60% brightness for begin.
You 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.

Panel 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 :P
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf