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.
** UPDATED 17th Aug 2013 **
There was a bug in the firmware that prevented the backup battery from being recharged correctly.
** UPDATED 18th April 2013 **
The PIC firmware has been updated to reduce display flicker whilst giving brighter digits, and the code is not a lot simpler to change. It should be very easy to change the length of time the time and temperatures are shown. I’ve also updated some of the comments to help people who want to make changes.
** 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.
For more detail: PIC Digital Thermometer and Clock
Current Project / Post can also be found using:
- clock with temperature pic16f628a