Quadrature Encoder and PID Controller Driver

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Request group membership
By: Kwabena W. Agyeman, 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
AttachmentSize
Package icon PWM1C_PIDDemo_1_1.zip15.34 KB