What filtering/grounding do I really need? - Page 1
Forum section: electronics / beginners

author: sparkydog
author_rank: Regular Contributor
timestamp: September 29, 2023, 09:21:41 pm
content: 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), andan 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 atthis 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, Icoulddesign 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.)

author: Infraviolet
author_rank: Super Contributor
timestamp: September 30, 2023, 05:03:23 pm
content: 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.

author: sparkydog
author_rank: Regular Contributor
timestamp: October 02, 2023, 10:44:24 pm
content: Quote from: Infraviolet on September 30, 2023, 05:03:23 pmRiiiight... 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" toactualground; is that going to be safe? What about shorting data pins to actual ground?Quote from: Infraviolet on September 30, 2023, 05:03:23 pmRight; how do I know how much capacitance I need to avoid such drops? Do you mean the PSU should already provide enough?Quote from: Infraviolet on September 30, 2023, 05:03:23 pmIhopeto 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 displayunitcan draw. The displayitself, based onthe 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 thatisn'tthe display.)

author: Infraviolet
author_rank: Super Contributor
timestamp: October 03, 2023, 11:19:25 pm
content: 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 itRunning 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.

author: BillyO
author_rank: Super Contributor
timestamp: October 04, 2023, 12:32:59 am
content: 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), NeutralandGround. 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.

author: sparkydog
author_rank: Regular Contributor
timestamp: October 04, 2023, 03:45:52 pm
content: Quote from: Infraviolet on October 03, 2023, 11:19:25 pmRight. 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" wasmost definitelycausing 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 absolutelyisa potential problem.Permanentlyconnecting DC "ground" to actual earth seems to be the correct solution, but I don't know the "right" way to do that.Quote from: Infraviolet on October 03, 2023, 11:19:25 pmRight. But... 1µF or 10 µF? 🙂Quote from: BillyO on October 04, 2023, 12:32:59 amWhile that's probably true,this threadstillseemed to have rather mixed opinions, which is part of why I ask.Quote from: BillyO on October 04, 2023, 12:32:59 amRight. 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.)

author: JustMeHere
author_rank: Frequent Contributor
timestamp: October 04, 2023, 05:13:41 pm
content: 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.

author: Siwastaja
author_rank: Super Contributor
timestamp: October 04, 2023, 05:39:24 pm
content: Quote from: sparkydog on September 29, 2023, 09:21:41 pmPretty 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 dosomethingwith 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, andthenyou can, much more safely, add those 1uF MLCCs in parallel with it, if necessary.

author: BillyO
author_rank: Super Contributor
timestamp: October 05, 2023, 02:29:41 am
content: Quote from: sparkydog on October 04, 2023, 03:45:52 pmFirst, 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.

author: sparkydog
author_rank: Regular Contributor
timestamp: October 05, 2023, 07:49:57 pm
content: Quote from: Siwastaja on October 04, 2023, 05:39:24 pmYeah, I only just ran intohttps://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 lattermustbe not-ceramic (is tantalum okay, or do theyhaveto 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?Quote from: BillyO on October 05, 2023, 02:29:41 amAPV doesn'thaveterminals; just pigtails. And it has no ground at all (most small Mean Well PSUs don't have any ground). IsupposeI could WAGO a cap to an earth wire floating around somewhere, but... nah. Adding a PCB isn't the end of the world. 🙂Quote from: BillyO on October 05, 2023, 02:29:41 amRight.What do I do if my device seesintermittentreference to earth?

author: BillyO
author_rank: Super Contributor
timestamp: October 05, 2023, 07:55:27 pm
content: Quote from: sparkydog on October 05, 2023, 07:49:57 pmDo 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.

author: Infraviolet
author_rank: Super Contributor
timestamp: October 05, 2023, 09:56:57 pm
content: " 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.