I understand fully how PID works but lack the understanding of Arduino to implement. Would you be willing to share the code or perhaps a similar bit of code to get us going in the right direction
Great Tutorial. It's quiet clear explanation for me. I am waiting for the next video explaining Self Balance 2 wheel robot as you promise in the end of this video. I plan to build it. Pls release it ASAP. Thank you so much
+Mugi Raharjo Thank you for your comment!. The balancing robot was a quite big project and I will divide it in several videos. I hope, I can start the series around Christmas this year. First, I have to finish my ESP8266 tutorial series...
Wow! Thank you so much for a fascinating and instructive video. I came across you channel purely by chance, but what a wonderful find. I have, of course subscribed, and I hope many more people do too.
+yousef Alotaibi Unfortunately, the code is still in a very experimental stage and I have to work on it. In the next weeks I hope, I can reactivate my wind tunnel project again and then, I will post the code.
I think it was on the boundary of the Arduino to get it higher than Andreas got it. Servo positioning ok. Precise motor control needs a lot more power. My favorite workhorse is a uC from ST Micro. It can do 10 times as much in one tenth the time. Nice tutorial.
Hello. Will you be able to share the code of this fan pid controller. I have made a home made jet engine and this code would be perfect to use as throttle controll. I have a hall sensor with a amplifier and a schmitt trigger so that would be the same as you. Insteed of driving a fan it would be driving the fuelpump. I need this function because today when i am igniting the afterburner the rpm off the engine goes down alitle bit. I have a ordinary 10k potentiometer as throttle.
This may be more work than it's worth, but would you ever write some kind of numerical method algorithm to find the right parameters? I mean, you'd start it up, and it would evaluate its own performance. You could put your hand over it and do other things to perturb it, and over time, it'd learn?
That is a whole other story and so far, I have no knowledge in the area of "self learning". A big part of the Silicon Valley for the moment is in this topic, and maybe, one day, we get ready made algorithms to be used by people like me. One big problem in real world examples exists however, and the self balancing robot is a good example: It falls down if the error is too big. So, you would need a lot of patience to restart it after every "learning step" (or you include a "self stand-up" functionality)
Did you end up only using the I controller since it got you exactly the 2000 RPM, or did you still end up using the proportional part of the controller? Great video!!!
Great tutorial, I am working on similar speed control problem, what kind of sensor is used for speed sensing(how many pulses per revolution?), what is the sampling interval, can we use time interval as the control variable?
what if the motor speed is lower than the required value, wouldn't the P part = current value - required value. Or do I just take the absolute value of the difference
Great Tutorial! helped me with my bachelor thesis!! :D But could you please tell me how you plotted the graphs? I think it would be great if I had some of those in my report!! :D
Glad to her that. So, I hope, it will be accepted. (I already corrected a few of them during my time as a teacher...). I do not remember exactly, but I think, I used the procedure described in video #9.
awsome stuff, great channel... can it be used to control servos in a cnc-like maschine with incremental optical encoders? i heard there are better methods for this, but the pid seems quite simple
+grmlje grmone Thank you for your compliment. Usually you do not need an additional PID controller for a servo because the servo itself consist of a motor, an position encoder (often a potentiometer) and something like a simple "PID" controller. But usually, they are very inaccurate compared what you need for a CNC. And usually, they have just 180 or 360 degrees range. If you exchange the word "servo" with "motor", then you are right. There are some videos where people used a motor, a rotary encoder (usually optical), and a controller. This seems to work and is a perfect application for a PID controller. Most of the smaller CNC routers (including mine) however, use stepper motors.
+Andreas Spiess yeah, i should have said dc motors.. i added some transmission to them and they are going to become servos after i decide what control to use (pid and pll are the main candidates for now). i would love to see a video on pll in your style all the best in the new year :)
+Andreas Spiess yeah, phase locked loop.. im intrested in it because im working on a diy cnc router atm. but im working on a piece of code as well that will allow me later in life to easily connect almost any kind of motor and easily control it, could be useful for future hacks, and i want to cram every type of control into it for more flexibility. i dont know much about pll.. yet
hallo! I am on a very base-level and right now in a project where we use the hub-ee wheel (a wheel with built in encoder), if I understand you right and want to use a PID-controller to get the wheel to a specific position, could I write something like this to get a P-controller: int motor1speed; int actualPoint; int setPoint; int diff; int p; p=0,8; setPoint=340; void setup() { motor1Wheel.setupPins(8,11,9); } void loop() { diff=actualPoint-setPoint; motor1speed=diff*p; if (motor1speed>255){ motor1speed==255 } if (motor1speed
1. Basics are ok. But I think, you need also negative speeds because your motor could go across the position and has to reverse. 2. Pay attention to the sign of the difference. The speed has to be different accordingly (positive or negative) 3. The I and the D parts have to be included as the p part. (diff *p + integral(diff) * i + diff' x d). You can take my code as an example. 4. I would start with the p only part. only if it works, I would add the I part. I do not think, you will need a d part.
@@AndreasSpiessThanks andreas Can you please guide (1)pid max pid min depends on output range or error percentage or fixed range (2) In pid integral value and derivative values should be updated at what speed. I mean integral and derivative are based on time ? some standard pids like siemens give i and d in seconds. can you explain and guide. Thanks P.R.B
Every time I saw that poor motor being abused by the varying signals I couldn't help but laugh and think "Fan for sale. One previous careful owner." ;)
I meant the motor of the fan, not the vehicle. Sorry, I should've been clearer. I'm really enjoying your videos by the way. I like you you showed the troubleshooting process in this video. Thank you. "Hop schweez" ;)
Read about, very interesting and important subject to learn. Maybe thats inspire you to make new video about it. Without integral windup maintance there could be a lot of problems in control systems.