Hello. I have hooked up the ProDriver (ROB-16836) and the 400 steps/rev stepper (ROB-10846) with 5V/2A regulated power adapter and an Arduino Uno according to the SparkFun hook up guide here:
From the SparkFun Arduino Library for the ProDriver, I tried the “Example1_Basic” and the “Example2_Microstep” and neither one caused any movement in the stepper motor.
Troubleshooting I’ve done:
Double-checked my wiring.
Measured continuity of all connections using multimeter.
Measured the voltage from the power adapter (5.4V).
The only thing I can think of, but don’t know how to test, is some kind of confusion between the Arduino code written for 200 steps, and the ProDriver setting based on the following statement from the Hardware Overview page of the ProDriver hook up guide:
"Clock-In Stepping Control
This is a standard method for controlling most stepper motor drivers. By default, the ProDriver is configured for clock-in stepping in the fixed mode with a step resolution of 1/128 of a step."
and from the “Example1_Basic” from SparkFun’s ProDriver Library:
“This example does a default setup (full step resolution) and turns the motor back and forth.”
What do you think should be my next step to get the motor to move? Thanks!
Ensure the code is uploading to the Uno correctly, if it is, then perhaps create a new sketch and use this code (which has the 400-step modification you suggested):
/* Control a bi-polar stepper motor using the SparkFun ProDriver TC78H670FTG By: Pete Lewis SparkFun Electronics Date: July 2nd, 2020 License: MIT. See license file for more information but you can basically do whatever you want with this code. This example does a default setup (full step resolution) and turns the motor back and forth.
Feel like supporting open source hardware? Buy a board from SparkFun! https://www.sparkfun.com/products/16836 Hardware Connections: ARDUINO → PRODRIVER D8 → STBY D7 → EN D6 → MODE0 D5 → MODE1 D4 → MODE2 D3 → MODE3 D2 → ERR
*/ #include “SparkFun_ProDriver_TC78H670FTG_Arduino_Library.h” //Click here to get the library: http://librarymanager/All#SparkFun_ProDriver PRODRIVER myProDriver; //Create instance of this object void setup() { Serial.begin(115200); Serial.println(“SparkFun ProDriver TC78H670FTG Example 1”); myProDriver.begin(); // default settings } void loop() { myProDriver.step(400, 0); // turn 400 steps, CW direction delay(1000); myProDriver.step(400, 1); // turn 400 steps, CCW direction delay(1000);
I’m not sure how to ensure the code is uploading to the Uno (I’m new to this), but when I uploaded your “400 step” altered Example 1 code, the serial monitor did print the line in the code, so I assume that means the code is uploading?
- Can't see your switch very well in your photo, is it in the USER position or OFF position? (needs to be in the USER position)
- You might try switching out the jumper wires you have now, if one of them is bad, the driver might not work at all.
- If you're using a 5 volt regulated power supply and it's outputting 5.4 volts something might be wrong with the power supply. Try another, preferably one that outputs more than 2 amps.