Digital PID

Discussion in 'General Electronics Chat' started by makarandsd, Jul 22, 2011.

  1. makarandsd

    Thread Starter New Member

    Feb 20, 2011
    13
    0
    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?
     
  2. praondevou

    AAC Fanatic!

    Jul 9, 2011
    2,936
    488
  3. strantor

    AAC Fanatic!

    Oct 3, 2010
    4,302
    1,988
    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.
     
  4. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,394
    1,606
    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.
     
  5. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    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: Jul 23, 2011
  6. makarandsd

    Thread Starter New Member

    Feb 20, 2011
    13
    0
    Thanks all. ErnieM, it is a PID, sir.
     
  7. makarandsd

    Thread Starter New Member

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

    AAC Fanatic!

    Oct 3, 2010
    4,302
    1,988
    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.
     
Loading...