Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Microcontroller, LED, DC motor problems

  1. Apr 1, 2015 #1
    Hey all, me and my friend are attempting to control a 5v dc motor and make a LED blink simultaneously using a H-Bridge Motor Driver 1A - SN754410 and ATMEGA328 micro-controller(16mhz, 8bit). The issue is is that when my H-Bridge activates the motor using input from the micro-controller then the blinking light blinks faster, almost solidly. The actual program cycle seems shorter.Perhaps the cpu is bugging out due to lack of voltage. Any help appreciated, thanks.
  2. jcsd
  3. Apr 1, 2015 #2


    User Avatar
    Gold Member

    Do you have an external power supply or the micro-controller supplying the voltage to the H-bridge?
  4. Apr 1, 2015 #3


    User Avatar
    Gold Member

    How do you make the LED blink? Internal timer in the microcontroller?

    Often such timers can be configured for internal/external enable signal etc., and as you start the dc-motor, the switch noise may affect an inputpin for the timer. For example a weak (internal) pull-up resistor may not be strong enough to keep an inputpin high, or you may have configured the timer unintentional.
  5. Apr 1, 2015 #4
    Are you using timer 0?
  6. Apr 9, 2015 #5
    Sorry forgot to mention I we fixed it, we just used a capacitor to smooth out the voltage, I don't know what caused the fluctuation but it worked.
  7. Apr 9, 2015 #6


    User Avatar
    Gold Member

    you aretalking about a decoupling capacitor on the microcontroller input?
    Yous should ALLWAYs have decoupling capacitors on switching device inputs. Think about it. there is inrush whenever a transistor switches on or off, which will change the current draw. A microcontroller has a poopton of transistors.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: Microcontroller, LED, DC motor problems
  1. Dc motor (Replies: 2)

  2. DC Motors (Replies: 7)

  3. Dc motors (Replies: 4)