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   

18 August 2011
Author: Giorgos Lazaridis
K-Type Thermocouple PID Controller





Worklog - The System overall (September 18 2011)

My new Aoyue 968 hot-air SMD station

I plan to make a pre-heater for my SMD works, and i will need a controller for the air heater. From my job i know the PID controllers and how efficient they are, but i did not really know how they work. After some research i did, i sound the "secrets" of the PID systems (and i also wrote a theory for PID systems). So, now i feel ready to turn theory into product. Many will say again that i could spent $40 to get a PID controller... Yes, i know... But i DON'T want to. For me, making projects is not a chore, it is my hobby, i do it for fun.




The Idea

Here is what i plan to make. It will be a board with 2 rows of 3 7-segment displays. The top row will show the actual temperature and the bottom the set temperature. Like my soldering station, i will use the MAX6675 - Cold-Junction-Compensated K-Thermocouple-to-Digital Converter from Maxim. This chip converts a thermocouple pair temperature into digital readout, and also compensates the cold junction temperature.

I plan to use a PIC 16F1937 or one of my new 16F1939 SMD chips. Most probably i will use the huge PDIP chip, because i have a lot of them still in my stock. There will be 2 potentiometers for setting the temperature and the air flow. So the controller will have a PWM output for controlling the fan speed. For the heater, i will use the same method as i use for my soldering station. A BT136D TRIAC can deliver enough current to control a 900 watts heater. A MOC3021 optocoupler will control the gate of the TRIAC

This will be my first project that i will use more SMD components than through-hole components, so i'm very excited!




The Circuit

I will do no prototyping for this project, so i need to be extra careful and double check everything. Here is the schematic diagram for the controller board (click to enlarge):





The image is not very clear and i have used a lot of busses to simplify, so i have to upload the eagle files as well. I usually do not upload such files but this time i must. So, here they are:



 K-Type Thermocouple PID Controller - Eagle Schematic V1.0



Bill Of Materials
Resistors
R1Resistor 220 Ohm 1/4 Watt 5% Carbon Film 
R2Resistor 220 Ohm 1/4 Watt 5% Carbon Film 
R3Resistor 22 Ohm 1/4 Watt 5% Carbon Film
R4Resistor 220 Ohm 1/4 Watt 5% Carbon Film 
R5Resistor 22 Ohm 1/4 Watt 5% Carbon Film
R6Resistor 220 Ohm 1/4 Watt 5% Carbon Film 
R7Potentiometer 5 KOhm Linear Rotary 1/2W
R8Resistor 22 Ohm 1/4 Watt 5% Carbon Film
R9Resistor 22 Ohm 1/4 Watt 5% Carbon Film
R10Resistor 22 Ohm 1/4 Watt 5% Carbon Film
R11Resistor 22 Ohm 1/4 Watt 5% Carbon Film
R12Resistor 22 Ohm 1/4 Watt 5% Carbon Film
R13Potentiometer 5 KOhm Linear Rotary 1/2W
R14Resistor 2.2 KOhm 1/4 Watt 5% Carbon Film 
R15Resistor 2.2 KOhm 1/4 Watt 5% Carbon Film 
R16Resistor 2.2 KOhm 1/4 Watt 5% Carbon Film 
R17Resistor 2.2 KOhm 1/4 Watt 5% Carbon Film 
R18Resistor 2.2 KOhm 1/4 Watt 5% Carbon Film 
R19Resistor 2.2 KOhm 1/4 Watt 5% Carbon Film 
R20Resistor 10 KOhm 1/4 Watt 5% Carbon Film 
R21Resistor 1 KOhm 1/4 Watt 5% Carbon Film 
R22Resistor 3.3 KOhm 1/4 Watt 5% Carbon Film
R23Resistor 1.8 KOhm 1/4 Watt 5% Carbon Film
R24Resistor 870 Ohm 1/4 Watt 5% Carbon Film
R25Resistor 1.8 KOhm 1/4 Watt 5% Carbon Film
Capacitors
C1Electrolytic Capacitor 1000 uF 16 Volts
C2Electrolytic Capacitor 1 uF 50 Volts
C3Electrolytic Capacitor 1000 uF 16 Volts
C4Electrolytic Capacitor 1 uF 50 Volts
C5Ceramic Capacitor 0.1 uF 50 Volts
C6Ceramic Capacitor 0.1 uF 50 Volts
Transistors-Diodes
T1BT136D Sensitive gate TRIAC 
T2BC517 NPN Darlington Transistor 
D71N4148 Switching Diode 
Integrated Circuits
IC1PIC 16F1937 Microcontroller 
IC27805 Positive Voltage Regulator 
IC3MAX 6675 Cold-junction compensated K-Thermocouple to digital converter (0°C to +1024°C) 
IC4CD4511BC BCD to 7-Segment Latch/Decoder/Driver 
IC5ULN2003A High Voltage - High Current Darlington Arrays 
IC6MOC3021 Random Phase Optoisolator TRIAC Driver Output 
IC7DF02M 1.5 Ampere Bridge Rectifiers 
Misc
L1100uH Inductor















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 July 2014, 16:14:59 user Mike wrote:   [reply @ Mike]
    • Nice project and good presentation - are the programming codes available?

      Mike


  • At 11 May 2014, 13:51:18 user panayiotis wrote:   [reply @ panayiotis]
    • file gia.molis tora se brika ke ise poli endiaferon. exo mia idea gia pio statheri thermokrasia gia pid temp controllers.nomizo pos tha itan kalitera an anti na kobete to power apo to heating elemend , apla na mionete kai na afksanete otan pesi I thermokrasia,etsi o xronos pou xriazete gia na ftafi I antistasi sto maximum pig temp tha ine poli ligoteri kai to lathos ligotero. ti nomizis, ? se efxaristo.


  • At 3 June 2013, 8:03:06 user Giorgos Lazaridis wrote:   [reply @ Giorgos Lazaridis]
    • @Angeltech Follow the schematic as shown - I added the wire after i discovered the problem with the PCB, so there may be pictures without the wire. I really cannot remember what happened.
      As for the fan, you need an oscilloscope to see if the PWM pulses arrive at the fan.


  • At 2 June 2013, 11:01:44 user Angeltech wrote:   [reply @ Angeltech]
    • Sir I have no luck with fan speed in 3 or 4pin fan still not working right, hope you could help another thing is do I have to connect pin 23 and pin 6 of microcontroller seems you just connect it and remove on the demonstration picture. please advice.

      Thank you very much.

      Regards,

      Angeltech


  • At 2 June 2013, 10:29:57 user angeltech wrote:   [reply @ angeltech]
    • Sir thank you very much, now the 7 segment brightness is the same, still working on the fan problem maybe I have to change the darlington transistor which i used C4169 that contains diode and zener that might effect the control signal.


  • At 21 May 2013, 4:56:18 user Giorgos Lazaridis wrote:   [reply @ Giorgos Lazaridis]
    • @Angeltech I used 2 different display sets so i have different delays to have same brightness. What you want to do not is go to the "Display.inc" file and replace the "call Wait390uSec" with "call wait2mSec" (found 3 times).

      For the PWM, i'm not sure what the problem is. It should work.


  • At 18 May 2013, 16:11:24 user Angeltech wrote:   [reply @ Angeltech]
    • Hello Sir:

      I have duplicate your circuit and working with v.1.1 hex file program to the PIC chip, the problem I encountered is the following:

      1. 7-sigment display on the top portion all 3 7-segment displays is dim but it displays the temperature right. Not like the lower 3 7-segment is bright and clear with same 7 segment part number.

      2. the Fan controller pot not working, it never slows down as adjusted.

      Hope you could help me with this, I don't have very much background with regards to programming. and I really like the circuit and the functionality.


      Regards,

      Angeltech


  • At 6 November 2012, 11:51:13 user Giorgos Lazaridis wrote:   [reply @ Giorgos Lazaridis]
    • @Iuliu well, actually i do, but i have not finish the housing. I stuck in the nozzle which was originally from special plastic, but it was eventually not so special to withstand the heat of the resistor which accidentally came into contact - so it burned into flames. I will make it from stainless steel or something like that.


  • At 3 November 2012, 18:56:27 user Iuliu wrote:   [reply @ Iuliu]
    • Hello Giorgos Lazaridis have you made the new proiect "a PCB preheater" ?
      I'm thinking to do my self to,but i want to use 16f819 ,that pic i have about 5 pieces,my question is is fast enough at 4 Mhz clock?


  • At 10 July 2012, 20:45:27 user Mr-H wrote:   [reply @ Mr-H]
    • Hi nice job
      but from what i see here, the systeme is unstable


  • At 25 June 2012, 5:03:46 user Giorgos Lazaridis wrote:   [reply @ Giorgos Lazaridis]
    • @Ricardo The layout had errors, check this page:
      http://www.pcbheaven.com/projectpages/K_Type_Thermocouple_PID_Controller/?p=2&topic=worklog
      I have not correct these errors, so you will need to find and correct them yourself. If this is ok with you, i can send the layout to your email. And if you correct these errors and it works, you can send them back so i can then upload them in the site.


  • At 24 June 2012, 20:57:24 user Ricardo wrote:   [reply @ Ricardo]
    • Hi! Could u provide us the layout of PCB?


  • At 24 June 2012, 15:48:30 user Giorgos Lazaridis wrote:   [reply @ Giorgos Lazaridis]
    • @Ricardo unfortunately i cannot help you with this. you need to do it yourself.


  • At 24 June 2012, 15:32:47 user Ricardo wrote:   [reply @ Ricardo]
    • Ok, I just want to know how to do the change of 16F1937 to another one like 16F877A or 18F4520. Can u help us with this? Regards!


  • At 24 June 2012, 11:48:35 user Giorgos Lazaridis wrote:   [reply @ Giorgos Lazaridis]
    • @Ricardo The worklog is here:
      http://www.pcbheaven.com/projectpages/K_Type_Thermocouple_PID_Controller/?p=0&topic=worklog

      There are 5 pages in which i explain exactly how i made it. As for the parts, i cannot help you with them. You need to locate them from your local market, or order them from internet like from farnell.com


  • At 24 June 2012, 10:59:40 user Ricardo wrote:   [reply @ Ricardo]
    • Hi! I know there are a lot of information in your website but I can not find some parts like these:
      IC1 PIC 16F1937 Microcontroller
      IC3 MAX 6675 Cold-junction compensated K-Thermocouple to digital converter (0°C to 1024°C)
      IC5 ULN2003A High Voltage - High Current Darlington Arrays
      IC6 MOC3021 Random Phase Optoisolator TRIAC Driver Output
      IC7 DF02M 1.5 Ampere Bridge Rectifiers
      Also, I'd like to ask you the source code in assembly...


  • At 23 June 2012, 16:29:45 user Giorgos Lazaridis wrote:   [reply @ Giorgos Lazaridis]
    • @Ricardo But everything is in my site. go to the worklog tab and you will find everything there.


  • At 23 June 2012, 16:17:14 user Ricardo wrote:   [reply @ Ricardo]
    • Hi! Assembly it will be nice for me...Can you provide the source code? I want to buy the hardware (PCB) already done/working but I need the 18F4520 instead 16Fxxxx. I don't have time to do it myself and I won't find some parts in my place so, let's talk about...Can you help me? Since now, thanks a lot!


  • At 23 June 2012, 6:08:32 user Giorgos Lazaridis wrote:   [reply @ Giorgos Lazaridis]
    • @Ricardo hello! I'm sorry but i do not program in C, only in assembly.


  • At 23 June 2012, 1:47:32 user Ricardo wrote:   [reply @ Ricardo]
    • Hello!! How's it going? I'm stating Control&Automation Engineering and I liked your job..very nice! So, I have a question, Is there any chance you provide me the source code in C ? I would like to learn how to program PID ALg into a PIC18F4550 using MikroC compiler so, could u help me, please? In last case, Do u have PayPal account? ;) Let's go deal!


  • At 27 January 2012, 12:26:09 user Giorgos Lazaridis wrote:   [reply @ Giorgos Lazaridis]
    • @awan i've been trying to convert the old-style articles (like this one) with the new style articles. I have already upload the TCPDF library, but i cannot get it to work. I hope everything will work well in the end.


  • At 27 January 2012, 6:39:54 user awan wrote:   [reply @ awan]
    • thanks bro for sharing ur project it will be very kind if u share pcb file for this project ....


  • At 8 November 2011, 2:17:21 user Brian S wrote:   [reply @ Brian S]
    • Thanks for the details. It is a pleasure to read or listen to your instructive discussions regarding your interesting projects. I like your attention to intelligent detail.


  • At 22 August 2011, 11:59:14 user Kammenos wrote:   [reply @ Kammenos]
    • @Drone i have both of them in stock ;) I think that MAX6675 is discontinued


  • At 22 August 2011, 11:51:32 user Drone wrote:   [reply @ Drone]
    • Don't use the MAX6675. In late June this year Maxim came out with the MAX31855. It is a better part IMO.


  • At 22 August 2011, 11:25:35 user Kammenos wrote:   [reply @ Kammenos]
    • @Fung they are different brands. Same type, same connection, different brand.


  • At 21 August 2011, 16:03:25 user Fung wrote:   [reply @ Fung]
    • Why do 3 of the 7-segment displays have different surface color? Are they specified to use?


  • At 18 August 2011, 22:35:09 user _pike wrote:   [reply @ _pike]
    • My opinion is to buy the same chip instead of trying to recompile the full programm also sometimes some fuctions are different from pic to pic....it is not worthy recompiling....


  • At 18 August 2011, 17:06:43 user Kammenos wrote:   [reply @ Kammenos]
    • @Stefan i'm sorry but i do not do circuits (nor programs) on demand. You will need to do the change yourself, or get a same PIC. As for the ULN, it is a darlington pair array. Instead of using 6 transistors i use this.


  • At 18 August 2011, 16:42:49 user Stefan wrote:   [reply @ Stefan]
    • Good job,I have a plans for this,but there not in function.So I would like you to finish this project and to build one for myself.But I don't have that PIC microcontroller that you're using I want to use PIC16F877A(887 etc.) can you recompile for it?And I want to know why there is ULN2023,what is his job? :D



    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