Software package that implements a PID controller on an Omni Wheel. Written by Sarah Ziselman during September 2021.
Open a terminal/command prompt and navigate to the directory in which the sketch will be stored. Enter the following command:
git clone
The repository should now be in the following directory and availale for usage. The Arduino IDE is available for free download here. There are three libraries used within this repository:
- OmniWheel_lib
- PIDcontroller
- MotorLibrary
The following hardware componenets are used:
- Arduino Mega 2560 Rev 3 found here
- Rotary Encoder LPD3806-600BM-G5-24C found here
- L298P Motor Driver Shield found here
- DC Geared Motor 12V found here
- 12V Power Supply
- Omni Wheel
The work flow of the Arduino sketch can be summarized as follows:
- Get the angle of the encoder (from -PI to +PI).
- Wait until an input command is received (angle in degrees).
- Set the desired angle of the omni wheel.
- Compute the control value using the PID controller.
- Apply the PWM to the Motor Driver Shield.