Random reboot MCU

Discussion in 'Embedded Systems and Microcontrollers' started by FroceMaster, Dec 6, 2015.

  1. FroceMaster

    Thread Starter Member

    Jan 28, 2012
    400
    4
    Have this setup,
    And have these randoms reboots,
    Could be 2 weeks or even just 2 hours between.
    Have a feeling that it is do to the powersupply,
    Powersupply is a outlet from 220v to 5v USB where i have just taken the GND and 5v.
    When i turn on some lamps or other thing in the house it could reset.
    Should i put in some caps or ???
    and where. ?
     
  2. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,887
    1,016
  3. nerdegutta

    Moderator

    Dec 15, 2009
    2,517
    785
    Have you tried, just for the fun of it, power it from a PC's USB port? And then turn light on/off.

    I agree with @spinnaker that you need some caps.

    How much mA does your powersupply give?
     
  4. FroceMaster

    Thread Starter Member

    Jan 28, 2012
    400
    4
    Power supply is 5v 800mA
    Dont think i use more than 50mA
    Will try to put a cap over the supply first
    What should i use ?
     
  5. nerdegutta

    Moderator

    Dec 15, 2009
    2,517
    785
    When I make powersupplies for microcontrollers, I'm using a LM7805 or LM78L05 regulator with a 0.1uF ceramic and 100uF electrolytic cap on both input and output. Close to the powerpin on the microcontroller, I put a 0.1uF ceramic.
     
  6. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,887
    1,016
    Read the article I posted. The cap needs to be on the pic not on the supply.
     
  7. FroceMaster

    Thread Starter Member

    Jan 28, 2012
    400
    4
    i have now solder a 0,1uf ceramic cap over the pin 1 and 20 at the MCU.
    Give it a try.
     
  8. nerdegutta

    Moderator

    Dec 15, 2009
    2,517
    785
    If you have an oscilloscope, you could probably measure the USB supply when you turn lights off/on. I don't know if you'd get a reading with a DMM.
     
  9. Picbuster

    Member

    Dec 2, 2013
    376
    50
    problem: spikes
    solution: see attached
     
Loading...