Go Down

Topic: PID temperature control (Read 1 time) previous topic - next topic


Has anyone out there implemented the PID algorythem for temperature control ? with PWM?
Any advice/help would be appreciated.



What are you trying to control the temperature of?
For most common applications, PWM (except the very long period stuff controlled by a simple thermostat) is overkill.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.


I am trying to control the temperature of a glass which has an ITO coating applied to it (conductive) and 6 terminals connected to the ITO coating. The aim is to maintain the glass at 37.00 deg C. The sensor i am using is a TSic506F. the aim is to achive an even temp accross the glass (round) so i apply current to each set of terminals in forward and reverse direction and swap from terminal sets in a clockwise direction to achive the even temperature. My problem is with the control algorithim to sense the temperature and change the PWM signal. Also the temp sensor is on the edge of the glass and there is a difference in temperature (lag) between center of glass which i need to compensate for.


I don't quite get how your heaters and temperature sensors are arranged, but from your description I can imagine a solution using a PID algorithm to decide how much heating is required, and a PWM output to control each heater with the duty cycle being proportional to the required amount of heat as specified by the PID. Is that what you're aiming for? What's the problem?


my problem is implementing the PID i am a bit lost here???


The algorithm itself is pretty simple. But you probably don't need to write it yourself, I'm sure you'll find a standard library implementing a PID controller. I expect you'll need to configure the P, I & D components and connect up the inputs and outputs, but you don't need to be bothering about how to code the algorithm yourself. Unless you want to; it's not complex and there's no reason you couldn't write your own if you want.


I'm using Brett Beauregard's PID library with great success. It's on the Arduino Playground. It comes highly recommended.

Note that I had to make a minor change to it to filter the input for taking derivatives because I need to take samples every 1ms (the minimum time step).

If you do use it for a heating system, I would recommend setting the time step at which it computes new a new adjustment to something on the order of minutes so that it can actually detect change for the derivative reaction.


hey thanks guys.
Will have to make some small mods to adapt to my application.

Go Up