Electronic – Induced power supply noise on switch contact

debouncenoiseopto-isolatorswitches

I have a circuit that has a 24V section and a 5V section, separated by opto-isolators and an isolated DCDC converter.

Schematic

Both sides of the DC-DC have decoupling caps, and the MCU has one per Vcc pin. There is a internal ground plane pair for 24V/GNDPWR on one side of the isolation gap, and 5V/GND on the other.

There is a switch input (a foot switch with about 2m of cable) on the 24V side that is connected to an MCU by one of the opto-isolators. This switch, when pressed, has quite a lot of bounce and induces a high-frequency "ring" onto the 5V power supply line, (presumably though the DC-DC converter). The ring appears around 100-200ns in length.

5V supply noise

In the schematic, C1 is added to try to prevent too much inrush current on the ground plane when the switch is closed, but it has little effect.

The resistor R1 is chosen to limit current in the opto diode, and C4 gives RC of around 0.22ms, so substantially longer than the noise signal.

Disconnecting the opto-coupler output on U1 Pin 4 doesn't make difference, so the noise must be entering across the isolation gap via U2.

This power supply noise seems to be rather upsetting to the MCU circuit, as it causes occasional resets when the switch is pressed (a similar noise signal seems to be imposed on the MCU crystal signal as well).

Switch bounce isn't an issue, as I can deal with that in software, it's just the noise that's concerning.

How to prevent this noise from interfering with the rest of the circuit?

Best Answer

What does this switch activates ? Make sure you are seeing the switch effect and not some trigerred actions by the switch.

You can use an L-C filter at the pedal, those are much more effective at handling high frequency noise than a R-C filter. You can also use L-C filter after your power supply.

Make sure your 24V supply is stable.

You can also add decoupling capacitor between the high side of R2 and GND and keep R2 near U1 and far from the MCU.

You can also increase R2, and add a 10nF capacitor on the reset line of the MCU.

You can use a shielded cable for your pedal to avoid having it as an antenna.

While those might help solve your issue, it is likely that you have some layout issue on your design. Make sure the ground plane if fine and that there is no bottleneck at some point.

schematic

simulate this circuit – Schematic created using CircuitLab