MCU problem with spurious resets... caused by probing with meter?! - Page 1
Forum section: electronics / projects

author: HwAoRrDk
author_rank: Super Contributor
timestamp: April 04, 2023, 05:11:32 pm
content: I'm experiencing problems on a board where I have an MCU that is occasionally getting unexpectedly reset, and in the course of trying to figure out why, I think I figured out thatIwas causing the problem somehow by probing with my multimeter.I added some code to my firmware that reported the reason for the last reset every time it starts up, and it would report that the reset was from the reset pin. I thought maybe I somehow have the reset pin floating? Checked my code: internal pull-up is enabled. Added an external 10K pull-up to be sure. Then I grabbed the multimeter and went to actually measure the voltage on the reset pin, and noticed that the moment I touched the probe to the header on the board, it reset!I can repeatedly do this, and it will reset every time. I even captured it on the oscilloscope (see attachment). Somehow, when I probe the reset line with my multimeter, it causes the reset line to take a dive.Now, I'm not stupid, I know I'm not using the multimeter wrong. Meter is definitely in DC volts mode (manually ranged, at 20V), so it's not like I accidentally have it in current mode and shorting the reset to ground. Some experimentation shows that it happens regardless of probe polarity and DC volts range (i.e. 2V, 20V, 200V - doesn't matter). Sometimes it even happens when touching just one probe to the board, with the meteroff!!How? Why? WTF is going on here? Is my multimeter faulty?

author: Siwastaja
author_rank: Super Contributor
timestamp: April 04, 2023, 05:22:26 pm
content: A bit hard to say without any information about the microcontroller.Look at the datasheet and application notes carefully. Often they recommend something like a 100nF capacitor between reset pin and ground.Touching with a multimeter lead could easily inject ESD enough to shortly upset the pin level even if you have a 10kOhm pull-up. Capacitor does better job at filtering such short high current but low energy events.

author: AndyC_772
author_rank: Super Contributor
timestamp: April 04, 2023, 05:52:53 pm
content: It looks as though your multimeter has an internal capacitor across its terminals, which has 0V across it at the moment you make contact with the reset pin. The caps on the pin and meter form a capacitive voltage divider.I suggest either using a bigger cap on the MCU reset pin, or probe the reset pin via a 1k resistor rather than probing directly on the pin.

author: HwAoRrDk
author_rank: Super Contributor
timestamp: April 04, 2023, 06:06:11 pm
content: Okay, this is weird. I don't think it's the meter after all, and not immediately related to the reset line either.I can sometimes trigger a reset by touchingonlythe negative probe of the multimeter to aground pinof a header on the board, with the meteroffand the batteryremoved.I also got it to happen a couple of times just by touching a screwdriver to a ground pin (but every time when touching the reset), but it's not at all repeatable.BTW, I'm pretty confident it's not ESD from my body, as I'm holding only the plastic body of the meter probes and the handle of the screwdriver.Quote from: Siwastaja on April 04, 2023, 05:22:26 pmThat obviously did cross my mind, and I am going to try that, but I've been working with this board for over a week now and it seems like this problem has only just started happening. I don't recall any unexpected resets before today.Quote from: Siwastaja on April 04, 2023, 05:22:26 pmBy what means would a meter lead convey or accumulate an ESD charge? If that were the case, surely it happening once would dissipate any charge, but I can trigger repeated resets by touching the probe on and off the reset pin rapidly. Or touching it for a few seconds, removing, then probing again.For meter leads, I could understand perhaps they are an antenna for EMI, but a small object like a screwdriver?

author: SiliconWizard
author_rank: Super Contributor
timestamp: April 04, 2023, 06:25:57 pm
content: We may not have enough info to really figure out what is going on with your setup, but try adding a small cap (like 100nF) between the reset pin and ground.It should definitely help preventing spurious resets from external events.

author: HwAoRrDk
author_rank: Super Contributor
timestamp: April 05, 2023, 12:02:43 pm
content: I added a 100nF capacitor to the reset line, and the problem appears to be solved.But I am still trying to get my head around how on earth simply touching a multimeter probe, attached to meter that is off/un-powered, to agroundpin on the board, could cause a problem.I have a rough understanding of what ground bounce is, but I can't imagine that is what is going in the case of meter probe contact like this.

author: AndyC_772
author_rank: Super Contributor
timestamp: April 05, 2023, 12:35:10 pm
content: This feels like one of those problems that would be helped by a sharp, clear photo showing the board layout, how it's powered, and any other connections that are made to it.

author: Siwastaja
author_rank: Super Contributor
timestamp: April 05, 2023, 04:20:33 pm
content: ESD voltages that the devices are tested tosurvivecould be 2000V. That is different from being operational. Applying just 2V to the reset pin is enough to... reset the device. That is 1/100 of what the device could survive.Unless you have a well ESD controlled house, a few volts of charge easily developsout of thin air, between any dielectric surfaces, objects, whatever. You don't feel any zap.Post a picture or layout image, that might help us understand what is going on. But you don't need much of surface area to pick up these charges out of thin air.Now there is very little energy in those few volts of electrostatic charge, but the charge can be supplied quickly, current can be much higher than your 10kOhm pull-up sinks.That's why you need to add capacitance, it will form a capacitive voltage divider with the ESD pulse.Say, if the pin has 10pF and your charged object has 10pF and 20V, pin will see 10p:10p * 20V = 10V. Now if the pin has 100nF and the charged object has 10pF and 20V, pin will see 10p:100n * 20V = 0.002V.