GitHub Code (under /SpeedControl):
If your platform does not have access to “atomic.h” (and so you get an error message), you can use the alternative version of the code that has been uploaded to the repository. It is labeled “_NoAtomic”.
Learn how to control the speed of a DC motor with an encoder using a PID controller. In this video, I walk you through several important steps in this process:
0. Hardware
1. Velocity measurements
2. Measurement filtering
3. PI control
4. Variations
For more information about how an encoder works, see our video “How to control a DC motor with an encoder.”
To learn about low-pass filtering, see our video “How to design and implement a digital low-pass filter on an Arduino.”
Parts used in this video:
1. DC Motor – 19:1 Metal Gearmotor 37Dx68L mm 12V with 64 CPR Encoder:
2. Motor Driver – VNH5019 Motor Driver Carrier:
3. Microcontroller – Arduino Uno:
thanks for your video you saved my time. I am trying to controll a blcd motor but have diffuculties about low speed rpm control and your low-pass filter solved my problem.
when the motor stops, readEncoder() doesn't get called and the velocity shows the last value measured
Thank you so much for this inspiring video! Finally seeing someone implementing PID control after visiting control engineering class and not seeing any practical examples warms my engineering heart ;D I don't have a motor+encoder flying around, but an led and light sensitive resistor. I guess pid brightness control is now a thing for me. I added a none feedback path to the feedback loop, to make the system more reactive/less prone to oscillating. I add u to a value x that is dependent on my target value. The relationship between the target and x is not perfect, but now the control loop only needs to compensate for the remaining deviation. Not useful in every situation, but worth it in some.
Just can't believe that this high quality content is available for free. God bless you.
thanks
Brilliant explanation – wish I had this explanation when I was at college. 👍🙏🙂
really good content, pls upload more videos
bc
bkl
bsdk
Hi! Thank you for your great video! I have one question tho. How can i find the cut off frequency, or how did you perform the dft to get the plot in frequency domain? Thank you!
Thank you very much. I'm appreciated that!
util/atomic.h arduino library. I couldn't find that .zip library, where should I find it ?
Hi, great video. One question ( 4:05 ), why does the motor increase speed for 3s and than stop and repeat it? If I print a variable "pwr" in serial, it constantly rise. I dont get it.
which app are you using for software simulation ?
wonderful explanation
how you generate fft?
I agree with all of these reviews, this is quality information presented extremely well. Great job and thumbs up!
Plus, your voice in these videos is so relaxing to listen to it almost puts me in a trance…
Thank you so much for such a clear explanation of all of your topics, and please keep them coming 🙂
The "speed" of the video is a bit fast BUT it's a very very good explaination of PID control! thanks tons for this :))
BRILLIANT VIDEO.
Which software you are using to show the circuit diagram ?
I love your voice babe
wow! love this
How you are measuring the rpm of the motor in the display?
Please show the connection diagram of the LCD display.
Is there is any different code to show the rpm ?
Dear curio, Thanks for making such high quality contents. I saw your all videos about DC motor control with feedback. Can you please make a video (or even talk about it on this comment) , where you pair this feedback controller with a feedforward controller? and show us if a inverse transfer function can be useful in the new controller ? You are the only Person in the whole word to whom I can ask for this. I got the ides from here – https://www.youtube.com/watch?v=FW_ay7K4jPE
Is this sensorless commutation?
How did you manage to Plot the Data this Consitently in the Serial Plotter ?
Love you! You saved my life.
Can i ask what softwares are u working with like the closed loop scheme and the plot
This channel is a hidden GEM!
Please reply …
What is the reason behind measuring only one out of every 64 events of encoder per revolution?
and how we are measuring only one .?would you please explain it?