As the title says, I’m planning to make an Arduino controlled hot plate for reflowing and soldering SMD components and I’m planning to implement PID control.
However, I haven’t been able to find any temperature based PID controller for Arduino that didn’t use existing PID libraries(have nothing against them, I just don’t want to use them as I want to understand the controller a little better).
So because of that, I watched a very good video on PID control for Arduino(9-Axis IMU LESSON 26: Understanding PID Control systems with Arduino - YouTube) and based my temperature controller on that(code), but not sure if it will work.
Was planning on simulating the controller to fine-tune the PID values, but can’t seem to find any good material on that.
Now, I’m kinda stuck in a loop of trying to test my controller, remembering that the test takes four hours, trying to find out how to simulate it, finding nothing, and going back to beginning. In the light of that, does anyone have any advice in how would I continue my project, if so, any help is appreciated.
PID is a general algoritm to control just anything. Motors, temperature... no difference. One disturbing factor is latency, or hysteresis. That calls for additional thinking. Study that!
To simulate the heating curve of your gizmo requires a reasonably accurate model for the flow of heat within the oven, the heat capacity and thermal conductivity of all the parts, the heat loss from the exterior portions and the heat gain from the element. What is your plan for that?
There are plenty of web pages on "PID tuning". You don't need to run hours of tests to get the basic information required to make good guesses for the initial parameter choices.
Tell us how you understand a reflow oven works. Is the heat from IR or from heated air? How will you control cooling, which is just s important and heating?
Currently, the temperatures are not set-up for a reflow oven, I’m just doing some tests. The final temperatures will vary depending on the solder paste(still haven’t chosen one)
My mistake here, it would be more of a hot plate than the oven, so it will use a heating element, gonna actually change the title so people don’t get confused.
Unless you are willing to invest a lot of time and are comfortable with higher math, it is definitely not worth the effort. But if you really are interested, the COMSOL package can handle problems like that. Steep learning curve, and not cheap!
As for Matlab and Simulink, the basic stuff is in place to solve heat transfer problems, but you would probably want to find a worked example similar to what you have in mind.
Instead of calculating heat losses and thermal conductivity of the plate, let’s assume there are no losses and that we are measuring temperature of an ideal temperature source.
It's the rate of cooling that is important! Too fast means not all the board will be cooled at the same rate. Too slow means you will exceed the suggested temperature for a device.