Pid Control With Arduino

Tags: Arduino

Learn to implement the widely used industrial controller on the Arduino platform! (For students, makers, and engineers)

Last updated 2022-01-10 | 4.5

- Students will gain an intuitive insight into how a PID controller works and how to implement it on the Arduino Platform!
- Use the PID algorithm for their Arduino or microcontroller-based projects such as quad-copters
- self balancing robots
- temperature control
- motor speed control
- and much more!

What you'll learn

Students will gain an intuitive insight into how a PID controller works and how to implement it on the Arduino Platform!
Use the PID algorithm for their Arduino or microcontroller-based projects such as quad-copters
self balancing robots
temperature control
motor speed control
and much more!

* Requirements

* Having a basic understanding of electronics + C coding and exposure to the Arduino platform.
* Having a good foundation in math/physics and some exposure to calculus.
* Preferred: Intuitive understanding of feedback control and stability.

Description

Learn the basics behind how a proportional-integral-derivative (PID) controller works and how to implement one on the Arduino hardware!

A PID controller is the most common feedback controller used in the industry, but they can also be used for hobbyist electronic projects such as quad-copters, self-balancing robots, temperature controllers, and much more! In this course, we will not be going into the classical control theory behind PID controllers, instead we will approach the controller intuitively so that it's role and implementation is practically understood. 

The lecture series contains 7 lectures covering: 

  • Feedback Systems, P, PI, and PID Controllers
  • Arduino Implementation and Live Demonstration (Propeller Arm Example)
  • Heuristic PID Tuning 

A template for the Arduino code will also be provided and explained in the series. In order to demonstrate the controller in real-time, a propeller arm example has been constructed. The live demonstration will be used to explain the behavior of the PID controller and how to tune one heuristically. 

This course is suitable for any student, engineer, hobbyist, or maker who always wished to understand PID control in a easy intuitive manner; although a basic understand of electronics, C coding, and calculus is preferred. Having knowledge of feedback control prior to taking this course is also a plus!

After taking this course, you will not only understand PID control better, but you'll become a lot more comfortable with designing projects that involve feedback control.

Who this course is for:

  • Any engineer, student, or hobbyist who wishes to learn how to implement a PID controller in hardware (Arduino/Microcontrollers).
  • Anyone designing projects that involve feedback control (quad-copters, self-balancing robots, temperature control, etc).

Course content

1 sections • 7 lectures

Introduction to Feedback Systems and PID Control Preview 04:37

Proportional (P) Control Preview 03:37

Proportional-Integral (PI) Control Preview 03:57

Proportional-Integral-Derivative (PID) Control Preview 03:14

Implementing the PID Control Algorithm (Code Attached) Preview 06:47

An Arduino template code for a PID controller is attached below!

Demonstration of PID Control (Propeller Arm Example) Preview 04:21

Disclaimer Note: During the demonstration where I decreased the Kd value from 0.3255 to 0.103 which resulted in a sustained underdamped oscillation, I had also increased Kp from 2.1 to 2.4. Increasing Kp does increase overshoots but in this scenario it was mainly because I had lowered Kd value by nearly 68%.

PID Tuning (Ziegler–Nichols method) Preview 04:30