Skip to main content

PI controller for continously rotating a stepper using the big easy driver in a background process on RPi

Project description


Python class for continuous rotation of a PI controller regulated stepper motor in a separate process


pip install ProcBigEasyDriver


Here's how this thing works. Once you initialize the object a second process is opened which toggles the step pin up and down at whatever interval is needed to reach to specified motor RPM. This is regulated by a PI controller. The speed and the microstepping regime used can be changed at anytime from the main process. The main process keeps control of the enable pin allowing the motor activity to be gated in the main process.


  import ProcBigEasyDriver as pbed
  from time import sleep

  #Init a stepper that turns at 10 rpm with no microstepping
  Stepper = pbed.ProcBigEasyDriver(step, direction, ms1, ms2, ms3, enable,
                                   microstepping=1, rpm=10, steps_per_rev=200,
                                   Kp=0.2, Ki=0.1)

  #Enable the big easy driver FETs

  #Let it go for 10s

  #Change the microstepping

  #Speed it up to 20 rpm

  #Stop the wheel (but keep the object active) for 10s

  #Turn it back on

  #Stop the wheel and release the pins (kill the object)


Code was written and is maintained by (Matt Davenport)[] (

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for ProcBigEasyDriver, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size ProcBigEasyDriver-0.0.3-py3-none-any.whl (16.4 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size ProcBigEasyDriver-0.0.3.tar.gz (3.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page