PID Control Example using Arduino
The example shown here makes it easy to optimize your own PID control application.
This project focuses on PID-position-control experiments with Arduino. The HTML/JavaScript-based GUI enables easy optimization of the parameters. Since there are many articles on the internet about how a PID-controller works, we will not go into further detail here. There are three parts of the demonstrator:
- Hardware:
- Arduino Nano
- H-bridge motor-driver based on device L293D
- DC-Motor with encoder
- -Arduino sketch:
- There will be used the PID lib from Brett Beauregard (PID_v2)
The lib can be installed from Library Manager. The program code sends the encoder postion to serial port until the target position is reached.
- There will be used the PID lib from Brett Beauregard (PID_v2)
- -Windows PID Tuning GUI:
- The GUI is written in HTML, CSS and JavaScript. The GUI runs with any internet browser that has native serial interface support (Chrome, Edge and Opera, but not Firefox). The code can be easily modified with any editor.
Discussion (0 comments)