The circuit is designed for a very specific operation: For the etching bath heater. I use this circuit for my homemade etching bath. A thermostat is a device that measures the temperature (in this case the temperature of the etching liquid), and according to a temperature window, will turn on or off the heater. This circuit has a fixed temperature window between 37 and 41oC. This can be changed of course very easy. I am preparing an etching bath and got an aquarium heater. Unfortunately, the heater's thermostat can be set up to 32oC. Higher temperatures are not proper for fish aquariums (unless you think of a fish soup). Therefore, i had to design my own thermostat.
The Circuit
This circuit has many things in common with another older circuit, the Low Cost PIC Thermometer. Actually, it uses the same technique to measure the temperature, not to mention that i use exactly the same NTC sensor (found in this experiment). The visualization of the temperature is done with 2 7-segment digits, instead of the LCD that i used with the previous circuit. So, this circuit can also be sued as a plain thermometer!
Additionally, i have add a relay. This relay will be actuated according to the temperature. If the temperature is above the bellow threshold, then the relay is actuated. The relay is released when the temperature goes above the high threshold. This is the schematic circuit:
The circuit uses it's own power supply, composed of a 2 diodes, 3 capacitors and the 7805. I use half wave rectification with the 1N4001 diodes. So, it can be powered directly from a 7 to 12V transformer. The PIC i have chosen is the 16F526. Why is that? Well, its a dead-cheap chip, with less than few capabilities, but surely enough for this application. My opinion is to always use the best PIC for the job. OK, i do not have the complete line up of Microchip, but i have more than 15 different PICs that i can choose from. This PIC was the closest to my "choosing" criteria for this application. And why is all this blah blah? This PIC has one great disadvantage: Low memory and tiny program counter. For those who understand of PIC programming, the memory page is just 256 bytes! So, if you want to change this program and/or expand it, then i strongly suggest you move to another PIC, otherwise you may get a headache.
The temperature sensor is a 10K NTC sensor, performing a voltage divider with a 10K Resistor. The output is shown in 2 7-seg digits, multiplexed with a NPN and a PNP transistor. With this technique, i save another (precious) line from the small 14-pin PIC. The schematic is for a HDK123 dual 7-seg display that i had chopped from an old TV, a VERY old TV - ITT brand.
The relay is driven with a 2N2222 switching transistor. An 1 AMP fuse in the high voltage part of the circuit will save you from troubles. If you plan to draw a schematic, you should consider thicker lines for this part of the circuit. I used the other part of the relay for LED indicator. Originally, the LED was connected to a PIC output, but it occupied a (precious) I/O pin.
The pin 13 (LPS1) is a free I/O with weak pull-up resistor in the pic, that can be used directly for a push-button, in case you decide to upgrade this circuit.
The thermistor is connected directly to the "THERM" connector of the circuit. As for the bus:
a1 and a2 goes to pin RC0
b1 and b2 goes to pin RC1
c1 and c2 goes to pin RC2
d1 and d2 goes to pin RC3
e1 and e2 goes to pin RC4
f1 and f2 goes to pin RC5
g1 and g2 goes to pin RB4
Downloads
Here is the complete project from the MPLAB for you to view/change and recompile:
The two threshold points, LOW and HIGH can be changed from the two constants at the beginning of the program, with the names GLLowThreshold and GLHighThreshold. The current compiled binary has the temperature window between 38 and 42oC.
If the 38-42 window fits your needs (for FeCl3 etchant this is perfect), then you can directly upload the following binary file to a PIC
At 19 October 2014, 16:41:27 user Ureche wrote: [reply @ Ureche]
Hi, any chance to tell us how do you calculate the temperature from adc? After you acquire the adc value what do you do with it? I saw you posted the code but i don't understand asm. Thanks.
@Noso I'm sorry, i do not do circuits or changes on demand.
At 1 November 2012, 7:38:17 user Noso wrote: [reply @ Noso]
Dear sir ,
I would like to thank you for this nice circuit , please if you can solve two issue :
1- let circuit show result in 3 segment it is very important if there is tempreture 37.5 for exaMPLE .
2- WHO to reste and set up set down the tempreature vie switch not from software .
please send to me the final update with hex code file and diagram .
thanks
At 8 July 2012, 20:40:14 user gina wrote: [reply @ gina]
Hi I am an Engineering student do you know of a circuitry with a job of providing power to two rods to heat up to a max and fixed temp of 45 degrees C and give an indication if the temperature is reached?
@Robert Thank you for your help.but what i want now is,how can i improve this circuit so that it can have 3 seven segments display so that it can write temperature in this way e.g 37.6.Plz PLZ PLZ help.the second thing is;i want u to show how to multiplex 2 or 3 separate 7 segments displays NOT THE WAY U HAVE DONE BECAUSE IT DOES NOT SHOW HOW ALL THE WIRES ARE CONNECTED TO THE 7 SEGMENT DISPLAY.
Thanks for the prompt reply. I am almost done with the schematic, I didn't find the PIC16F526 in the library, nor anywhere else. I chose a generic 14 PIN socket and went through the datasheet of the PIC to get the connections right.
Again, thank you for taking the time to answer me Giorgos. I appreciate.
@bone i'm afraid you haven't deactivated the "case sensitive".
At 26 March 2012, 2:38:28 user bone wrote: [reply @ bone]
hi, i am having trouble building your code on mplab. what is the value of passarg1-13 and waitcounter, waitcounter2. i think there are mistakes in the asm file.
there are 2 registers, GLLowThreshold and GLHighThreshold. These are the values that you need to change.
At 10 June 2011, 19:56:02 user tot wrote: [reply @ tot]
Kammenos HI! Thanks, I solved the problem, my browser did not support the download. Hex file is good, the switching temperature can not be rewritten, MPLAB asm file write error. Could some solution to the PROBLEM? thank you ......
@tot the download works correct. there is something wrong with your browser. remove any script blocker or other protection. or use mozilla firefox to download it.
At 9 June 2011, 6:52:14 user tot wrote: [reply @ tot]
Giorgos Hi! or who can help! Pic thermometer and thermostat built the project, but I can not download the HEX file. Please help. Enable download, MPLAB Asm file error, unfortunately I can not rewrite. Thank you for your help! László Tóth, Budapest, Hungary
And well im trying hard to learn, or and if i get stuck i can ask my college professor to program it for me. Trying to follow you tutorial in my spare time.
i wish they taught PIC programming in mechanical engineering too.
@Sayan yes leave pin12 unconnected is ok.
Pin 13 is explained in the document above (section "The Circuit")
If you lack of PIC programming knowledge, this is going to be tough...