4 DIGITS THERMOMETER USING DS18B20 DIGITAL SENSOR
Updated on 17/01/2016 (a and b segments were swapped on drawing)
Counter based on PIC16F628A . Included C code and circuit diagram. Displays -55 to 125 centigrade. The temperature is read every 15 seconds, can be changed in the code. The math is using integers to calculate the degrees and the tenths of degrees are calculated separately.
The 7 segment LED is common cathode, 4 separate digits can be used with segments a to g linked.
You are free to use the circuit diagram and the software with no limitations.
OLED THERMOMETER USING DS18B20 DIGITAL SENSOR
Thermometer based on PIC16F628A
and DS18B20 digital sensor. Included C code and circuit diagram. Displays -55 to 125 centigrade. The temperature is read every 1 second. The math is using integers to calculate the degrees and the tenths of degrees are calculated separately.
Output at pin 3 can be used for driving a relay that is on when
temperature is higher than alarm setting. It can be used as a thermostat
or an alarm for over temperature. To set the alarm press SET for 2
seconds, then press DEGREE to set the alarm, then press SET again.
The OLED module is a 0.96" 128 X 64 pixel driven by I2C interface and
using SSD1306 driver IC. The OLED display uses low power LEDs and
suitable for battery operated. Power can be reduced farther by reducing
contrast.
You are free to use the circuit diagram and the software with no limitations.


Circuit Description
See also Technical Tips
LED Thermometer All transistors are BC337 or equivalent.
Total 5V supply current is 90mA.
The 4 digits display is common cathode, the 7 resistors of 220 ohms enable current of 15 mA for each segment which is on for 25% of the time. The seven segments, a to g, of one digit are linked to the corresponding seven segments in the other digits.
Segment e is connected differently because RA4 is an open drain output.
The 4 digits are multiplexed by pins 6-9 that drive the common cathodes cc1-cc4.
DP is the decimal point.
DS18B20 can be any type.
OLED Thermometer
Pushbuttons are NO DS18B20 can be any type. OLED module can be bought from ebay:
https://www.ebay.co.uk/itm/0-96-I2C-IIC-Serial-128X64-White-OLED-LCD-LED-Display-Module-for-Arduino-UK/192294699203?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2060353.m2749.l2649
|