Skip to content

Python codes for controlling a NEMA 17 stepper motor

Notifications You must be signed in to change notification settings

makerportal/nema17-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

NEMA 17 Python Tests with Raspberry Pi

Python codes for controlling a NEMA 17 stepper motor with a DRV8825 driver and Raspberry Pi computer

Full tutorial at: https://makersportal.com/blog/raspberry-pi-stepper-motor-control-with-nema-17

Buy a Stepper Motor Kit here: https://makersportal.com/shop/nema-17-stepper-motor-kit-17hs4023-drv8825-bridge

- NEMA 17, DRV8825, and Raspberry Pi Wiring -

The NEMA 17 can be wired to the Raspberry Pi via the DRV8825 driver and GPIO pins:

NEMA-17 RPi Wiring

The RpiMotorLib is used to control the motor, which can be installed via the following command:

pi@raspberrypi:~ $ sudo pip3 install rpimotorlib

- Example -

Example output from nema17_test.py:

NEMA-17 Test