Electrical · Controls & Automation
Closed-Loop Motor Speed Control (PID)
Intermediate 4 weeks 30-40 hours
Build a motor controller that reads an encoder and uses a PID loop to hold a set speed. Then load the motor down and see if the speed holds. You'll end up with response curves that show how your tuning changed the result.
Major
Electrical
Focus area
Controls & Automation
Total hours
30-40 hours
What you'll need
- DC gear motor with encoder 12V for Arduino
- L298N dual H-bridge motor driver module
- Arduino Uno R3 ATmega328P microcontroller board
- 12V 2A DC power supply adapter
- DC electronic load module constant current tester
Shop the parts on Amazon
As an Amazon Associate, I earn from qualifying purchases.
Steps
- Wire the encoder motor, L298N driver, and Arduino, and power the motor from the 12V supply.
- Read the encoder pulses and convert them to motor speed in RPM.
- Run an open-loop test and record how speed drops when you add load with the electronic load module.
- Code a PID loop that adjusts the motor's PWM signal to hold a target speed.
- Tune the P, I, and D gains and record rise time, overshoot, and settling time for each setting.
- Plot your step response and load disturbance curves and document the final tuning for your portfolio.
What to photograph for your portfolio
- Speed response curves
- load disturbance test
- PID tuning
- real-time display
- settling time
Resume bullet starters
Copy one, then swap in your own numbers.
Built a PID speed controller for a 12V encoder motor that held speed within [X]% under load
Tuned P, I, and D gains to cut overshoot from [X]% to [X]% and settling time to [X] seconds
Plotted step and load-disturbance responses to compare tuning settings
Skills you'll show off
Control systemsPID tuningArduinoembedded programmingfeedback systems