Introduction: Driving the Pm55L-048-hp69 With Arduino
In this instructable I will teach you how to wire your stepper to run it with the arduino board.
You will need:
- Arduino board (mine is uno)
- Breadboard and wires
- ULN2803 or ULN2003
- PM55L-048-HP69 stepper
- Power suply for stepper (I'm using a 19V 1A since this stepper works on 24V)
Step 1: Wiring
Using this tutorial, I was able to find the wiring of my stepper.
So, if you are using the example from the stepper library stepper_one Revolution
you have to wire this way:
A to digital pin 11
C to digital pin 10
B to digital pin 9
D to digital pin 8
I'm actually using the ULN2803, but the only diference is the 2803 have more pins to work with.
Step 2: The Code
Since we are workingh a 48 steps stepper, you have to change the line const int stepsPerRevolution =200;
for const int stepsPerRevolution =48; if you don't make this chage, it won't work.
-----------------------------------------------------------------------------------------------------------
#include <Stepper.h>
const int stepsPerRevolution = 48;
Stepper myStepper(stepsPerRevolution, 8,9,10,11);
void setup() {
// set the speed at 60 rpm: myStepper.setSpeed(60);
// initialize the serial port: Serial.begin(9600);
}
void loop() {
// step one revolution in one direction:
Serial.println("clockwise");
myStepper.step(stepsPerRevolution);
delay(500);
// step one revolution in the other direction:
Serial.println("counterclockwise");
myStepper.step(-stepsPerRevolution);
delay(500);
}
-----------------------------------------------------------------------------------------------------------
Now have fun with the code. It worked well within 10 to 180 rpm.
Good luck, hope you like it.