The Godfather talking
Share your stuff or I will make you regret it.
Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 05, 2016, 07:32:45 19:32


Login with username, password and session length


Pages: [1]
Print
Author Topic: PID heat Controller with ThermoCouple 16f877  (Read 12718 times)
0 Members and 1 Guest are viewing this topic.
emre2blue
Newbie
*
Offline Offline

Posts: 9

Thank You
-Given: 5
-Receive: 13


« on: January 22, 2008, 11:27:07 11:27 »

Hi I made this project for my 3. class univ project. It uses MAXIM 16 bit ADC, ultra-Low Offset up to 2,5uV Opamp,

PIC16F877 And K-Type thermocouple. It drives a 100w 220v bulb lamp via BT136 triac. Two line LCD is to show

configrations and temperatures. And it uses push buttons to increase or decrease the temperature of the bulb lamp

http://rapidshare.de/files/38375273/Project.II.rar.html

Logged
lutfuakcil
Inactive

Offline Offline

Posts: 5

Thank You
-Given: 5
-Receive: 1


« Reply #1 on: January 22, 2008, 09:08:25 21:08 »

PID is very common, but it causes overshoot on the process, some controllers uses fuzzy logic + PID algorithm, but i don't have any idea how they are combined ?....:-(
Logged
emre2blue
Newbie
*
Offline Offline

Posts: 9

Thank You
-Given: 5
-Receive: 13


« Reply #2 on: January 23, 2008, 11:15:23 11:15 »

I don't know either. I guess FuzzyLogic for heating is come off from PID. and it is a little bit more understandable.
Logged
macitmucit
Guest
« Reply #3 on: January 23, 2008, 06:54:25 18:54 »

did you try it with Lm35 sensor .?
Logged
emre2blue
Newbie
*
Offline Offline

Posts: 9

Thank You
-Given: 5
-Receive: 13


« Reply #4 on: January 24, 2008, 10:54:24 10:54 »

Yes I've used LM35 to read K-Type thermoCouple Connection Temperature (Room temperature)
Celc is LM35
Celc1 is from ThermoCouple ( via MAX1133 16bit ADC )

      value1=0;
      for(i=0;i<16;i++)
         value1 = value1 + read_adc(ADC_READ_ONLY);

         value1 = value1 >> 4;      // (value1 / 1024) * 5000 mV / (10 mV / C)

      celc = value1 * 0.488283; //[Volt]

      celc2 = celc+celc1;
Logged
mayler
Junior Member
**
 Muted
Offline Offline

Posts: 68

Thank You
-Given: 14
-Receive: 13


Roger that!


WWW
« Reply #5 on: January 27, 2008, 04:23:37 04:23 »

I am making a similar project, but it's more critical. I am working with a R type thermocouple ( 6 µV / C ) and I am using an instrumentation amplifier, A/D converter, cold junction compensator and reference voltage. I don't like to put the signal directly in AD, because the instrumentation amplifier has more resources as better CMRR. I need absolute precision in this case. I am making a enchanced PID control with adaptative values for improved response. I suggest that you dont use phase control, because of excessive noise... Make a zero-cross control for better results.  Wink
Logged

Computer Engineer.
Digital IC Designer - Cadence certified.
klivi1
Guest
« Reply #6 on: January 28, 2008, 09:23:39 09:23 »

PID is very common, but it causes overshoot on the process, some controllers uses fuzzy logic + PID algorithm, but i don't have any idea how they are combined ?....:-(

Hi,

I think the PID algorithm is widely used and stable, if you use good parameters. (I mean no oversoot, and quick setting time).  Combining with fuzzy logic would mean lot of complications and hard to implement in micro.

klivi

Logged
mayler
Junior Member
**
 Muted
Offline Offline

Posts: 68

Thank You
-Given: 14
-Receive: 13


Roger that!


WWW
« Reply #7 on: January 29, 2008, 01:28:41 01:28 »

If you use adaptative values for constants and use bang bang control, the PID will have an excellent precision... Only need to find the correct parameters for Kp, Kd and Ki. There are many methods, Ziegler–Nichols method is the most common method for finding the constants (auto-tuning can be implemented by it).
Logged

Computer Engineer.
Digital IC Designer - Cadence certified.
strolch
Guest
« Reply #8 on: January 29, 2008, 03:38:59 15:38 »

Hello,
i atached my PID-Regulator. I think i have copy it from the CSS-Forum and modified it to PICC18.
It works fine.
If you use the dsPIC, there is one delivered by the C30.



union LNG {
   long l;
   unsigned long ul;
   int i[2];
   unsigned int ui[2];
   char b[4];
   unsigned char ub[4];
   };

union LNG

u_error,               // PID error value
u_ypid,               // PID error value
u_integral;               // PID integral value

void U_CalcPID(void)
{
   long limit_i;                                    //limiter for Intergral
      u_integral.l += u_error.l;                             // modify the integral value.
   u_ypid.l = (long)u_error.i[0]*(long)U_KP + u_integral.l*(long)U_KI;   // Calculate the PID compensator.            
   if(u_ypid.ub[3] & 0x80)                              // If PID result is negative
      {
      if((u_ypid.ub[3] < 0xff) || !(u_ypid.ub[2] & 0x80))
      u_ypid.ul = 0xff800000;                           // Limit result to 24-bit value
      }

   else                                          // If PID result is positive
      {
      if(u_ypid.ub[3] || (u_ypid.ub[2] > 0x7f))
      u_ypid.ul = 0x007fffff;                           // Limit result to 24-bit value
      }
   
   u_ypid.b[0] = u_ypid.b[1];                              // Shift PID result right to
   u_ypid.b[1] = u_ypid.b[2];                              // get upper 16 bits.

   u_stat.saturated = 0;                                 // Clear saturation flag and see

   if(u_ypid.i[0] == 32767)                              // if present duty cycle output
      {                                          // exceeds limits.
      u_ypid.i[0] = 32767;
      u_stat.saturated = 1;
      }
   
   if(u_ypid.i[0] < 0)
      {
      u_ypid.i[0] = 0;
      u_stat.saturated = 1;
      }
   limit_i=8388607;
   if(U_KI>0) limit_i/=U_KI;
   limit_i+=1000;   

   u_stat.isaturated = 0;                              // Clear saturation flag and see
   if(u_integral.l >  limit_i)                           // if present duty cycle output
      {                                           // exceeds limits.
      u_integral.l = limit_i;
      u_stat.isaturated = 1;
      }
   limit_i*=(-1);
   if(u_integral.l < limit_i)
      {
      u_integral.l = limit_i;
      u_stat.isaturated = 1;
      }
}
Logged
dreamwithin
Guest
« Reply #9 on: February 05, 2008, 03:35:33 03:35 »

I'm writing a program for thin film coating contral, the thickness were captured every second, can I use your PID algorithm for that. Grin
Logged
muse2001
Guest
« Reply #10 on: March 20, 2009, 01:54:38 13:54 »

I cant get the file from http://rapidshare.de/files/38375273/Project.II.rar.html
Re-Upload please!
File not found
Logged
oldvan
V.I.P
Senior Member
*****
Offline Offline

Posts: 375

Thank You
-Given: 152
-Receive: 106


If the van is a Rockin'...


WWW
« Reply #11 on: March 20, 2009, 02:55:04 14:55 »

On a recent project, I found the MAX6675 "12-bit Cold-Junction-Compensated K-Thermocouple to-Digital Converter (0°C to +1024°C)" to be inccredibly helpful.  It includes everything I needed for a K thermocouple in an 8-pin surface-mount package.  Allowed me to be terribly lazy.  Cool

I attached it to a 16F877A, along with a 12-key keypad, a 4X16 LCD and a few other things to form a controller for the furnace in my garage.

I didn't need PID for my project, so have no insights to add there.
Logged

Give a man a fish and you feed him for a day.
Teach a man to fish and he will sit around in a boat drinking beer all day.
USB123
Inactive

 Muted
Offline Offline

Posts: 3

Thank You
-Given: 33
-Receive: 10


« Reply #12 on: April 20, 2009, 03:26:43 03:26 »

Can someone upload it again. It was deleted already.
Logged
lillbear
Senior Member
****
Offline Offline

Posts: 276

Thank You
-Given: 223
-Receive: 182



« Reply #13 on: April 20, 2009, 08:03:25 08:03 »

Gone...maybe reload on ifile?

yours
Logged
ahmetefegumus
Inactive

Offline Offline

Posts: 4

Thank You
-Given: 0
-Receive: 0


« Reply #14 on: May 05, 2009, 09:56:33 09:56 »

muse2001 ; could you uploud agan this file at rapidshare? The link is died.
Logged
sadman
Active Member
***
Offline Offline

Posts: 231

Thank You
-Given: 717
-Receive: 688



« Reply #15 on: December 09, 2009, 12:08:06 12:08 »

Hi I made this project for my 3. class univ project. It uses MAXIM 16 bit ADC, ultra-Low Offset up to 2,5uV Opamp,

PIC16F877 And K-Type thermocouple. It drives a 100w 220v bulb lamp via BT136 triac. Two line LCD is to show

configrations and temperatures. And it uses push buttons to increase or decrease the temperature of the bulb lamp

http://rapidshare.de/files/38375273/Project.II.rar.html



can you please reupload it

regards
sadman
Logged
arash_tah
Active Member
***
Offline Offline

Posts: 113

Thank You
-Given: 18
-Receive: 6


« Reply #16 on: December 11, 2009, 05:06:28 17:06 »

Hi emre2blue 
can u share your file again? The link doesnt work.
Logged
vbcoder
Senior Member
****
Offline Offline

Posts: 285

Thank You
-Given: 74
-Receive: 312


I'll always be here to help you


« Reply #17 on: December 11, 2009, 05:25:16 17:25 »

The Fuzzy PID is a PID controller where its Kp, Ki and Kd values are tuned based on Error and change of the error. This enhances the transient response and minimizes the overshoot since the values mentioned are not constants over the process control when using the fuzzy PID technique.

I only didn't find any aided tools for fuzzy logic code generation or patterns using PIC Microcontrollers. Yes you can create your fuzzy rules and engine easily but it requires lots of time.

Nice project and idea  Grin
Logged

Quote
Education is a progressive discovery of our own ignorance
ismail505
Junior Member
**
Offline Offline

Posts: 49

Thank You
-Given: 1
-Receive: 64



« Reply #18 on: February 09, 2010, 07:14:18 07:14 »

Can anybody reupload this project, please...
Logged

A man is like a fraction whose numerator is what he is and whose denominator is what he thinks of himself...
ashu.spect
Newbie
*
Offline Offline

Posts: 26

Thank You
-Given: 9
-Receive: 3


« Reply #19 on: February 09, 2010, 07:29:03 07:29 »

emre2blue can you plzz upload the PID project on RS

Thanks in Advance

Ashu
Logged
jlian168
Junior Member
**
Offline Offline

Posts: 59

Thank You
-Given: 0
-Receive: 4


« Reply #20 on: February 10, 2010, 02:11:35 02:11 »

Dear all:
Does anyone has the project,Please upload to RS link again.

Thank you very much.
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC