Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

heater control thru pic16f876

Status
Not open for further replies.

lats

Full Member level 4
Full Member level 4
Joined
Oct 27, 2005
Messages
216
Helped
13
Reputation
26
Reaction score
6
Trophy points
1,298
Activity points
2,945
Dear friends

i am designing a PID temperature controller using lm35 .in which i m controling the heater thru pid.

now my question is that,since m new to pid i dont know how to proceed.i know the basic fundamentals of pid ,like why is it used ,but the doubt in my mind is abt
i have to display "p" ," i", and "d" values all three seperaltely on the lcd screen .m using pic16f876 seperately .

can anybody please give me the circuit daigram for this pid.
ALSO
wht is the use of proprotional in controlling heater and how it is done
wht is the use of integral in controlling heater and how it is done
wht is the use of derevative in controlling heater and how it is done

i have read previous all posts on pid on this forum but could not get much help in case of ciruit daigram.
please help me out of this problem

any kind help is appreciated.

thnkx
 

Hi
I think that the difficulty is on digital PID, how to make digital PID equation.
I sugges you read some books about digital control.

For programing with PIC, you can find some articles on the site:
**broken link removed**

Best regards
Muoinho
 
please send the link again. it has some symbol so giving error
 
Hi


DIGITAL PI is

pid_output = rtc/2*tn( current sample + previous sample ) + kp( current sample - previous sample )

where tn = Time Constant.
Kp = Propotional Constant.

Thx+
 

thnks for help but how to calculate kp and tn .wht circuit to add to the system for pid control. i now the equation as:

v= kp x Verror + Ki x integral Verror dt + Kd x derevative Verror dt


now how to find wht is kp ki kd
wht circuit to make?
 

Hi
Like my suggest. For calculating the coefficients Ki, Kp, Kd, you must known your control object and methods for digital PID. My background in control theory is not good. So that I only give you the reference:
Digital Control of Dynamic Systems - Gene Franklin
It is a excellent book about digital control theory.

Regards
 

thnks for replying .the control object is a heater. i know the formula for calculating pid

v= kp x Verror + Ki x integral Verror dt + Kd x derevative Verror dt


but wht will the circuit be to make this pid.

Added after 1 minutes:

and also wht is this digital pid
 

Hi

Before replying to this I would like to know little bit more about...

1. Verror
2. Integral Verror
3. Derivative error



The above formula is for Digital PID comprising of uP/uC ADC DAC etc. Analog PID is comprising of OPAMPs, Resitor Capacitor Diodes etc...

Thx+
 
wht does the ckt follow up for both types pid?
 

thnx for help
verror is difference between set temp and actual temp.

others are differential and intergral of it.

ok so i can control pid thru two method that is either digitally or thru analog part

which one is simpler and how to do it?
please explain me the ciruitryor concept for both.

m in really goin nuts behind this pid
 

Hi

Analog will be simpler to realise. Digital you require smapling of signals thru ADCs and o/p THRU Dacs.

Thx+
 

thnx unix for help .

wht should be the circuit daigram for analog part?
 

using the pid to increasing the responce of the system and deacreasing the overshot and rise time to stay the system in and you can use pi or pd or pid



Kp = Proportional gain

Added after 21 seconds:

using the pid to increasing the responce of the system and deacreasing the overshot and rise time to stay the system in and you can use pi or pd or pid



Kp = Proportional gain
 

muoinhohn said:
Hi
Like my suggest. For calculating the coefficients Ki, Kp, Kd, you must known your control object and methods for digital PID. My background in control theory is not good. So that I only give you the reference:
Digital Control of Dynamic Systems - Gene Franklin
It is a excellent book about digital control theory.

Regards

I need this book, too. Can you upload it somewhere, please. Thanx ahead :)
 

out= Kp*(old_val-act_val)+Ki*(Σ(old_val)+Kd*(old_val1 - 2(old_val2-old_val3))

step 1.
old_val1 >old_val2
act_val > old_val1

step2
calculate PID


step 3
goto step 1


Only private.

My project heater control by PID realy PI.


unsigned char Intergral;
unsigned char I_Counter;
unsigned char ErrorCounter;
unsigned char LastTemperature;

//****************************************************************
// Calculate
//****************************************************************
unsigned char PID(unsigned char TARGET,unsigned char CURRENT)
{
unsigned int POWER;


if(TARGET >= CURRENT)
{
if(CURRENT < (TARGET-CONTROLED_BAND))
{
POWER=250;
Intergral=0;
}
else
{
if(CURRENT != TARGET)
{
if(I_Counter++ > I_COUNT_MAX)
{
if (licznik++ > TIC)
{
I_Counter=0; //-- Counter slows the response of I
Intergral++; //-- Only Increase Integral if less than target
licznik=0;
if(Intergral > I_VALUE_MAX) Intergral=I_VALUE_MAX;
}

}
}
// test=(TARGET*100);
if (TARGET>CURRENT){
// POWER=((test-CURRENT) * P_GAIN)/10000;
// test1=(((test-CURRENT)*P_GAIN)/10000);
}
// POWER=(((TARGET*100)-CURRENT) * P_GAIN)/10000;
else
POWER=0;


//-- P.I.D Proportional Integral Derivative
// POWER=(((TARGET / CURRENT) * P_GAIN) + (Intergral * I_GAIN) + ((TARGET - CURRENT) * D_GAIN)/10) ;
}
}
else
{
POWER=0;
if(I_Counter++ > (I_COUNT_MAX*I_COUNT_DEC)) //-- Slower decrease of value
{
I_Counter=0; //-- Counter slows the response of I
if(Intergral !=0)Intergral--;
}
}

if(POWER > 250) POWER =250;

if(CURRENT > MAX_TEMP) POWER=0;

return(POWER);
}


GPQL
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top