On behalf of all mechanical engineering students, thank you so much for breaking this process down into something we can understand!
@j3s0n4 жыл бұрын
The heating element can be represented by a first-order transfer function if you apply a step input (e.g 5 V or 12 V or whatever the supply voltage is). Plot the transient behaviour as the temperature raises and settles about a value (sample at regular intervals though). This will fit the equation K/(s(tau)+1). K is the gain so that will be the maximum temperature of the plot. Tau is the time constant and this will be the time it takes for the element to reach about 63% of its maximum temperature. You can either simulate this in Simulink and play with the PID values (make sure you use the z-domain rather than the s-domain though. If you don't want to use simulink then just use a tuning method like ziegler nichols
@hippie-io72256 жыл бұрын
One of the best PID explanations I've seen. You are an excellent educator. Thanks!
@LM-uz4pr4 жыл бұрын
Going to make some rosin with this info? lol
@mohammedalshrief5323 жыл бұрын
Pidkzbin.info/www/bejne/hKjYimqnl9hles2kidpid pid line follower robot
@embeddedsystemsiotprojects20553 жыл бұрын
@@mohammedalshrief532 thankes
@RossOCarroll33012 жыл бұрын
This is incredible. I am an MD doing research in neuroscience trying to make an in-line heater for live-cell imaging. This video is exactly what I needed. absolutely stunning!!! :D :D
@emoryolsoff968 ай бұрын
How did it work out?
@marcus_w06 жыл бұрын
I really love your enthusiasm. You're getting better and better. As a viewer right from your first few videos it's amazing to see your progress. Keep on!
@mohammedalshrief5323 жыл бұрын
I made my machine learning pid iron station and i made pid code by helping your videos great man
@mohammedalshrief5323 жыл бұрын
And mad pid line follower 🙂❤👌pidkzbin.info/www/bejne/hKjYimqnl9hles2ginefollowerpid
@demesisx Жыл бұрын
Great job. Everyone else is launching rockets and having us use PID for telemetry. Thanks for simplifying it and making it accessible.
@belenhedderich33306 жыл бұрын
cant wait to see the recycling extruder project. Thank you! Amazing project!
@kyanjenkins59325 жыл бұрын
Great explanation! I'm what you could call a beginner in grade 10 at school but I've picked up on the basics really quickly and have decided to do a project for in the house. I am going to use a PID to control the temperature for an espresso machine. This explanation was really useful, but still alot of research to do!
@Meatlove6 жыл бұрын
This might be the basis for a new barbecue controller project. Thanks for the effort in making such a clear and complete tutorial.
@neogabo1234 жыл бұрын
Guys why is it that there is a diode on the protoboard for the part that controls the heater ? i dont see it in schematic (min 6:52). Truly one the greatest PID explanations on youtube! Thanks you guys! Keep at it!! :D
@anonrider88706 жыл бұрын
man you have one of the best electronics projects channel on KZbin!!! good job!
@VasilisKarastergios6 жыл бұрын
Thanks for all the time and effort you put in to this video, very well explained!
@adabill2956 жыл бұрын
I've been trying to do a PID with Arduino for Sous Vide cooking. The tuning of the PID is the most difficult process for me. The key is to have the patience and good data collection to adjust the various parameters correctly. I tried to doo it with a Crock Pot but there isn't any circulation in a crock pot and I couldn't get the temp deviations down to an acceptable level.. Very good video with good starter information.
@raffaysajjad5 жыл бұрын
Can you share your thoughts about how you brought the temperature deviations down to an acceptable level?
@lericode6 жыл бұрын
Siento que la calidad de los vídeos es cada vez mejor, felicitaciones, como siempre increíble.
@mmdnaderi71835 жыл бұрын
Another great video! I have a question why did you use BJT transistor to drive mosfet ? how much voltage passes into bjt? 12 or 5 ? if 5 why you didn't use Arduino pin directly And another question why did you use a 10k resistor on mosfet gate ?? Thank You
@shariqislam7862 жыл бұрын
Bjt is used since the mosfet has capacitance between gate and drain and the moment you apply voltage to the gate the capacitor starts charging almost instantaneously which requires current greater than arduino pin can provide increasing the switching time and if the switching is not fast, pwm control will not work properly. Please see great scott video on mosfet drivers to understand better. Also the 10k resistance is added to not keep the gate floating when bjt is off.
@yameenansari9039 Жыл бұрын
When we need fast switching like pwm then we use any gate driver
@martinhavshjsrensen2536 жыл бұрын
Ahh... How nice with a video without JLC commercials! ;)
@Johann752 жыл бұрын
This is what I have been looking for my pastry proofer. Thank you very much Sir.
@steveeb005 жыл бұрын
I haven't even watched the video and I gave you a Thumbs Up. I hope this is exactly what I need to control my burnout oven.
@AhmedAmer-he1de4 жыл бұрын
this is litterely what i needed for a school project and this helped a lot
@jamescullins27096 жыл бұрын
well done, I like the way you did not use libs but wrote the code yourself, it is easier to see what you are doing.
@21mejia252 жыл бұрын
Great video. You inspired me to build a fan for my smoker to control temps for long cooks.
@isettech5 жыл бұрын
May need elaboration for more advanced engineers on the thermocouple. They DO NOT put out a voltage based on temperature. They work on a difference in temperature between a hot junction and a cold junction. The example video is OK for an elevated temperature in a temperature stable room, but would not work to control the temperature of the room because the cold and hot junctions would be at the same temperature. Great introduction, and a good place for more advanced students to learn about the hot and cold junctions and temperature measurement of the cold junction to get accurate values for the hot junction. The more advanced students and engineers can locate the cold junction in this example.
@gogogowa4 жыл бұрын
Great video. About how long would it take to boil 4 cups of water using this?
@guansun15715 жыл бұрын
Thank you so much for sharing Sir . I am trying to make my own soldering station by myself recently.
@sarahgutierrez81963 жыл бұрын
SO HELPFUL! Learning so much from your explanations through the code and each piece of electronic, thank you so much
@andrezsa236 жыл бұрын
Exelente control pid lo usaré para modificar un horno para soldar smd ojalá lo hubieras hecho en español
@sunilbelsare56974 жыл бұрын
Great informative video, very nicely and deeply explained about each and every aspect of PID controller's functionality using Arduino. You are great explainer, this skill of yours will educate needy learners.
@MCsCreations6 жыл бұрын
Really nice, man! Great job! 😊
@zeeshanejaz30443 жыл бұрын
really helpful for Mechatronics engineers
@masoodabbasi25276 жыл бұрын
Nice Work. I have couple of questions related to source code 1. Why 3 is added in PID_error " PID_error = set_temperature - temperature_read + 3; " 2. Why kp (gain) is multiplied by 0.01 and in I value 0.01 is multiplied by PID_i and not Ki " PID_p = 0.01*kp * PID_error; //Calculate the I value in a range on +-3 PID_i = 0.01*PID_i + (ki * PID_error);" 3. In your case how you figure out that " PID_value" can be directly written to PWM pin with inversion. How you calculated relationship that this value will produce desired result?. " PID_value = PID_p + PID_i + PID_d; analogWrite(PWM_pin,255-PID_value);"
@ELECTRONOOBS6 жыл бұрын
The 3 is added to set a higher reaal value than the set one. You can remove that if you want. The 0.01 can be removed but than change the Ki and Kp and divide those by 100 on the top of the code. To finde the PDI constants I've just made tests and more tests and always having the PWM signal on the oscilloscope and the real temperature printed.
@W00PIE2 жыл бұрын
Good point, especially number 3. I'm trying to understand the code, shouldn' t there be some kind of mapping function that takes the PID_value and generates an output according to a specified range? And what is the range of PID_value?
@DavDoubleOSeven Жыл бұрын
I can easily understand your english, it’s very good
@nielslarsen10946 жыл бұрын
I like this video. From many years of experience i will advise you to have a function on your coming soldering station controller, where it enters sleep mode, reducing temperature when not being active soldering. This is due to the fact that soldering tips are " burning out ", when standing idle with high temperature. Also the nickel layer is thin, especially on the chinese iron tips you are going to use as per your video.. Kind rgds.
@oscargr_6 жыл бұрын
niels larsen. A lot of the burning of tips is due to the fact these soldering irons do *not* have a temperature controller. In order to not be too cold when they are working (touching new cold wire and melting tin) they are getting slightly too much power. Basically, in rest the temperature goes up because nothing cools it down. I agree it is a nice feature to add.
@joeljoel124284 жыл бұрын
Where are you from man? You really explain very well!
@vovanikotin6 жыл бұрын
Take note about integral windup! It`s very dangerous mistake you did. Windup is ver very important. Also for AC main supply of course you need to use optocoupler. This note even more important than windup.
@milithemuffin45346 жыл бұрын
In this case it can be avoided with simple if statements. if temperature_read is within +-margin, use PID else { if (temperature_read < set_temperature-margin) {apply ful power} else {cut off the power} }
@vovanikotin6 жыл бұрын
Mili theMUFFIN sure, thats how Electronoob did it now. check his firmware code,he aded +- 3 margin range when integral component calculates, and yes, for such application this works perfect. but for general purpose integral windup or saturation shoud be managed for all setpoint range.
@timothyfidler20886 жыл бұрын
@@milithemuffin4534 Won't work . Thermocouple falling off looks like zero temeperature. Try harder // ( Commercial thermoucouple transmitters have a high scale burn out feature to avoid this risk).
@timothyfidler20886 жыл бұрын
@@vovanikotin There is yet another algorithm called the Velocity algorithm... look it up in a digital controls hand book . This avoids wind up issue completely but creates another one... initalisation. I have used V algo in the past.
@sermadreda3996 жыл бұрын
great video as usual truly worth subscribing channel,one comment here when PID works shouldn't that mean that the transistor controlling ( with arduino) the MOSFET knows! the exact current required to the mosfet to produce 100 degrees ? so that no wobbling in the osi
@oscargr_6 жыл бұрын
sermad reda. Yes and no. One way to control the temperature of an electric heater is to calculate (or find by trial and error) how much power you need to put in to the heating element to keep it at a constant temperature. At that temperature there is then an equilibrium between the amount of 'heat' you lose (flows from heater to environment) and the amount of heat you add (through electric energy). For every amount of energy you add, the system will end up at a different equilibrium temperature. But this is not very useful, see for example what happens when you blow at the hearter. You remove more heat, and the temperature drops. The advantage of PID is to automatically react to such disturbance by adding more electric power. And you are right, if the P, I, and D you should not see any wobbly output .... Unless your PID actually NEEDS to respond to a disturbance. A PID does not ' *know* '' how much energy it needs, it calculates that based on current, past and expected errors.
@wilvanham89112 жыл бұрын
hi.. thank you for the good explanation about the PID .... it seems there is a 2 degree difference ( higher ) then the set temp... now im analyse where this offset comes from.
@allanminers16623 жыл бұрын
A great presentation. congratulations on a real contribution to education. On process control
@dalecallaham48473 жыл бұрын
Very nice and clear! You set a high standard.Thanks!
@zaprodk6 жыл бұрын
Nice explanation of how PID works. Keep up the good work! - Btw. is that soldering iron only 24 Watts? I would think it would be 40 or 50 watts by looking at the size.
@karlmozey14126 жыл бұрын
No PID filtering this time ha..... Am just kidding.I really enjoy your tutorials.Thanks a lot.
@mouradmokeddem64673 жыл бұрын
Appreciate you efforts. much easy for students . Thank you
@crazydiamonduk4 жыл бұрын
This is great. How many watts can the mosfet handle? Let's say we replaced the the heater with something a little more Powerful that pulls 10Amps at max voltage?
@igrewold3 жыл бұрын
Thanks man. So PID control(er) stablized something, in this case it's temp(heat...) Interestin' probably now I know the concept behind STAC
@TuttleScott6 жыл бұрын
as the guys who wrote the marlin firmware know, dont forget a sanity check to watch out for thermal runaway if something happens to the temp sensor.
@ELECTRONOOBS6 жыл бұрын
True. Thank you very much for the tip. Keep up!
@oscargr_6 жыл бұрын
Very good point. Don't also forget what happens when your Max is broken, or gets no power... The temperature reading go to zero. Your PID code will go to Max output power pretty soon.
@firefoxik756 жыл бұрын
Nice work! Just saying.. most of those industrial PID has also option to control solid state relay with PWM, so it will work flawlessly with any resistive heating element...
@ryancoulson20815 жыл бұрын
@Electronoobs can you explain why you decided to use a BJT to activate the MOSFET? I'm a novice when it comes to electronics, so I'm not saying you're wrong, I'm just curious what purpose it serves.
@hemantmundhe66626 жыл бұрын
Thanks to you because those subject to handle to you.I am using hakko 907 temperature control iron (clone).your nest video very useful for me and my temperature control iron 907.Thanks
@TheJavaSync2 жыл бұрын
Waiting for AC heater version 😃
@shehryarshaheen71156 жыл бұрын
Thinx for your amazing video
@gkeller3014 жыл бұрын
Great work on this!Does it also work with Arduino nano?
@mishadhosen31354 жыл бұрын
Awesome video. But can you make a video about how to make a soldering station with these same parts.
@djajaproject68374 жыл бұрын
Its very helpfull... do you have any idea if the heater used is operating with AC current and controlled by arduino ?
@aizukhalid97765 жыл бұрын
the best explanations ever, thank you for the detail
@Telboy-fv8ke6 жыл бұрын
I have replicated your Project and all is well except i have nothing from the encoder. (I am definitely using correct sketch) Any suggestions?
@fromtheflightdeck2524 жыл бұрын
Very good video...easy and concise
@ismailoztas70524 жыл бұрын
Hi, Excellent study, clear explanation. thanks for sharing. I have a question. I wanted to control the 220V AC heater with SSR. I tried to do but I couldn't drive SSR with PWM. and Is banana required for the circuit? :)
@joao20104 жыл бұрын
It's excelent! Best explanation I've seen as well. Thank you so much!!!
@niklaskonig2184 жыл бұрын
Very nice Video! I've got one question. Is it possible to use a Mosfet Modul (D4184) instead of the Mosfet in your Video?
@ashervalentini91152 жыл бұрын
Firstly, love the RandM time travel stuff in the background. Secondly, I have completed this tutorial. Everything works wonderfully at 6 Volts; however, when I increase my bench power supply to 12V, the Arduino begins to make a high pitch noise. I'm worried that I may fry the board. Should I perhaps use a 100+ohm resistor between the PWM pin, or am I being stupid? Thanks in advance!!! Ps. This setup has genuinely changed my practical knowledge of PID control!
@AsankaLakmalMorawaka5 жыл бұрын
Great explanation, easy to understand..
@rohandhankani39626 жыл бұрын
Brilliant this is what I was looking for Thank you very much
@jasonfitzpatrick11294 жыл бұрын
Is there a reason that a BJT transistor used at the same time that a MOSFET is used to control the 12v heater? My understanding is that one or the other is needed since both are always on or off... I am confused!
@J_OBODAI6 жыл бұрын
You never disappoint.
@andrewmorgan55415 жыл бұрын
Awesome work, thank you for sharing the code! I have numerous arduino projects I have waned to complete involving PID control but could not find any PID code.
@conor99795 жыл бұрын
Awesome Video!! I'm planning to use this to heat a water bath so will be measuring the temperature of the water, not the heating block. Do I need to tune the controller in these conditions or is it a case of once it's tuned it's tuned for all environments? Appreciate any help!!
@wearetherandombros77825 жыл бұрын
Hey man i want it for the exact same reason !! In case you figure it out can you let me know please ?
@ArmandoGonzalez-np2wt4 жыл бұрын
Hi! Excellent video. One question... would this work with a 24v 50W resistance.
@arikspaude16902 жыл бұрын
Absolute legend thank you sir
@stevestickland17064 жыл бұрын
Hi Electronoobs, Thanks for this excellent tutorial/demo. I have a question though - At 7:46 in your video there are several parts of the wiring that are not in your final schematic. It looks like you've added a diode on the "source" side of the Mosfet (is this connecting source to gate??, but I also see you have a negative (black) jumper looped behind the mosfet - what is that connecting to? I can't see what pin you've connected this to because the mosfet is in the way.
@RossOCarroll3301 Жыл бұрын
I would also love to know this. Have you figured it out?? Would appreciate some info if you had! :D
@vidhatrisamadhiya45996 жыл бұрын
Wow again you and greatscoot at sametime it magic or other🤣🤣🤣
@ELECTRONOOBS6 жыл бұрын
We have same schedule since we are in same timezone
@mohammadyaseenhamidi14226 жыл бұрын
Hi dear sir please kindly share which model nano Oscilloscope you use ... if its possible please share the link of that Oscilloscope which you use
@nasirmahmood67644 жыл бұрын
excellent explanation man!
@MAA5670002 жыл бұрын
Very useful and understable video .. Thank you very much for your effort
@raymondmichael49876 жыл бұрын
With such explanations, Please make tutorials on controlling a stepper motor using arduino, as I want to open/ close a box's window depending on the temperature inside a box. Lm35 as a temperature sensor
@ultraidtech82506 жыл бұрын
kzbin.info/www/bejne/e5PEZYicr5aiapI
@TheRebornRJ6 жыл бұрын
Hey! Have u got an idea of controlling the steppermotor based on the temperature? Its for my thesis :(
@MrIsuru0074 жыл бұрын
@@TheRebornRJ ahaha take the pid value and make a condition to powerup the motor by a signal
@henryrollins91774 жыл бұрын
@@ultraidtech8250 "video not available"
@mohammedalshrief5323 жыл бұрын
kzbin.info/www/bejne/hKjYimqnl9hles0
@ahmedladhibi68933 жыл бұрын
Thank you for your good explanation !
@guru2535 жыл бұрын
Hello! Excellent video. What accuracy can we attain using this given room temperature conditions? Is 0.1 degree C doable?
@theflyingdutchman7876 жыл бұрын
Exactly what I was looking for! A+ Teacher!!!!
@numeprenume512 Жыл бұрын
I have tested each part individually, they all work properly, yet i cant use the encoder with this application. The display starts flashing, changing fast the menu and goes crazy, every time i go near the encoder. Even if i just get very close to it. A 1M resistor from SW to ground stops the craziness but the encoder will stop working all-together. It shows the R temp, the menu, everything but the encoder. All the parts are new and tested separately. Got any idea why? Solved. 1- it was to close to the laptop and the arduino went crazy. 2- the encoder was missing the 10K pull-down from SW to GND. 3- the LCD library i was using was out of date Now it works just fine. Thank you Electronoob!
@elijak8263 Жыл бұрын
I am experiencing issues with the encoder as well. I checked the connections and they seem exact. Individually, All the components work, the whole code compiles, but the rotary encoder gives no signs of life! (It works individually) Any suggestions, please?
@numeprenume512 Жыл бұрын
Update. The system works perfectly. The Arduino module had no issues being close to the laptop. It was the LCD that was sensitive to the EMI from laptop/keyboard etc... I have shielded the LCD with some grounded tin foil and everything works just fine. Including the encoder. I will mount the whole system into a metalic box for this reason. Make sure that the encoder has the 10K pull-down resistor, connected from SW pin to ground, as shown in the schematic. As well as the other two resistors. Mine was missing the SW-GND one from factory. I have also changed this:. .if(PID_value < 255) { PID_value = 255; } if(PID_value > 0) { PID_value = 0; } to this: if(PID_value < 0) { PID_value = 255; } if(PID_value > 255) { PID_value = 0; } In order to be able to use a logic gate MOSFET, without the need of a BJT. Anyway, thank you Electronoob for your time.
@KjetilSteinerBergenBodyBooking2 жыл бұрын
Hi, great video and a great project. I have now made this PID Controller myself and it works really well, but I have a question/wish for you. Could you make an extended video of this project where, in addition to PID, it can also have stepwise adjustment of temperature up and down with time intervals. It had helped me tremendously. Please help me
@praveenaj61836 жыл бұрын
That's great but please make a video on the soldering iron version also . One doubt: how does the gear system improve the thrust while decreasing the speed in brushed drone ?? Anyway this channel is so great ( I can't refrain from saying that )
@gabrielangeles6338 Жыл бұрын
Great video, but I have a question, how can I implement a dimmer module?
@electronic79796 жыл бұрын
Good video
@ismaeelm70913 жыл бұрын
Dear Electronoobs. First of all, thank you for your video and code. I have a question about your codes. I do not understand why you used different values for P and I and D, I mean what would happen if you set all of them the same value. Next, I have some question about the formula which you used to calculate I and D, this is for I and this is for D I was wondering if you could talk about details of these formula. Thanks
@lensonchian71345 жыл бұрын
WOW!! Really nice !! Hmmm, what other heating element i can used? my project is to heat water and maintain its temperature.
@Isaac-ij3bsАй бұрын
Facing an issue where the clicking of the switch does not enter the set temp mode, have you experienced this? Fairly certain it is wired right. Also are you using 12v power supply on the positive and negative runs on the side of the board? you have the resistor and heater on the positive run but other components that should be receiving 5v are on this run. Sorry I am smooth brain engr
@johannienel12 жыл бұрын
Liked and subscribed! Great job
6 жыл бұрын
eres genial. gracias por tu aporte, estuve buscando esto durante mucho tiempo.
@HSRMF6 жыл бұрын
dear.... you are a treasure....keep it up..
@victorclaros89676 жыл бұрын
Amazing work !!!!! thank you for your effort and passion !!!
@HackingInfo Жыл бұрын
is that diode necessary(if yes then what's the number?) besides the MOSFET or it'll work without it?
@hebrewhammer10006 жыл бұрын
Thank you for sharing! I learned a lot.
@MrDgf974 жыл бұрын
i kid you not electronoob, he turns himself into a pickle. he's called pickle rick. funniest shit i've ever seen
@duckandflea2 жыл бұрын
My understanding is that the PWM should vary the voltage going to the ceramic heater? Is that right? Or does it just switch it on and off quickly using the PWM duty cycle to vary it? I'm finding my heater is always getting full voltage and doesn't shut off. Your circuit diagram is different to what you show in the vid as there is an extra component there - is this what I am missing? Any idea why my heater isn't shutting off, even when the PID value says it should be. I'm replicating this on a raspberry pi but other than that the heating circuit is the same as your diagram as far as I can tell. I'm assuming the red lines you have marked 12V are the positive 12V supply and the rest go to ground. I'm driving the BJT with a PWM signal and using the PID_value to change the duty cycle of the PWM.
@retronexusnet6 жыл бұрын
excellent videos!!! more of it please!!
@attamuhammad12295 жыл бұрын
Good Video. Is there a way to calculate accurate P,I & D variables instead of hit and trial method?
@boodoo3668 Жыл бұрын
it is really helpful. But how can i us thermistor instead of thermocouple?
@ElectronicsRandomness6 жыл бұрын
Do you use only Adobe after effects for editing or Adobe premiere aswell? Because it gets very difficult as each cut (clip) would be on a different track in Adobe after effects. So do use Adobe after effects for motion graphics and composition and Adobe premiere for editing videos or just Adobe after effects for everything?
@ELECTRONOOBS6 жыл бұрын
Only AF
@ElectronicsRandomness6 жыл бұрын
Electronoobs oh nice you're great editor.
@paulhendrix85996 жыл бұрын
Amazing quality!
@jeez2976 жыл бұрын
Will it work as perfectly with Peltiers? Awesome video
@oscargr_6 жыл бұрын
J-F Dube. Yes that will work just fine, BUT.... You probably won't be able to use PWM as a driver for your output. Heaters respond quite well to chopping your power in time segments. (Temperature change per Watt effective) Peltiers, as far as I know, are quite specific 'current devices'. (Meaning their transfer function is more like dT/dA... A temperature change per (milli) amp. )
@Rov-qc2ti6 жыл бұрын
Great tutorial Man....! Im Waiting other great video...