PIC Digital Thermometer and Clock
Here you will find complete construction details including circuit diagrams, PCB layouts and PIC firmware (and the source code). The code was written in Proton PIC BASIC but the good news is that there is now a free version of this compiler available for download; AMICUS18.
** UPDATE 6th Jan 2012**
I’ve been asked how far from the main unit the temperature sensors can be located.
The unit I built had one sensor fixed within the unit (5cm of cable), and the other sensor located outside, but the cable run was actually probably only around 50cm.
When I tried a longer 5M cable, I couldn’t get the sensor to work, but everything I read indicated that several hundred meters should be possible without any hardware changes.
In desperation, I tried another sensor IC and hey-presto, it worked with the 5M cable I was using.
I purchased ten of the DS18B20 ICs off Ebay for less than £2 each and they all worked perfectly with the 5M cable; the original sensor would still only work over a short distance. I can only assume that I was unlucky to have obtained a semi-faulty sensor IC.
So, you should be able to use a sensor on at least a 5M cable run and if you have problems, I’d initially start with another sensor IC. In theory, you should be able to run over a much longer cable, but I’ve not tried that.
An eagle-eyed reader has also pointed out a couple of slight typos that I've fixed and I've change the PCB and circuit diagrams to accept 12way Molex connectors instead of the now hard-to-find 11way ones.
** UPDATE 6th Jan 2012**
I’ve been asked how far from the main unit the temperature sensors can be located.
The unit I built had one sensor fixed within the unit (5cm of cable), and the other sensor located outside, but the cable run was actually probably only around 50cm.
When I tried a longer 5M cable, I couldn’t get the sensor to work, but everything I read indicated that several hundred meters should be possible without any hardware changes.
In desperation, I tried another sensor IC and hey-presto, it worked with the 5M cable I was using.
I purchased ten of the DS18B20 ICs off Ebay for less than £2 each and they all worked perfectly with the 5M cable; the original sensor would still only work over a short distance. I can only assume that I was unlucky to have obtained a semi-faulty sensor IC.
So, you should be able to use a sensor on at least a 5M cable run and if you have problems, I’d initially start with another sensor IC. In theory, you should be able to run over a much longer cable, but I’ve not tried that.
An eagle-eyed reader has also pointed out a couple of slight typos that I've fixed and I've change the PCB and circuit diagrams to accept 12way Molex connectors instead of the now hard-to-find 11way ones.
The above movie clips shows the prototype running on a bread-board. You can see me sqirt freezer spray over the temperature sensor in the bottom left of the picture (looks like a transistor), and then you can see the temperature start to drop, then start to raise back to room temperature.
The large black cable in the foreground you can see, is the PIC programming cable, and the display is made from four, 2" displays. (These were common cathode in the prototype but changed to common anode in the final version).
The electronics run at 5v, but the LED displays need to use 12v because of their size. The movie on the right is the finished project running. It cycles between two temperature sensors and then shows the current time.
The large black cable in the foreground you can see, is the PIC programming cable, and the display is made from four, 2" displays. (These were common cathode in the prototype but changed to common anode in the final version).
The electronics run at 5v, but the LED displays need to use 12v because of their size. The movie on the right is the finished project running. It cycles between two temperature sensors and then shows the current time.
Notice the temperature in the second picture of 25.1 matches the display on my laser thermometer. Not bad for a £4 sensor from Dallas/Maxim semiconductors.
File Download
The below file (around 1.2MB) contains the following files:
|
DigitalTempV4.bas
DigitalTempV4.hex Version2.dch Version1.dip CircuitV5.pdf ThermometerV5.pdf |
This is the source code for the PIC and was compiled using the AMICUS18 compiler from Crownhill
This is the PIC .HEX file that can be programmed directly into the PIC DipTrace format circuit diagram. DipTrace is available for free DipTrace format PCB foils. PDF Version of the circuit diagram (should be easier to read) Construction details for this project. This was revised on the 8th Jan 2012 to include some minor corrections. |
| thermometerv5.zip | |
| File Size: | 1032 kb |
| File Type: | zip |






