My next question concerning an Arduino Micro + Big Easy Driver combination is how to add a potentiometer to the mix for direction/speed control...
I looked at the documentation here -
http://arduino.cc/en/Tutorial/MotorKnoband there are some things that are unclear to me as a complete novice in this new world of electronics and programing.
That Arduino article shows diagrams for Stepper motors that are being controlled by either a Darlington Array (unipolar) or an H-Bridge chip (bipolar). I understand that the Big Easy Driver is a replacement for all of the circuitry shown in the 'MotorKnob' documentation, but some of the description of the application of the potentiometer has me scratching my head.
The documentation states that
Note: Both circuits below are four wire configurations. Two wire configurations will not work with the code provided.
I'm assuming that the quote is referring to the fact that four wire stepper motors are needed for the code and it's not referring to the amount of outputs used from the Arduino board, which happen to be four wires as well.
The example code provided there has this statement:
- Code: Select all
// create an instance of the stepper class, specifying
// the number of steps of the motor and the pins it's
// attached to
Stepper stepper(STEPS, 8, 9, 10, 11);
and your 'Bildr.org' sample code has this type of statement:
- Code: Select all
int motorDirPin = 2; //digital pin 2
int motorStepPin = 3; //digital pin 3
//set up the accelStepper intance
//the "1" tells it we are using a driver
AccelStepper stepper(1, motorStepPin, motorDirPin);
As I begin to use the Stepper Library from the Arduino site, do I simply interject your lines of code to set up the Arduino board on pins 2 and 3 in order to use the Stepper Library code to control the Big Easy Driver...?
Then after that, their instructions for wiring a poetentiometer only states:
In both circuits, connect a 10k pot to power and ground, with it's wiper outputting to analog pin 0.
To me, as an amateur in electronics, does that mean to wire 12V or a lower voltage to one side of the pot, and then ground out the other side of the pot...and then wire the center 'wiper' lead from the pot to the Analog '0' pin on the Arduino...?
Very sorry to be so basic in questions, I've never wired a potentiometer and don't even really know which lead is the 'wiper' coming from the pot...
