Arduino Uno works randomly with external power!

Hi, I am new here. Running a 4 wire stepper motor with Arduino uno. It works perfect using usb port for Arduino and external 12v for A4988 (stepper controller). WhenI use external 9v power for Arduino, it works sometimes but not always!
I checked the 5v pin on Arduino and it is exactly 5v anytime I check. Any help would be muc appreciated.
Thanks

PP3 NO2
:grimacing:

1 Like

Hi! Welcome to the forum.

My two hypothesis for the problem:

  1. You´re using a PP3 9V battery that is near its end (as @cherk just assumed).
  2. Arduino and A4988 don't have a common GND.

If any of these aren´t true, please read How to get the best out of this forum and post a schematic of your wiring

Thanks for your response. I am using a 9v adaptor. I will check the common ground again.

Hi, @bahram64
Welcome to the forum.

What are the specs of the adapter?

Can you please post a link to data/spec of the stepper motor?

Can you please post a copy of your circuit, a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels.

Thanks.. Tom.. :smiley: :+1: :coffee: :australia:

Minimum motor supply voltage of the A4988 is 8volt.
Do you power the driver (motor power) from 5volt or from V-in.
Leo..

Welcome to the forum @bahram64 ! This is a technical forum, so technical details matter.

Most likely, your circuit has power problems, for which we need a complete schematic. That's easy - draw a pencil diagram of your circuit and label the wires appropriately, take a photo, paste it in a new message here.

Second most likely, your code has problems, for which we need you to provide your code, in code tags please. For that, in the IDE press ctrl-T, then shft-ctrl-C, then in a new message here in this thread on the forum, press ctrl-v. That will insert your complete code, properly formatted.

Thank you for doing these simple things.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.