Electronics


Running the stepper motor

For the stepper motor, we are using, Nema 17

For this, we used

AN arduino Board

Stepper motor drive

arduino IDE

Protoboard

an oscilloscope for power



mprocess

we used the code mentioned below for our motor to run at constant speed



mprocess

Here you can download the arduino code. Don't forget to install the Accel Stepper library before you compile it.
ConstantSpeedStepper.ino

This was one of the examples provided with the Accel Stepper library, created by Mike McCauly. We just changed the pins so that they fit with our connections diagram, and experimented with different speeds.

Here's a brief explanation of what happens in the code.

mprocess

Here is a pin out diagram of the Pololu stepper motor driver that we used. We found this helpfum while making our connections.



mprocess

One we understood the pin out od the driver, We connected it to an Arduino Uno and the Nema 17 stepper motor



mprocess

The stepper drive has a screw to fix the right resistance. Here, it was a little tricky, we tried multiple settings by rotating the potentiometer on the stepper driver in order to find the right resistance.

Once we had this, the motor was up and running and we integrated this in our machine.