Home     Contact     Projects     Experiments     Circuits     Theory     BLOG     PIC Tutorials     Time for Science     RSS     Terms of services     Privacy policy  
   
 Home      Projects     Experiments     Circuits     Theory     BLOG     PIC Tutorials     Time for Science   

3 December 2011
Author: Giorgos Lazaridis
Triple PID Temperature Controller





Worklog - The Schematic Diagram (December 7 2011)

Here is a screenshot from the schematic diagram. Since the resolution is very bad and since i use may buses and labels, i will upload the eagle files as well:





Top left is the power supply. Since this circuit is going to operate in a very noisy environment, i had to add some extra filtering blocks. C1 C2 and L1 is a Π filter to reduce EMI and voltage spikes. The input is then regulated to 5 volts with a 7805. A second Π filter is used to filter the 5 volts. Since the PIC that i be using operates at 3.3V, i added an LM317 (IC3).

The LCD (top right) is a 20 by 4 character LCD display with the HD44780U Hitachi controller. At the bottom there are 3 sub-circuits. The first (bottom left) is a PWM LCD contrast adjustment circuit. Actually, this is a low pass filter (R7-C5) driven from a voltage amplifier (T1-R6). I have a page in which i explain in details how this PWM LCD contrast adjustment circuit works.

At the bottom mid of the schematic is the second sub-circuit. This is the LCD brightness adjustment. Since the LCD has LED backlit, pure PWM pulses are enough to change the brightness. But the PIC outputs only 3.3V with a maximum of 20mA. The first transistor (T2) is a common emitter voltage amplifier which amplifies the PIC output from 3.3 to 5 volts. The second transistor (Q1) is a typical emitter follower (common collector) to provide maximum current for the LEDs. Finally, the third sub-circuit (bottom right) is a set of pull-up resistors for the 4 inputs.

The main portion of the circuit is at the middle of the page. On the left side there are the 3 MAX31855J chips for the J-type thermocouples. The chips are directly interfaced with the PIC which is at the center of the page. As always, i add an on-board push-button for hardware reset. The PIC is programmed through the ICSP connector on the right side.

Here is the Eagle .sch file:

 Triple PID Controller - Eagle Schematic V1.1



Bill Of Materials
Resistors
R1Resistor 390 Ohm 1/4 Watt 5% Carbon Film
R2Resistor 680 Ohm 1/4 Watt 5% Carbon Film
R3Resistor 10 KOhm 1/4 Watt 5% Carbon Film 
R4Resistor 100 Ohm 1/4 Watt 5% Carbon Film 
R5Resistor 22 KOhm 1/4 Watt 5% Carbon Film 
R6Resistor 4.7 KOhm 1/4 Watt 5% Carbon Film 
R7Resistor 680 Ohm 1/4 Watt 5% Carbon Film
R8Resistor 180 Ohm 1/4 Watt 5% Carbon Film
R9Resistor 180 Ohm 1/4 Watt 5% Carbon Film
R10Resistor 180 Ohm 1/4 Watt 5% Carbon Film
R11Resistor 180 Ohm 1/4 Watt 5% Carbon Film
R12Resistor 180 Ohm 1/4 Watt 5% Carbon Film
R13Resistor 1 KOhm 1/4 Watt 5% Carbon Film 
R14Resistor 3.3 KOhm 1/4 Watt 5% Carbon Film
R15Resistor 10 KOhm 1/4 Watt 5% Carbon Film 
R16Resistor 2.2 KOhm 1/4 Watt 5% Carbon Film 
R17Resistor 100 Ohm 1/4 Watt 5% Carbon Film 
R18Resistor 100 Ohm 1/4 Watt 5% Carbon Film 
R19Resistor 100 Ohm 1/4 Watt 5% Carbon Film 
R20Resistor 100 Ohm 1/4 Watt 5% Carbon Film 
R21Resistor 6.8 KOhm 1/4 Watt 5% Carbon Film
R22Resistor 6.8 KOhm 1/4 Watt 5% Carbon Film
R23Resistor 6.8 KOhm 1/4 Watt 5% Carbon Film
R24Resistor 6.8 KOhm 1/4 Watt 5% Carbon Film
Capacitors
C1Electrolytic Capacitor 470 uF 16 Volts
C2Electrolytic Capacitor 470 uF 16 Volts
C3Electrolytic Capacitor 470 uF 16 Volts
C4Electrolytic Capacitor 1 uF 50 Volts
C5Electrolytic Capacitor 47 uF 16 Volts
C6Electrolytic Capacitor 100 uF 16 Volts
C7Ceramic Capacitor 0.1 uF 50 Volts
C8Ceramic Capacitor 0.1 uF 50 Volts
C9Ceramic Capacitor 0.1 uF 50 Volts
Transistors-Diodes
T1MMBT2222 NPN General Purpose Amplifier 
T2MMBT2222 NPN General Purpose Amplifier 
Q1MMBTA14 NPN Darlington Transistor 
D1PMLL4148 High-speed diode 
Integrated Circuits
IC1PIC 16LF1939 Microcontroller 
IC3LM317 3-Terminal Adjustable Regulator 
IC4DF02M 1.5 Ampere Bridge Rectifiers 
IC57805 Positive Voltage Regulator 
IC47805 Positive Voltage Regulator 
U1MAX31855 Cold-Junction Compensated Thermocouple-to-Digital Converter 
U2MAX31855 Cold-Junction Compensated Thermocouple-to-Digital Converter 
U3MAX31855 Cold-Junction Compensated Thermocouple-to-Digital Converter 
Misc
L1100uH Inductor
L2100uH Inductor
LCD1LCD 20x4 Character LCD w/ HD44780U1 controller  


















Comments

  Name

  Email (shall not be published)

  Website

Notify me of new posts via email


Write your comments below:
BEFORE you post a comment:You are welcome to comment for corrections and suggestions on this page. But if you have questions please use the forum instead to post it. Thank you.


      

  • At 13 November 2015, 16:59:17 user Larry Smith wrote:   [reply @ Larry Smith]
    • This project is probably a stretch. Heater control is a big deal in industry and there are already many complex solutions to heating control. Each situation is different and the designer must know the parameters and tolerances he is working with. It is not possible for the equipment operator to be expected to adjust the PID parameters on the fly because that is the engineer's job and a very complicated one at that. Plus, the indiscriminate adjustment of various parameters on the fly can easily cause system instability that is difficult to understand and correct unless all the system details are known. You will probably NOT want to use 3 discreet resistors for the heating. Typcially a pot like this is heated using banded silicone surface heaters wrapped around the pot. You must define the allowable temperature variation under operating conditions and how quickly the temperature must stabilize. From that data you can specify how much power the controller must be designed for. The smaller the allowable temperature variation, the higher the required power. Heating control is a bit simpler than, say, a robotic arm or other mechanical device and I doubt you will need derivative factors to do it. Just the capacity to change the temperature of the pot - under various states of fill - should do it. Remember that as soon as liquid is poured from the pot, the applied power will need to be reduced immediately to avoid overheating the remaining fluid. I suggest checking into alternative sensing devices such as IR optical/temperature sensing to avoid breakdown of the tiny thermocouples. You will also get more accurate readings on temperature than a t.c. placed on the outside of the pot. These solutions are difficult and expensive. Have a look at the control circuitry that exists at the industrial level and you will get an idea of how complex it can be. Programming the PID parameters is an iterative process and cannot be done from a set of tables. Good project - not many out there that can do this work. Good Luck.


  • At 2 May 2013, 5:01:35 user Giorgos Lazaridis wrote:   [reply @ Giorgos Lazaridis]
    • @francois This chip does not need compensation. It has built in compensation. If the numbers are wrong, check if the chip has a problem.


  • At 24 April 2013, 9:35:47 user francois wrote:   [reply @ francois]
    • hi. i manage to get the right temp reading from a max31855k with k type probe but not from the max31855j with j type probe.

      my code for k type:
      char pcntr;
      char bita;
      float tempIC;
      unsigned long valueIC = 0;

      TCLK = 0;
      TCS = 0;
      // TCLK = 1;
      // TCS = 1;
      // __delay_ms(10);
      for (pcntr = 0 ; pcntr <32 ; pcntr )
      {
      TCLK = 1; // set clk pin low
      // __delay_ms(10);
      bita = TDAT;
      if(bita == 1)
      {
      valueIC = valueIC | 1;
      }

      // Tbits[pcntr] = TDAT;
      // __delay_ms(10);
      TCLK = 0;
      // __delay_ms(10);
      if(pcntr !=31)
      {
      valueIC = valueIC<<1;
      }
      }

      TCS = 1;
      valueIC = (valueIC>>18) & 0x3fff;

      valueIC = valueIC * 0.25;
      TEMPFROMIC =valueIC * 0.25;

      /// it gives value in degrees celcius
      but when i use j type ic and probe my readings are a little off.. how do i compensate?


  • At 18 December 2011, 10:38:54 user herctrap wrote:   [reply @ herctrap]
    • you could used the female header for the lcd

      and the male header for the pcb


  • At 4 December 2011, 22:52:44 user George wrote:   [reply @ George]
    • farnell / element14 has the 44pin TQFP package in 1 of quantities their reference 1770669

      Cheers


  • At 4 December 2011, 15:03:39 user Bartek wrote:   [reply @ Bartek]
    • I understand. Thanks for a reply, and good luck with your project.


  • At 4 December 2011, 13:57:37 user Kammenos wrote:   [reply @ Kammenos]
    • @Bartek thyristors would certainly work. But as i explained, i do not want to put high currents on the board for 2 main reasons: First this will increase the size of the board. I want the board to have the same size as an LCD 20 by 4 board. And second, to drive 12 amperes a thyristor will need a large heatsink. Solid state relays are not that expensive after all, and there are nice large heatsinks for SSRs suitable for electric cabinet installation.
      But most important is that this controller will be used in an industrial application (in a big factory that makes wooden furniture), which means that the most vulnerable parts must be quickly and easily accessible and replaceable.


  • At 4 December 2011, 13:02:34 user Bartek wrote:   [reply @ Bartek]
    • It's your project, so you will make it as you like of course:)
      What do you think about thyristors?


  • At 4 December 2011, 10:13:18 user Kammenos wrote:   [reply @ Kammenos]
    • @Bartek I have already make other PID controllers. Therefore, for me, it is not a big deal to triple the program and make a triple PID. I may not use the D term at all, the reaction time of the system is slow and kinda stable.
      But After all, it is more fun to make a PID controller -even if it is actually PI. And as i always say, something that is not fun to do it, its not worth doing it.


  • At 4 December 2011, 9:19:34 user Bartek wrote:   [reply @ Bartek]
    • Hello, control engineering student here.
      Although PID controller is very fancy, i believe in this sort of application it\'s an overkill. As long as you don\'t have to control temperature very precisely and the reference trajectory is not going to change rapidly too often, I\'d recommend using a simple two-state regulator with hysteresis. With PID, you have to take care of noises(I believe you know what happens when you try to calculate the derivative of noisy signal), also, you should implement anti-windup mechanism. Lot of coding and lot of possibility of problems. Two-state regulator requires just a few lines of code.
      And instead of using a solid state relays, maybe a thyristors would be a cheaper and more reliable solution?


  • At 4 December 2011, 6:29:19 user Kammenos wrote:   [reply @ Kammenos]
    • @George yes indeed, but Microchip offers this package only in 1000 reel :/

      @Cheerio I felt exactly the same when i received the package. With the hot-air it is very easy to solder it. And in comparison with the PDIP package, this one needs at least half of the time to solder it.


  • At 4 December 2011, 4:11:02 user George wrote:   [reply @ George]
    • It also comes in a tabbed package - so you can solder it


  • At 4 December 2011, 1:30:34 user cheerio wrote:   [reply @ cheerio]
    • This package is a pain in the ass.
      I don't have a hot air station :(



    delicious
    digg
    reddit this Reddit this
    Faves



     HOT in heaven!


    NEW in heaven!



    New Theory: AC electric motor working principle



     Contact     Forum     Projects     Experiments     Circuits     Theory     BLOG     PIC Tutorials     Time for Science     RSS   

    Site design: Giorgos Lazaridis
    © Copyright 2008
    Please read the Terms of services and the Privacy policy