Spurious chip reset when a bit of metal makes contact - Page 1
Forum section: electronics / beginners

author: TauIs2Pi
author_rank: Newbie
timestamp: March 08, 2018, 09:32:32 am
content: I'm facing an issue where a chip resets whenever a bit of metal makes contact with any of the rails (ground, +3.3V or +5V) anywhere in the circuit. I should mention I'm a beginner in electronics (coming from the software world, analog issues have me stumped).I'm getting the issue on a breadboard prototype I'm working on (the end goal is a specialized USB device and multi-port USB host). 5V comes from a USB cable through a USB hub (powered either from a floating power supply or a computer – doesn't make a difference). A linear voltage regulator provides 3.3 volts for a PIC18F microcontroller, a 74HC driving a 7-segment LED display (for quick debugging) and the evaluation board of the MAX3421E.The MAX3421E is the one that's resetting. I initially found the issue by connecting a USB cable from the evaluation board to a device: it would reset whenever the plug would touch the device's receptacle.What I knowThe MAX3421E only does a soft reset, not a full power on reset. (I know this because only some register bits are cleared. This is the same behavior as if I the RES pin became low.)The microcontroller does not reset.The 74HC retains it's latched output (doesn't reset either).Sometimes it takes more than one try to make it happen. For example it is harder to reproduce near the voltage regulator.It doesn't reset if I make contact with my fingers.My current theoryThe only thing I can think of that would explain the symptoms is that, somehow, the voltage on the MAX3421E's RES pin briefly drops (I don't have an oscilloscope to test this). Yet the entire chip stays on (wouldn't it's Vcc drops too if RES did? both are connected to 3.3V).DemonstrationHere the microcontroller (bottom) continuously polls the MAX3421E (top PCB) and displays the value of a register bit on the screen. It should always be 1. It becomes 0 only if the MAX3421E resets.What could be happening here? How can an unconnected wire/bit of metal do anything? How can I address this? It's probably obvious, but I can't figure it out!

author: drussell
author_rank: Super Contributor
timestamp: March 08, 2018, 09:43:04 am
content: What do you have on there for decoupling capacitors?Can't really see closely enough on your animated GIF...

author: plazma
author_rank: Frequent Contributor
timestamp: March 08, 2018, 09:53:35 am
content: Check decoupling. Add a series ferrite bead to the wire or reset line.

author: capt bullshot
author_rank: Super Contributor
timestamp: March 08, 2018, 10:41:00 am
content: Aside from the boilerplate "this is a breadboard, it'll never work since it is a breadboard" sentence,There are IC's that have very sensitive RST inputs. The Maxim chip might be one of these, so adding a small capacitor (1nF ... 10nF) from the RST pin to either GND or the supply voltage (depending on the active level of the input) usually helps. Place this capacitor really close to the IC in your layout (as I said - breadboards don't work well with fast digital stuff).

author: Jeroen3
author_rank: Super Contributor
timestamp: March 08, 2018, 10:49:43 am
content: Is the pc where all the stuff is attached to grounded?

author: BrianHG
author_rank: Super Contributor
timestamp: March 08, 2018, 11:00:35 am
content: Why does that animation look so well timed after after each increment to 1?

author: ebastler
author_rank: Super Contributor
timestamp: March 08, 2018, 11:24:32 am
content: Quote from: BrianHG on March 08, 2018, 11:00:35 amBecause TauIs2Pi has gone through this motion A LOT before finally deciding to post here, I assume.

author: TauIs2Pi
author_rank: Newbie
timestamp: March 08, 2018, 01:03:16 pm
content: Wow, I did not expect this many replies that quickly, thanks a lot!Quote from: drussell on March 08, 2018, 09:43:04 amThere is 100µF at the voltage regulator input and 10µF at the output. The MCU has 0.1µF, and according to the evaluation kit datasheet the MAX3421E has 2.2µF + 1µF.Quote from: plazma on March 08, 2018, 09:53:35 amI'll have to buy some to test that in series. I just tried loosely putting a big clip-on ferrite bead around the reset wire and it made no noticable difference.Quote from: capt bullshot on March 08, 2018, 10:41:00 amIndeed, I did run into problems with random corrupted data when talking to the MAX3421E through SPI @ 12MHz. I thought the breadboard capacitance(?) might be smoothing out the signals so I tried lowering the clock speed and the corruption went away. Full-speed USB communication between the PIC and the PC does work though (but there could be retried packets due to occasional corruption, I don't know).Would using a soldered prototype board really be much better in this regard?----Putting a 10nF capacitor closer helps with the resets! I'm holding it (will probably solder it on the wires later) right in front of the evaluation board's big connector and I don't get spurious resets when making contact with random metallic objects anymore (I had only tried putting such a capacitor on the breadboard side of the reset wire before). The MAX3421E's RES is active low. What is the best place to put the capacitor? I don't notice a difference between +3.3/RES or RES/GND.However, it still resets if I'm connected to earth ground through the PC and I make contact with a device's USB receptacle while it's plugged in (or directly to it's barrel jack's negative source, which is not earth grounded). So the issue is not completely solved, but that's progress!Quote from: Jeroen3 on March 08, 2018, 10:49:43 amYes: 11 ohms between the PC usb plug's outside and the earth ground pin of the PC's wall plug.Quote from: BrianHG on March 08, 2018, 11:00:35 amIt's 2X real-time speed to make the video nicer.

author: BrianHG
author_rank: Super Contributor
timestamp: March 08, 2018, 01:38:22 pm
content: Does it reset if you touch the wire with your hand?

author: capt bullshot
author_rank: Super Contributor
timestamp: March 08, 2018, 01:45:59 pm
content: QuoteDepends on the layout ...QuoteUsually one would connect the small capacitor from RES to GND. If connecting to +3.3V is better depends on the layout, just go for the GND connection, that is what I'd do here. Put it as close as possible to the IC. Maybe solder a small SMD cap directly onto the eval board.QuoteA proper PCB with ground plane and proper decoupling would help here.

author: Peabody
author_rank: Super Contributor
timestamp: March 08, 2018, 02:58:25 pm
content: The datasheet says the logic level on /Reset is referenced to VL. Also the Device Reset section details a number of ways a reset can occur other than through the /Reset pin. From the description you might be able to tell which one is happening.Also, did you say what pullup resistor you're using on /Reset? If a lower value, or even a direcct tie, makes no difference, then the reset may be coming from somewhere else.