I'm kinda new to the arduino world and have what I think should be a fairly simple project at hand. I would like to make a speed control for a bipolar stepper motor that can spin the motor at a rate of roughly 30RPM to 200RPM. First let me run down the hardware:
Arduino Uno (chinese knock-off)
L298N dual-h bridge driver board (not just the L298N chip), the most common one you find on Ebay (red board), the complete board with +5v regulator which is designed to drive two DC motors or one stepper
Bipolar stepper motor (12V, 200 steps per revolution)
10K Potentiometer
I've tried some code using the default stepper library and did get the motor to spin but found it to moved roughly in large steps at slow speeds. I decided microstepping might be the way to go for smooth slow speed operation and that is what led me to the eccelstepper library.
Currently for wiring I have the L298N inputs connected to digital pins 8,9,10,11 on the arduino, and the pot wiper is connected to analog input 0 with +5v across the pot.
As stated above, my required range of operation is about 30-2000RPM, but ideally when the pot is at 0 I would like the stepper motor to hold position. (this is optional if difficult to achieve) If it is possible to lock the motor then a speed range of 0-200RPM would be fine.
I am wondering if there are any code examples available that will do what I am looking for? If so, could someone please point me to them, or give me some guidance on how to write this code myself....
Thanks in advance to anyone that takes the time to read or reply to my post here.