5
\$\begingroup\$

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?

\$\endgroup\$
  • 1
    \$\begingroup\$ well presented question. Nothing in your schematic should cause what you see except C5/6/9. They're all high Q types, so could resonate and wreck decoupling at a few specific frequencies. If you're unlucky, you'll hit them. Try a sniff of resistance between C6 and C9, or try replacing them all with a single 10uF ceramic. It does depend what the Dc-Dc has on its output. The switch should not be glitching the 24v line. The Dc-Dc should not be responding to it like that. Something unexpected is happening, look for things not on the schematic. \$\endgroup\$ – Neil_UK Jul 2 '18 at 13:00
  • 1
    \$\begingroup\$ I'll agree with @Neil_UK that something weird is going on, but it's also clear that you are to some degree misinterpreting the effect. R1 limits the switch current to about 10 mA, and that's not going to produce the effects you see unless you've done something spectacularly wrong. Furthermore, "Switch bounce isn't an issue" misses the point, since switch operation seems the issue, and you can't invoke a software fix for a hard upset. Question - where is the scope ground connected? \$\endgroup\$ – WhatRoughBeast Jul 2 '18 at 13:45
  • 1
    \$\begingroup\$ Splitting the vcc with 1ohm in series. Another way is to use alli electrolytics there, they have lower Q than tants and ceramics. Although a switch glitch shouldn't be getting through to that point, you confirm that altering the decoupling there has an effect, so that's worth persuing anyway. An inductor may help, but I would prefer a ferrite bead, as it has lower Q than an inductor. This 'connecting capacitors of different size in parallel' is a much misunderstood technique, it should be avoided, but so many reputable sources advocate it. With alli caps, we generally get away with it. \$\endgroup\$ – Neil_UK Jul 2 '18 at 15:20
  • 1
    \$\begingroup\$ Interesting problem. I think I gathered each oscillation appears to have a cycle on the order of from 100 ns to 200 ns. (Or 5 Mhz to 10 Mhz.) Way faster than a switch bounces, of course. While I think it is important to look at the output capacitors, I'm feeling some worry about a foot switch and its cabling capacitance and inductance as well as any layout issues that might allow some transformer action across your isolation barrier. What kind of cable are you using to the foot switch? \$\endgroup\$ – jonk Jul 2 '18 at 18:09
  • 1
    \$\begingroup\$ @jonk is on to something- The opto's few mA shouldn't be causing this, but cable inductance resonating with C1 or whatever parasitic capacitance is around could cause this high frequency burst. If you jumper across the switch locally without the cable do you see the same thing? \$\endgroup\$ – John D Jul 29 '18 at 19:04
0
\$\begingroup\$

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

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.