Digital PID

Thread Starter

makarandsd

Joined Feb 20, 2011
13
I wish to implement a digital PID controller for a heater. I have searched a lot on the web but did not understand the algorithm completely. Can the algorithm be written in assembly? What micro controller can I use? Can someone explain me the digital PID algorithm too?
 

strantor

Joined Oct 3, 2010
6,797
Here's some more info on PID. This is a good writeup that helped me learn how PID works. I keep a prinout of it in my top desk drawer and refer back to it occasionally.

The sucky thing about PID is tuning it. Especially when things take a long time to change, like the heat in a big heater. This is why commercially available heater controllers have built-in autotune features.

I remember running across some PID heater controller code for Arduino a while back; it was simple, no more than 10 lines long IIRC. I suspect you will find that the PID program writing will be easier and quicker than finding the proper P, I, and D parameters that work with your heater.
 

ErnieM

Joined Apr 24, 2011
8,377
How are you controlling the heater? Just ON/OFF or a full proportional control?

If it's just ON/OFF you may be best served with just a setpoint and some hysteresis, ala 50° turn OFF, 48° turn back ON.
 

hgmjr

Joined Jan 28, 2005
9,027
Here is a writeup that really helped me gain a better understanding of PID. To read the subsequent pages you can go to the next page by clicking on the link at the top of the page.

hgmjr
 
Last edited:

Thread Starter

makarandsd

Joined Feb 20, 2011
13
I understood the P, I and D fucntions. Can anyone explain me the algorithm and how I can implement it in assembly language
 

strantor

Joined Oct 3, 2010
6,797
I understood the P, I and D fucntions. Can anyone explain me the algorithm and how I can implement it in assembly language
did you read all 7 pages of HGMJR's link? it explains everything. very good link. I printed it out to put with my other writeup. I think you should consider something other than assembly.
 
Top