Your shopping cart is empty!
Controlling Stepper Motor Using Maker Drive and Raspberry Pi
- Idris Zainal Abidin
- 13 Mar 2019
- 1155
INTRODUCTION
A stepper motor is a brushless DC electric motor that divides a full rotation into a number of equal steps. The motor’s position can then be commanded to move and hold at one of these steps without any position sensor for feedback (an open-loop controller). Besides controlling DC brush motor, we can use Maker Drive to control stepper motor. So, in this I will show you how to control stepper motor using Maker Drive and Raspberry Pi.
Tutorial you may need to read first:
VIDEO
This video will show you how to control stepper motor using Maker Drive and Raspberry Pi.
Untuk versi bahasa Melayu, sila rujuk video diatas.
HARDWARE PREPARATION
Below is the list of items used in the video
- Maker Drive
- Raspberry Pi Zero WH (with Header)
- 16GB Micro SD Card
- Maker pHAT
- Stepper Motor
- 3.7V 2000mAh Li-Ion Battery
- 1x18650 Battery Holder
- 40 Ways Female to Female Jumper Wire
- Male to Male Jumper Wire
Wiring connection table
Raspberry Pi | Maker Drive | Stepper Motor | Battery |
GPIO 17 | Pin M1A | ||
GPIO 18 | Pin M1B | ||
5V | 5Vo | ||
GND | GND | ||
GPIO 27 | Pin M2A | ||
GPIO 22 | Pin M2B | ||
Terminal M1A | Yellow | ||
Terminal M1B | White | ||
VB+ | Positive | ||
VB- | Negative | ||
Terminal M2A | Red | ||
Terminal M2B | Black |
Sample Code
This is sample code used in the video. Save the second code as PigpioStepperMotor. Please run pigpio daemon (sudo pigpiod) before run the program.
Thank You
References:
Thanks for reading this tutorial. If you have any technical inquiry, please post at Cytron Technical Forum.