Hi there, Yes, I'm new.
I've connected a nano-A4988-and Nema 17 and written some tests to have two momentary switches (buttons) advance the steppers either forward or backward with either button push.
When I power the Nano via USB from my laptop, everything works peachy.
As soon as I try to use another 5v source (to power the arduino and A4988), the stepper motor does a little freaky rumble spin before settling down and doing as per my program.
In the attached diagram you can see the wiring where I tried to use the 12v input that powers the motor into the Vin (pin 30) on the Nano board. Freaky rumble.
The other method I tried was to take the 12V power into a rail on the breadboard and take that 12v out to a DC buck converter (with built in LCD to get really very close to 5V) and take its output to a 5V rail on the breadboard and then jump that rail over to power to both the Nano and the A4988. Freaky rumble.
The third method was to cut up an old mini USB power only cable (black and red wire only, pretty simple) and use the buck converter 5V output to power the Nano via USB. Freaky rumble.
I then tried to modify the code to set the enable pin on the A4988 to High right in the void setup before the void loop. No luck, Freaky rumble.
I'm now scratching my head as to what I'm missing. The only way it doesn't shake and rumble as soon as I put power to the 12V rail, is if the Arduino (and subsequently the A4988) is powered by usb from a computer....
I there a way via code to prevent or pause the A4988 from engaging with the stepper motor at all until the Arduino boots up? something like a startup sequence? Am I on the right track?
Ultimately I'd like to have the whole setup run on one physically small single voltage power supply (12V).
Any assistance would be appreciated. The forum has got me this far, however my forum search led me to only 1 (crossposted) article where the guy built something cool but didn't really explain how he solved his problem...
I will try to attach a schematic and my code here, it is pretty rudimentary for you all I'm sure.
TIA
stepper_2ifelsestop2buttons.ino (1.56 KB)
2btnNema17-A.pdf (403 KB)