What causes the uC to restart?

Discussion in 'General Electronics Chat' started by poopscoop, Sep 22, 2014.

  1. poopscoop

    Thread Starter Member

    Dec 12, 2012
    139
    16
    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?
     
  2. MrChips

    Moderator

    Oct 2, 2009
    12,440
    3,361
    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.
     
  3. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,526
    2,369
    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.
     
  4. BillB3857

    Senior Member

    Feb 28, 2009
    2,400
    348
    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.
     
  5. #12

    Expert

    Nov 30, 2010
    16,278
    6,791
    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.
     
    MikeML likes this.
  6. Papabravo

    Expert

    Feb 24, 2006
    10,140
    1,789
    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 likes this.
  7. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Listen to Papabravo and #12. Add optical isolation between the uController port pins and the high-current motor drivers (Hbridge or whatever).
     
    Last edited: Sep 23, 2014
Loading...