EMI Shielding/noise filtering

distinguished Arduino fellaz,
I came to ask you for an advice on shielding my Arduino from what I think is electromagnetic interference that arises from the fact I do use arduino to drive power MOSFET by PWM signal. The load on the MOSFET is resistive (a light bulb now). The board I got manufactured for me is ment for RPI, but I migrated to Arduino so I have 17cm wires from 2.20 pin header to the ardu. As you can see from the pictures I tried to twist the wires which has helped modestly, but still far far away from it being usable. I have used STP network cable as a connection to the load (a 220V bulb) and connected shielding to the main's earth. the board has top plate earth and bottom plate negative pole of the rectified mains 220V voltage.
on the pictures there is missing a 5wire connection to another small board that bears I2c display and 3 buttons. it picks up the noise a little bit less without that part, but still and eventually I will need to have this one on the 20cm cables. in the future I may develop a PCB which will serve as an interface between arduino and this board so I don't have this big of a cables wrap, but it seems to me the noise is so strong for arduino, that it may not help itself. I think I am missing some part or maybe I have and design error somewhere. Can you spot one?
Arduino has it's own power supply and controlling circuit has it's own. Disconnecting arduino from boards PS and powering it through USB makes no difference. Please, ask me further if I left something out.
Looking forward to your insights!



No offence, but that is seriously unsafe. Apart from that, can you confirm that you have full galvanic isolation between low and high voltage parts of your circuit, and complete safety grounding?

In the drawing, it appears that low and high voltage circuits share J6. That isn't safe. Unless, I missed something...

A diode bridge does not offer line voltage isolation...

A perfectly shielded, perfectly working device that kills someone still isn't very useful...

arduino is connected to the controlling circuit only by the optocouplers (IC1, U1). Arduino's PS1 negative is also earthened.
How did you come up with J6 is under high voltage I don't know and I would not be writing this message if it would.
controlled circuit shares ground with power part and therefore is not safe to touch and won't be exposed.

Well, you referenced this:

rectified mains 220V voltage

and I spotted a "VAC" on your schematic, is that a low voltage, like from a step down transformer? If so, I apologize.


I see now, it must be a voltage converter with isolation. If so, then that problem doesn't exist. Sorry about the brain hiccup.

From time to time we get inquiries about noise (EMI) issues. Those really require a deep dive into the entire system including endpoint equipments, environment and circuit physical layout. So you probably won't get any useful answers here unless you lay those out for us.

Everything always looks perfectly fine on paper. :slight_smile:

You asked us to point out anything that is missing. It's not hard to see that it has no case. So right away we don't have the full picture. You also referenced something like a display board, which we can't see.

You chose not to comment on the Cat cable used for power. You did not say whether it is just for test, or part of the final design. It is by itself, completely unsafe. Even if the entire circuit and load is isolated it is a fire hazard.

Also, nowhere do you give any details of the interference or any measurements that you made of it, if any.

Actually you said, "what I think is interference" so we're at a loss as to what phenomenon caused you to reach that conclusion.

The biggest thing I see absent in your schematic is decoupling capacitors. Unshielded wires are a good source of noise and I would think 0.1-1uF ceramic caps would be a good addition.

1 Like

yes, the power supplies are MeanWell PSs. they has some leakage current as per spec. this one has 0.25mA and that's why Arduino's PS negative pole is connected to earth. with that it's safe to touch, and the current doesn't trip the fuse.

i reference that to explain how are the PCB plates done. bottom one has the rectified mains negative voltage on it. maybe it's important from the noise perspective as that is physically big part of the circuit that gets energized rapidly as it is all controlled by PWM signal. Top plate is earth. that can serve as some shielding tho... I can't say how important those facts are so I just mention that.

I can give you a peek on the control panel with the display:



so you see it only the prototype and it has lot's of long cables that makes things even worse..
those are pulldown resistors and one to limit current as this is ment to put 1 on the GPIO pin when pressed. it was initially meant for RPI that's why pulldown and positive logic, I noticed arduino has only internal pullups and logic is inverted --i suspect this to be how the device deals with interferences like this. (0 is more solid state when everything around is energized)

ANYWAY:
what I'm striving for here is to strip down the case to the smallest configuration that reproduces the failure repeatedly. that way we deal with one problem at the time and not to open too many cases in parallel.

CAT cable is there only to demonstrate that even when that connection is shielded and connected to earth it doesn't help, so we may start looking somewhere else. before I had on regular wires and I don't thing this shielding did that much.

How do I know it's EMI? I have been warned about that. But that time I was using RPI and that doesn't suffer from it that badly as Arduino. With Arduino you just touch it's pin by bare hand or come close and it reacts. also, when you disconnect the load (a bulb) it behaves all well. as expected, in full configuration, with buttons, display, thermometer... everything works.

For the measurements, I don't have a scope, so I'm just observing it, in this stripped-down case I'm printing the temperature to the serial line and looking at measurements. one in five like has bad value (-127). also pins get activated and button logic gets executed randomly :smiley: even without buttons connected! I'll say it once again: without the load it's all good.

A bulb is only for working purposes, at the end the load will be a heat plate 30x20cm which is basically a wire wrapped on some pad material and that will make things even worse I suspect, so let's just stay with bulb for the moment.

What I lack knowledge on (and many more) is filtering capacitors, that you can tell are missing here. so where would you recommend to put them and what kind of? as you can see I tried to solder one on PS1 5V output but have not done the trick..

thank you!
EDIT: Arduino MKR1000 i'm using

that is good observation, I admit, I don't know how to go about those. Can you recommend spots and values for them, please?

ty.

0.1uF (100nF) is a common value and good value to start with. Decoupling capacitors always go as close to the source as possible, so where wires connect with your board is best.

Note: putting decoupling capacitors on signal wires may have an effect on the signal you want to get through, which is going to make capacitor selection complex. If you could find a way to shield wires (we use to be able to get a mesh tubing for making your own cable shield), all you would have to do then is apply a capacitor to the shield.

I have tried to strip all the wires but 5 i need:
1.) 3V3
2.) GND
3.) PWM
4.) PWM switch (I have there transistor that switches pwm signal on/off)
5.) temp sond data wire

with PWM generated out of arduino it's all the same, still bad readings on temp that tells me there's still much noise being picked up. I have tried external voltage source to activate MOSFET driver and open MOSFET and temp results were alright. that tells me high voltage pulsation is the problem and less wires will reduce the problem just hardly. even wrapping it in a mesh I'm not sure about. I would need to wrap entire arduino and temp sond wires and display wires... you see it gets quite complicated. therefore attaching decoupling cap on such mesh seems far from achievable.

another thought that I have is that MOSFET I have on the board may act as an antenna for this source. therefore I'm thinking about putting a Faraday cage around the whole board or I'm having another thought experiment that I would like to check with someone more experienced:
Leaving out 5V power supply for arduino out, use only 15V one that drives the MOSFET circuitry and use step down to power arduino from it too. This way I'm not connecting earth to the negative of the 5V supply, so I can connect it to the negative pole of the 15V supply --but this one needs to have common ground (is connected) with power circuits negative (- from the bridge rectifier).
an illustration schema:

thinking is that this way minus pole from the diode bridge is connected to the earth so the MOSFET is on the earth too -> therefore it would drag down it's noise emmitance and I don't need a faraday cage. only I don't know if it wouldn't blow up to my face immediately... your thoughts?

thanks!