| ||
20 February 2010 Author: Giorgos Lazaridis PIC Thermometer and Thermostat
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 41 °C. 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 32 °C. 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:
Downloads Here is the complete project from the MPLAB for you to view/change and recompile:
For compiling the above assembly sheet, you will need to have the P16F526 header file:
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 42 °C. 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
Bill Of Materials Relative pages
Comments
|
![]() ![]() ![]()
|
Home
Contact
Forum
Projects
Experiments
Circuits
Theory
BLOG
PIC Tutorials
Tech-News
RSS
Site design: Giorgos Lazaridis © Copyright 2008 Please read the Terms of services and the Privacy policy |