Quadrature Encoder and PID Controller Driver

Warning message

The Propeller Object Exchange system is decommissioned and replaced with a GitHub repository to house the same existing and future Propeller objects. As of 12/5/2019, this site is read-only. You can continue to browse and download objects from here for a limited time; however, please begin using the Parallax Propeller repository for future reference.
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Request group membership
By: created: 2013-04-16 | updated: 2014-08-20


A quadrature encoder and PID controller driver that runs in one cog. The code has been fully optimized with a super simple spin interface for maximum speed and is also fully commented.

Provides full support for:

  • Getting the quadrature encoder's current position and position delta in ticks.
  • Setting the quadrature encoders current speed in ticks per second through PID control through a standard DC motor.

This code is designed for one motor/encoder combo.

WARNING: This object has been found to miss ticks. Please use the Parallax encoder object if you need positional information. This object was designed to be used for speed control of your robot. Missing ticks in this case was not a problem when this object was developed.


Original File Upload
Package icon PWM1C_PIDDemo_1_1.zip15.34 KB