What causes the uC to restart?

Thread Starter

poopscoop

Joined Dec 12, 2012
140
So I'm building (Or rather, planning to build) an autonomous toy car, and I know the problem many people encounter is the uC restarting whenever the motors engage. I've seen this fixed through several means, most recently by using a huge ground wire. I dont understand what exactly causes the problem, and I'd like to learn more.

What exactly is going on when the uC restarts? Is it a voltage drop, interference, noise on the ground?
 

MrChips

Joined Oct 2, 2009
30,821
There could be a number of reasons but the most likely one is when the motors are turned on, a large current is demanded from the power supply.
The power supply is unable the provide the short power surge and the supply voltage drops. The microcontroller chip (MCU) has a supply voltage detection circuit (called brown-out detection) that triggers when the supply voltage falls below a predetermined value (sometimes selectable by configuration settings) and resets the MCU.
 

MaxHeadRoom

Joined Jul 18, 2013
28,698
Also make sure the reset pin pull up resister, if it has one, has a decent electrolytic to buffer it in brown outs, that could be triggered before the IC brown out detection.
Max.
 

BillB3857

Joined Feb 28, 2009
2,571
Would it be possible to diode isolate the power to the uP? A large cap on the cathode side of the diode would give ride-through capability for sort duration supply dips.
 

#12

Joined Nov 30, 2010
18,224
Just remember, a voltage jump on the ground wire (caused by a sudden current increase) is just the other end of Vcc sag caused by the same current surge. They are equally important as each other.
 

Papabravo

Joined Feb 24, 2006
21,226
Your best approach is to have separate supplies for the uC and the motor. Connect the grounds together at ONE POINT ONLY as close to the supplies as possible.
 

MikeML

Joined Oct 2, 2009
5,444
Listen to Papabravo and #12. Add optical isolation between the uController port pins and the high-current motor drivers (Hbridge or whatever).
 
Last edited:
Top