Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/30/09 21:15
Read: times


 
#170262 - 89s52 PID controller
Responding to: ???'s previous message
Hello Everyone,

Thank you to all those who replied, I may have initially come over abit brash and big headed, that was'nt my intention, so if I offended anyone I apologise.
Let me give a quick summary of my controller design. I am using Microchip's mcp3302 sar adc operated in 13 bit with sign in differential mode. The thermocouple in use is a type J, which is fed into an opamp with gain of about 30dB which is then fed into the adc channel A. A TO92 LM35 temperature sensing ic(used for cold junction comp.) is fed into the alternative adc channel via a gain of 12dB.
In software, both channels are fed through IIr filters and then the cold junction rate is computed to be the same as the thermocouples rate(deg.c/adc_counts) and then they summed together, this operation is the same as what would have been done had I designed the cold junction compensation in analogue.
The next stage passes the reading(in software) through a linearisation cubic polynomial giving a final range of 0 to 1000deg.c, however the adc can swing to -1000deg.c, -273 is the absolute limit though.

In addition to this, the end user can 'zero' the thermocouple when idling at ambient, I have quite a few MCP3302 chips in stock and the zero variation from chip to chip is about 10 to 20 adc counts, remembering there is a 30dB amplifier after it.

The controller as it stands is working satisfactory, the end user can adjust time of day, integral(1-250repeats/sec), prop. band(1-99), differential time(1-250 secs), set point, auto/manual, output adjust when setin in manual 0.1-99.9%, forward/reverse acting and as already mentioned "zero".
Save all parameters to eeprom (24lc64).The CPU is overclocked with 32MHz crystal and cpu PID algorithm/update time is 50mSec giving twenty passes per sec.(fast enough for motor pid control perhaps?).

As already mentioned, I'm using an 89S52 with 8kbyte and I've clocked up about 7.9Kbyte so I've run out of flash rom?
Every 50mSec, the mpu sends the process variable through rs232 to the pc where I can and have been doing graphing the response with a 1kW heater band. The relay output pwm is generated in software and has a period of 2000 mSec with resolution step of 2mSec.

I hope this gives a little more insight into my adventures.

Cheers for now




List of 51 messages in thread
TopicAuthorDate
89s52 PID controller            01/01/70 00:00      
   ?            01/01/70 00:00      
   The question is            01/01/70 00:00      
      USP            01/01/70 00:00      
         freelance employee (sic)            01/01/70 00:00      
      Which market(s)            01/01/70 00:00      
      Is it ready?            01/01/70 00:00      
         Andy's reply            01/01/70 00:00      
            I'll take that as a "No", then?            01/01/70 00:00      
   Re: where to from here            01/01/70 00:00      
      the dissolution meter industry ...            01/01/70 00:00      
         Do you mean desalination            01/01/70 00:00      
            no, dissolution            01/01/70 00:00      
   On Production            01/01/70 00:00      
   89s52 PID controller            01/01/70 00:00      
      Self tuning ?            01/01/70 00:00      
         H i Steve,            01/01/70 00:00      
            How do penetrate the market...            01/01/70 00:00      
               I wonder too            01/01/70 00:00      
               Andy's reply            01/01/70 00:00      
                  what do you want???            01/01/70 00:00      
                     Reply to Erik.            01/01/70 00:00      
                  RE: I am asking for advice on 8052.com            01/01/70 00:00      
                  How does someone get their hands on it?            01/01/70 00:00      
                     Hi Justin            01/01/70 00:00      
                        Depends on their line of business            01/01/70 00:00      
                        That might actually be harder            01/01/70 00:00      
                        I think that would have to be the way to go            01/01/70 00:00      
                           Thanks Steve and Andy,            01/01/70 00:00      
                              Not processor but skills of the developer that matters            01/01/70 00:00      
                              Open it ?            01/01/70 00:00      
                              the other two available MPU platforms            01/01/70 00:00      
                        The market.            01/01/70 00:00      
                           URL            01/01/70 00:00      
      Just for Reference PID is an old technology            01/01/70 00:00      
         Prove it....            01/01/70 00:00      
            Supposed Real life results            01/01/70 00:00      
               But are they relevant?            01/01/70 00:00      
                  The Engineering Principle            01/01/70 00:00      
                     Robust ?            01/01/70 00:00      
            Agreed - what a rubbish paper!            01/01/70 00:00      
   16amp pwm relay?            01/01/70 00:00      
      It's just a standard electro mechanical relay....            01/01/70 00:00      
         Sounds like the wrong part for the job, then?            01/01/70 00:00      
            The reason for the relay is....            01/01/70 00:00      
               lowest cost????            01/01/70 00:00      
               This looks like your USP opportunity!            01/01/70 00:00      
   Some more thought...            01/01/70 00:00      
   What kind of heaters have you tested it on ?            01/01/70 00:00      
   Congratulations!            01/01/70 00:00      
   Congratulations II !            01/01/70 00:00      

Back to Subject List