Posts

Showing posts from February, 2016

How to control different stepper motors using a rotary encoder

Image
How to control different stepper motors using a rotary encoder. OVERVIEW Welcome to this multi part tutorial on how to control different stepper motors using a rotary encoder. In this first part we will use the inexpensive and popular stepper motor that comes with it’s own control board. The 28BYJ-48 stepper motor with the ULN2003 board. The 28BYJ-48 motor is not very fast or very strong, but it’s great for beginners to start experimenting with controlling a stepper motor with an Arduino. We will write some code to have the motor move in the direction that we turn the rotary encoder, and will also keep track of how much steps we have taken, so that we can have the motor move back to the starting position by pressing down on the rotary encoder switch. We are using 4 pins to control the Stepper and 3 pins for the rotary encoder module. Pin 8-11 are controlling the Stepper motor and pin 2-4 are receiving information from the rotary encoder. We conne