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
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
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!
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
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.
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.
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);"
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.
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?
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!
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
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.
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.
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!
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.
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.
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.
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} }
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.
@@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).
@@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.
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.
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!
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?
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.
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
@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.
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.
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
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.
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...
If I am using two of the same heaters in this videos could I used the average of the the two for the PID portion of the code? Essentially I am try to heat up one item in a sandwich style configuration with one heater on top and the other on the bottom.
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? :)
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!
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.
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
It seems easy to write PID control algorithm with arduino, but difficult with stm32 because of timer interupt setting. That would be graet if you can explaint this algorithm using stm32f103 serries. Thank you for sharing !
Hey dude! I have a question, I a want to use a timer of 15 minutes for hold the temperature of 121 C°, after these time I want put the element heating off, how can do it?
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?
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.
Can a second thermocouple be used to trigger the the heating cycle? Example: a primary thermocouple triggers the heater, and keeps it on at a set temperature (controlled by a second thermocouple and PID routine) until the first thermocouple is satisfied?
buen video tengo una duda por ejemplo si necesito hacer otro ciclo de temperatura por ejemplo arraco 0º a º500 en 40min y que se mantenga los º500 por 20min luego aumenta de º500 a º600 en 25min y se mantiene en por 20min gracia de ante mano
Sir, did you already done the tutorial for this one with heating element that has thermistor? I would like to understand how to control temperature using heating element with thermistor built in with PID control system.
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
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
very nice video.. can you make this using an attiny85 as replacement for the uno? and the output signal is connected for a small servo for opening a valve for fuel? thanks
On behalf of all mechanical engineering students, thank you so much for breaking this process down into something we can understand!
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
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
How did it work out?
I made my machine learning pid iron station and i made pid code by helping your videos great man
And mad pid line follower 🙂❤👌pidua-cam.com/video/NwuY7qbs2Dkl/v-deo.htmlinefollowerpid
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!
One of the best PID explanations I've seen. You are an excellent educator. Thanks!
Going to make some rosin with this info? lol
Pidua-cam.com/video/NwuY7qbs2Dkp/v-deo.htmlidpid pid line follower robot
@@mohammedalshrief532 thankes
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
Great job. Everyone else is launching rockets and having us use PID for telemetry. Thanks for simplifying it and making it accessible.
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.
Can you share your thoughts about how you brought the temperature deviations down to an acceptable level?
Ahh... How nice with a video without JLC commercials! ;)
cant wait to see the recycling extruder project. Thank you! Amazing project!
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.
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.
This might be the basis for a new barbecue controller project. Thanks for the effort in making such a clear and complete tutorial.
Thanks for all the time and effort you put in to this video, very well explained!
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);"
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.
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?
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!
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
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.
When we need fast switching like pwm then we use any gate driver
This is what I have been looking for my pastry proofer. Thank you very much Sir.
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.
True. Thank you very much for the tip. Keep up!
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.
man you have one of the best electronics projects channel on UA-cam!!!
good job!
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.
Great video. You inspired me to build a fan for my smoker to control temps for long cooks.
I can easily understand your english, it’s very good
this is litterely what i needed for a school project and this helped a lot
Siento que la calidad de los vídeos es cada vez mejor, felicitaciones, como siempre increíble.
Exelente control pid lo usaré para modificar un horno para soldar smd ojalá lo hubieras hecho en español
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!
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.
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.
really helpful for Mechatronics engineers
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.
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}
}
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.
@@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).
@@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.
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.
thank you for sharing. can you please explain why are you analog writing 255-output instead of just output?
Appreciate you efforts. much easy for students . Thank you
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
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!
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?
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.
Great video. About how long would it take to boil 4 cups of water using this?
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
ua-cam.com/video/Eba4Ufz1o40/v-deo.html
Hey! Have u got an idea of controlling the steppermotor based on the temperature? Its for my thesis :(
@@TheRebornRJ ahaha take the pid value and make a condition to powerup the motor by a signal
@@ultraidtech8250 "video not available"
ua-cam.com/video/NwuY7qbs2Dk/v-deo.html
Waiting for AC heater version 😃
I have replicated your Project and all is well except i have nothing from the encoder. (I am definitely using correct sketch) Any suggestions?
Can U make with Kincony A4 ESP32 with 0-10V with 0-10V feedback ESBE ArA 539 or 559.
U use interrupts for valve?
Thanks man.
So PID control(er) stablized something, in this case it's temp(heat...)
Interestin' probably now I know the concept behind STAC
Awesome video. But can you make a video about how to make a soldering station with these same parts.
may i ask why did you use -3 and +3 range in the integral part?
Andwhat would happen if we use bigger range or smaller range?
can you other video that controlls the blower that gives wind to the fire on the burner with this application?
Clicked The Like Button HARD ............... Jai Jai Shree Ram.........
Really nice, man! Great job! 😊
No PID filtering this time ha..... Am just kidding.I really enjoy your tutorials.Thanks a lot.
@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.
Very good video, you have the link of the digital screen that looks like an oscilloscope ?. Thank you
Something like this www.gearbest.com/testers-detectors/pp_437115.html?lkid=13732065
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.
I would also love to know this. Have you figured it out?? Would appreciate some info if you had! :D
Thank you so much for sharing Sir . I am trying to make my own soldering station by myself recently.
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
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.
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...
Very nice and clear! You set a high standard.Thanks!
if I use that encoader module then those 10k resistor won't required which showed in schematic right?
is that diode necessary(if yes then what's the number?) besides the MOSFET or it'll work without it?
If I am using two of the same heaters in this videos could I used the average of the the two for the PID portion of the code? Essentially I am try to heat up one item in a sandwich style configuration with one heater on top and the other on the bottom.
if(-3 < PID_error
it is really helpful. But how can i us thermistor instead of thermocouple?
Can a PID control system work with heater controlled by a relay ? Or, Will it work same as ON / OFF controller ?
Please help !
SO HELPFUL! Learning so much from your explanations through the code and each piece of electronic, thank you so much
what if I use a LD33V voltage regulator and PN 2222A transistor or does the 2 device need to be higher
A great presentation. congratulations on a real contribution to education.
On process control
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? :)
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!
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.
Great video, but I have a question, how can I implement a dimmer module?
Very good video...easy and concise
Maybe this was just for educational purposes. Modern 3d printers have PID control for the temperature of the nozzle and autotune as well.
I'm waiting for 220AC controller video
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
is it possible to use two inputs for setting PID for example temperature and humidity as inputs?
Exactly what I was looking for! A+ Teacher!!!!
It seems easy to write PID control algorithm with arduino, but difficult with stm32 because of timer interupt setting. That would be graet if you can explaint this algorithm using stm32f103 serries. Thank you for sharing !
Hey dude!
I have a question, I a want to use a timer of 15 minutes for hold the temperature of 121 C°, after these time I want put the element heating off, how can do it?
hello, thanks for the video! But I can't stabilize, how to adjust it to be stable?
Everything nice but the code belongs to (PID NO rotary encoder) is not uploaded. Please can you upload this code:)
Thinx for your amazing video
Its very helpfull...
do you have any idea if the heater used is operating with AC current and controlled by arduino ?
If I want to supply with a DC power converter what voltage/amp should I use? Would a 24V 2A suffice? What is too much?
Where are you from man? You really explain very well!
I didn't understand why did you put the pwm range between 0 and 255 ,
I thought pwm is originally can't cross 255 .
Absolute legend thank you sir
Very nice Video! I've got one question. Is it possible to use a Mosfet Modul (D4184) instead of the Mosfet in your Video?
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?
i kid you not electronoob, he turns himself into a pickle. he's called pickle rick.
funniest shit i've ever seen
Wow again you and greatscoot at sametime it magic or other🤣🤣🤣
We have same schedule since we are in same timezone
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.
Can a second thermocouple be used to trigger the the heating cycle? Example: a primary thermocouple triggers the heater, and keeps it on at a set temperature (controlled by a second thermocouple and PID routine) until the first thermocouple is satisfied?
very good, what happened with the DIY Solder Station? Don´t Forget
buen video tengo una duda por ejemplo si necesito hacer otro ciclo de temperatura por ejemplo arraco 0º a º500 en 40min y que se mantenga los º500 por 20min luego aumenta de º500 a º600 en 25min y se mantiene en por 20min gracia de ante mano
Sir, did you already done the tutorial for this one with heating element that has thermistor? I would like to understand how to control temperature using heating element with thermistor built in with PID control system.
the best explanations ever, thank you for the detail
dear.... you are a treasure....keep it up..
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
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
excellent i made the FINAL PID following your video it worked very good . but how can add eeprom to the sketch
where did you get your power supply from?
very nice video.. can you make this using an attiny85 as replacement for the uno? and the output signal is connected for a small servo for opening a valve for fuel? thanks