Author Topic: What filtering/grounding do I really need?  (Read 1142 times)

0 Members and 1 Guest are viewing this topic.

Offline sparkydogTopic starter

  • Regular Contributor
  • *
  • Posts: 234
  • Country: us
What filtering/grounding do I really need?
« on: September 29, 2023, 09:21:41 pm »
So, I'm working on a project that's going to use an Arduino Nano socketed¹ onto another board to break out pins and add additional logic. I'll be driving that, a few push buttons (on 3.3k pull-downs), and an I2C 4-digit 7-segment display.

Because the display also needs 5V and possibly a decent amount of current (compared to the Nano, anyway!), I'm planning to use some sort of "brick", probably a Mean Well APV-8-5, for the power supply.

On the Arduino forums, there are many reports of people apparently feeding "wall wart" output straight to Arduinos. However, I've also been semi-following the horror stories over at this other thread, as well as other sources discussing how much filtering is needed on a power supply, which is a big reason for this post.

As a bit of insurance, I'm planning on feeding the PSU +V through a bead (BLM41PG102SN1) with a 1µF MLCC (C3216X7R1E105K) right next to the 5V pin. The display will be fed directly from the PSU output (i.e. it will be upstream of the bead).

Is this going to be filtered enough (or overkill), or do I need additional filtering components and/or more capacitance to cope with the display possibly going straight from "off" to max power draw?

Given that I'm going to be interacting with this by pressing metal buttons whose outsides are expected to be connected to earth-ground, am I going to have a misbehaving MCU due to floating voltage? How would I properly go about grounding the board? (Is it safe to connect the PSU's DC negative to AC-neutral / earth? What if I have multiple such PSUs at different voltages?)

(¹ Yeah, I could design something that just sockets an MCU directly, but that's work, especially as I want the greater precision of an external oscillator, and being able to play with the thing over USB is convenient. Plus, a Nano board is just generally more useful... and this is prototype / small-run stuff anyway. If I was making hundreds, that'd be different.)
 

Offline Infraviolet

  • Super Contributor
  • ***
  • Posts: 1023
  • Country: gb
Re: What filtering/grounding do I really need?
« Reply #1 on: September 30, 2023, 05:03:23 pm »
Taking a guess at your situation, no filtering or grounding is likely to be needed.

Your system is going to be run froma constant voltage rail, you plan on using a Meanwell power supply, that might advise on its datasheet for additional parts to filter and ground things, if it does, follow those, if it doesn't it likely does that internally already. Honestly I can't see why a wallwart power supply, Raspberry Pi branded micro USB ones are good and can give >2A at 5V, wouldn't be just as suitable here.

Your wallwart will be transformer isolated from mains, all well made ones are, it will inevitably float relative to mains, but this doesn't matter, you are not connecting the device to other pieces of equipment (and even if you were you could just common its floating ground to their "absolute" grounds and stop it floating).

You always want plenty of decoupling caps between any device's power and ground rails, but any extra filtering is probably un-necessary. Nothing you are doing sounds like sensitive analogue measurements are involved, a slightly noisy power supply shouldn't be any problem for this sort of character display device, just so long as the caps ensure there aren't any voltage drops to brownout your arduino and aren't any spikes of high enough voltage to threaten it. Neither significant drops nor spikes are likely for a device like this run off a decent quality 5V USB wall wart.

All you do here is power everything from one power supply, I very much doubt you'll need >2.5A, but if you do you can get higher current rated 5V wall warts or Meanwell type supplies, and make sure all your components share a common power rail and ground. As a typical rule, for self-contained pieces of equipment which are using low voltage, which are run from a transformer based wallwart supply and which are not making sensitive analogue measurements, you don't need to think about grounding or filtering.
 

Offline sparkydogTopic starter

  • Regular Contributor
  • *
  • Posts: 234
  • Country: us
Re: What filtering/grounding do I really need?
« Reply #2 on: October 02, 2023, 10:44:24 pm »
Your wallwart will be transformer isolated from mains, all well made ones are, it will inevitably float relative to mains, but this doesn't matter, you are not connecting the device to other pieces of equipment (and even if you were you could just common its floating ground to their "absolute" grounds and stop it floating).

Riiiight... but IIUC from the other thread, connecting something that, on the MCU side, is nominally "0V" to actual earth can produce a signal on that line (possibly even at a relatively high voltave?). Say, for example, I were to intermittently short the MCU's "ground" to actual ground; is that going to be safe? What about shorting data pins to actual ground?

A slightly noisy power supply shouldn't be any problem for this sort of character display device, just so long as the caps ensure there aren't any voltage drops to brownout your arduino.

Right; how do I know how much capacitance I need to avoid such drops? Do you mean the PSU should already provide enough?

All you do here is power everything from one power supply, I very much doubt you'll need >2.5A.

I hope to not need more than 1A. An APV-8-5 is rated for 1.6; is that enough margin? I'm quite aware there are PSU's rated much higher, and I can go bigger if needed, but space is precious. 🙂

It's frustratingly unclear how much the display unit can draw. The display itself, based on the data sheet, seems to top out at maybe 750 mA (25 mA per segment plus counting the colon as two, which is probably overestimating; I don't intend to use the decimal dots), but that's "maximum" and I don't know how the controller board is actually driving it. Unfortunately, I can't find those numbers anywhere. (The Nano itself claims ~20 mA, and mashing all the buttons would double that, but, very generously, I doubt I'm looking at more than 100 mA for everything that isn't the display.)
 

Offline Infraviolet

  • Super Contributor
  • ***
  • Posts: 1023
  • Country: gb
Re: What filtering/grounding do I really need?
« Reply #3 on: October 03, 2023, 11:19:25 pm »
When your device is floating, if you then connected any single pin of it to "actual" earth, that rail of it would match the potential of "actual" earth, and all other elements of the evice would maintain their relative voltage diferences internally. Remember, a voltage is meaningless alone, voltages must be between points. For a floating device lets say you have a 5V, 3.3V and Gnd rail. Now if you connect 3.3V to "actual" earth, the Gnd rail stays 3.3V below 3.3V to become 3.3V below "actual" earth, and the 5V rail ends up as 5-3.3=1.7V above "actual" earth, relative voltages unchanged and without spiking, device operation unaffected.

And you don't seem to even be so much wiring it to "actual" earth via a lowresistance connection, you just happen, to my understanding, to be touching the device as a human being who may or may not be at some potentialrelative to "actul" earth. To my understanding that is the only contact possible for this device, contact by a large fleshy resistance with some capacitivative elements to it. You might consider ESD protection TVS diodes, perhaps, if you often touch multiple separate points within the device, but for an initial prototype this will almost definitely survive long term without them so long as you aren't constantly charging yourself up by pacing back and forth on carpet in a low humidity climate and then touching, simulataneously, separate points on the circuit. I'm not an ESD expert, but if you start a thread specifically about "what ESD protection do I need on a button I'll often touch", I'm sure you'll get detailed responses, they'll mostly involve special fast acting zener diodes and perhaps some extra resistors to keep the "sensitive"* MCU pins safe from what happens at the button itself.

*An arduino nano is not like a really sensitive MOSET or analogue device, it will cope with normal handling just fine most of the time, ESD protection here would be for improved long term reliability and adding some extra certainty, it isn't a matter so vital to this application that you can't start anything without addresing it

Running off a transformer based wall wart is electrically no different to a battery operated device. Just make sue you get a wall wart which does use a transformer, most good quality ones should.

As for capacitance, this is about decoupling caps. A usual rule is a 10u or 1u cermaic in parallel between the power rails (5V and Gnd) of each IC, physically as close to the IC as possible.

As for current consumption, a glance at the display's webpage shows it can be powered through a small connector, I doubt a large current would be delivered through that. I haven't looked it to all its details, but I'd be very surprised if at peak consumption it could possible draw >750mA. I strongly suspect 1A will be perfectly ample for that display, an arduino and some buttons.
 
The following users thanked this post: sparkydog

Offline BillyO

  • Super Contributor
  • ***
  • Posts: 1399
  • Country: ca
Re: What filtering/grounding do I really need?
« Reply #4 on: October 04, 2023, 12:32:59 am »
If you are going to use a Meanwell or Mornsun unit then you have nothing to worry about.  They are orders of magnitude better than 99.7% of he no-name wall-warts out there.  If you really want to be pedantic, place  .01uF and a 10uF directly across the DC outputs of the power unit and a 33nF (rated at least twice the mains voltage in your locale) type "Y" cap between the negative output and earth ground (usually right next to the "-" output).  To get the benefit from this arrangement you must wire your supply up to mains with Line (fused), Neutral and Ground.  You will then have a supply that is pretty much as quiet as you can make it as well as being as safe as possible to boot.
Bill  (Currently a Siglent fanboy)
--------------------------------------------------
Want to see an old guy fumble around re-learning a career left 40 years ago?  Well, look no further .. https://www.youtube.com/@uni-byte
 
The following users thanked this post: sparkydog

Offline sparkydogTopic starter

  • Regular Contributor
  • *
  • Posts: 234
  • Country: us
Re: What filtering/grounding do I really need?
« Reply #5 on: October 04, 2023, 03:45:52 pm »
When your device is floating, if you then connected any single pin of it to "actual" earth, that rail of it would match the potential of "actual" earth, and all other elements of the device would maintain their relative voltage differences internally.

[...]

And you don't seem to even be so much wiring it to "actual" earth via a low resistance connection, you just happen, to my understanding, to be touching the device as a human being who may or may not be at some potential relative to "actual" earth. To my understanding that is the only contact possible for this device, contact by a large fleshy resistance with some capacitive elements to it.

Right. But the thread I mentioned in the first post suggests a) that the earth-relative voltage is more like 50V, and stated that "contact by a large fleshy resistance with some capacitive elements to it" was most definitely causing aberrant behavior (that being, in fact, the whole point of the thread). It seems to me like a capacitive, high resistance, intermittent connection to a 50V potential difference absolutely is a potential problem. Permanently connecting DC "ground" to actual earth seems to be the correct solution, but I don't know the "right" way to do that.

As for capacitance, this is about decoupling caps. A usual rule is a 10u or 1u cermaic in parallel between the power rails (5V and Gnd) of each IC, physically as close to the IC as possible.

Right. But... 1µF or 10 µF? 🙂

If you are going to use a Meanwell or Mornsun unit then you have nothing to worry about.  They are orders of magnitude better than 99.7% of he no-name wall-warts out there.

While that's probably true, this thread still seemed to have rather mixed opinions, which is part of why I ask.

If you really want to be pedantic, place  .01uF and a 10uF directly across the DC outputs of the power unit and a 33nF (rated at least twice the mains voltage in your locale) type "Y" cap between the negative output and earth ground (usually right next to the "-" output). To get the benefit from this arrangement you must wire your supply up to mains with Line (fused), Neutral and Ground.

Right. In particular, though, does the input cap solve the "nominal 0V isn't anywhere near earth" "problem"? If so, that's probably worthwhile. (And, while it requires adding another PCB, it's not exactly the end of the world to a) switch from an APV-8-5 to an IRM-10-5 and b) have terminals for more than one set of my own output wires.)
 

Offline JustMeHere

  • Frequent Contributor
  • **
  • Posts: 744
  • Country: us
Re: What filtering/grounding do I really need?
« Reply #6 on: October 04, 2023, 05:13:41 pm »
Looks like you can directly send power to the VIN pin and get 5V 800mA at the 5V pin.  Should be enough for your display.  It will be regulated.  Maybe use a 7V 1A wall wart.  Be aware you may need to level shift your signals between the Arduino and the Display.
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8179
  • Country: fi
Re: What filtering/grounding do I really need?
« Reply #7 on: October 04, 2023, 05:39:24 pm »
As a bit of insurance, I'm planning on feeding the PSU +V through a bead (BLM41PG102SN1) with a 1µF MLCC (C3216X7R1E105K) right next to the 5V pin.

Pretty iffy insurance - this combination has real chances of making the situation worse, possibly much worse. Large MLCCs are dangerous for input power filtering as they have near zero ESR and can easily resonate with any stray inductance. Adding inductance makes this worse. And while ferrite beads (sometimes, often) are considered AC-lossy and therefore helpful, they also saturate easily under large DC current and then act as a piece of wire.

If unsure - if you just want to do something with input power, the lowest-risk item is to pick any good old random aluminum electrolytic capacitor and wire it at the input. They have enough ESR to damp any resonance (or inrush voltage peak). Whether it's 47uF or 470uF does not much matter in such case, if the power supply already has decent filtering so that your circuit does not see large ripple currents. The large electrolytic cap would simply act as a damper, and then you can, much more safely, add those 1uF MLCCs in parallel with it, if necessary.
 
The following users thanked this post: SeanB

Offline BillyO

  • Super Contributor
  • ***
  • Posts: 1399
  • Country: ca
Re: What filtering/grounding do I really need?
« Reply #8 on: October 05, 2023, 02:29:41 am »
Right. In particular, though, does the input cap solve the "nominal 0V isn't anywhere near earth" "problem"? If so, that's probably worthwhile. (And, while it requires adding another PCB, it's not exactly the end of the world to a) switch from an APV-8-5 to an IRM-10-5 and b) have terminals for more than one set of my own output wires.)
First, the capacitor that reduces the leakage is the "Y" type capacitor and it goes from the "-" output to earth ground.  It should not require adding another PCB.  It can be added right at the terminals on the power unit.  I don't even solder the thing in when I do it.  I just put it into the screw terminals along with the input and output wiring.  The resulting reduction can be gratifying.  The last one I did resulted in a reduction to 0.2VAC.  However, it should be noted that this is common mode voltage.  It does not occur across the DUP, only with respect to mains ground/earth.  If the device you are powering never sees a reference to mains ground/earth you have nothing to worry about.
Bill  (Currently a Siglent fanboy)
--------------------------------------------------
Want to see an old guy fumble around re-learning a career left 40 years ago?  Well, look no further .. https://www.youtube.com/@uni-byte
 

Offline sparkydogTopic starter

  • Regular Contributor
  • *
  • Posts: 234
  • Country: us
Re: What filtering/grounding do I really need?
« Reply #9 on: October 05, 2023, 07:49:57 pm »
As a bit of insurance, I'm planning on feeding the PSU +V through a bead (BLM41PG102SN1) with a 1µF MLCC (C3216X7R1E105K) right next to the 5V pin.

Pretty iffy insurance - this combination has real chances of making the situation worse, possibly much worse. Large MLCCs are dangerous for input power filtering as they have near zero ESR and can easily resonate with any stray inductance. Adding inductance makes this worse. And while ferrite beads (sometimes, often) are considered AC-lossy and therefore helpful, they also saturate easily under large DC current and then act as a piece of wire.

If unsure - if you just want to do something with input power, the lowest-risk item is to pick any good old random aluminum electrolytic capacitor and wire it at the input. They have enough ESR to damp any resonance (or inrush voltage peak). Whether it's 47uF or 470uF does not much matter in such case, if the power supply already has decent filtering so that your circuit does not see large ripple currents. The large electrolytic cap would simply act as a damper, and then you can, much more safely, add those 1uF MLCCs in parallel with it, if necessary.

Yeah, I only just ran into https://resources.altium.com/p/how-use-ferrite-bead-your-design-reduce-emi. I'm planning to nix the FB in the next rev.

I'm a n00b. I see everywhere to use decoupling caps, and those always seem to be MLCC? It also makes sense that I'd need a "reservoir" cap to smooth out voltage blips when current demand suddenly changes. Am I understanding that the latter must be not-ceramic (is tantalum okay, or do they have to be electrolytic), and larger is generally better? Does the "reservoir" cap have the same need to be as close as possible to the IC's VIN, or is it safe if it's a little ways away?

The capacitor that reduces the leakage is the "Y" type capacitor and it goes from the "-" output to earth ground. It should not require adding another PCB. It can be added right at the terminals on the power unit.

APV doesn't have terminals; just pigtails. And it has no ground at all (most small Mean Well PSUs don't have any ground). I suppose I could WAGO a cap to an earth wire floating around somewhere, but... nah. Adding a PCB isn't the end of the world. 🙂

If the device you are powering never sees a reference to mains ground/earth you have nothing to worry about.

Right. What do I do if my device sees intermittent reference to earth?
 

Offline BillyO

  • Super Contributor
  • ***
  • Posts: 1399
  • Country: ca
Re: What filtering/grounding do I really need?
« Reply #10 on: October 05, 2023, 07:55:27 pm »
Right. What do I do if my device sees intermittent reference to earth?
Do you have the module?  I have used them before (both Meanwell and Mornsun) and haven't noticed anything really nasty about them.  Connect it up to mains and measure the leakage and the current it will produce.  It's usually in the 10s of uA or less.  If you won't be powering thins that will feed signals into FETs you should still be okay.
Bill  (Currently a Siglent fanboy)
--------------------------------------------------
Want to see an old guy fumble around re-learning a career left 40 years ago?  Well, look no further .. https://www.youtube.com/@uni-byte
 

Offline Infraviolet

  • Super Contributor
  • ***
  • Posts: 1023
  • Country: gb
Re: What filtering/grounding do I really need?
« Reply #11 on: October 05, 2023, 09:56:57 pm »
" I see everywhere to use decoupling caps, and those always seem to be MLCC?"
MLCC is important here, it has very low inductance so can respond very fast, other cap types can be slower to provide energy when needed. I mentioned typical options of 1u or 10u, but it really is a matter of getting whichever is easiest for you to buy in that sort of range. I don't know if you're comfortable with surface mounted components, you can get lots of options for 0805 size format MLCCs of 10u capacitance rated for voltages of >15V*. You can also get through hole 10u ceramic caps, https://uk.farnell.com/tdk/fg18x5r1e106mrt06/cap-10uf-25v-mlcc-radial/dp/3619041 , though I haven't found so many choices.

*general rule with MLCCs is to get them rated for a higher voltage than the power rail to ground voltage you'll be decoupling for, >15V rated ones are good enough for 5V circuits, ones with ratings over perhaps 7.5V can still be good, but at 0805 size >15V rated are easy to find so you might as well get the higher rated.

Often you can just use these MLCCs as decoupling caps, and they'll act as enough of a reservoir at the same time. Electrolytic reservoirs for low voltage circuits (things differ at higher voltage ratings where MLCCs are harder to find or pricier) were, to my understanding, a somewhat old-fashioned thing from back in the days when MLCCs weren't available for more than 100nF or so. At higher voltages, or for amounts of charge storage rather larger than 10u, electrolytics are still common. And, there is still a use case for an electrolytic in parallel with MLCCs as a way to dampen LC switch-on spikes (https://www.pololu.com/docs/0J16/all) which can occur in some circuits due to the way the MLCCs initialy charge very quickly.

For a beginner, I'd just use a 10u ceramic as a decoupling cap, locate it as close to the power pins of the arduino nano as possible. The same goes for a decoupling cap near the power pins of the display. If you have an electrolytic of a roughly similar size to hand, then parallel that with the decoupling cap, but no need to physically locate it so close to a chip's power input pins. If you don't have any electrolytics to hand then as long as the wires you are powering this setup from don't have a huge inductance, you'll probably get away with coping with LC switch-on spikes and won't absolutely require the electrolytic cap to suppress them.

You are perhaps over-thinking things in your present project, powering an arduino nano and a display module isn't the sort of application where you have to worry about getting everything utterly perfect. These are components designed to handle designs that aren't absolutely perfect, so long as they are reasonably ok. The nano and display likely have some decoupling caps fitted already, but adding your own extras to your carrier board is a good habit to get in to for when you start working with IC chips directly attached to your own boards.
« Last Edit: October 05, 2023, 10:00:08 pm by Infraviolet »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf