4 DIGITS THERMOMETER USING DS18B20 DIGITAL SENSOR

Summary of 4 DIGITS THERMOMETER USING DS18B20 DIGITAL SENSOR


This article describes a 4-digit digital thermometer using the PIC16F628A microcontroller and DS18B20 sensor, displaying temperatures from -55°C to 125°C. The system reads data every 15 seconds, utilizing integer math for whole degrees and separate calculations for tenths. It features a common cathode 7-segment display driven by multiplexing pins, with segment logic adjusted for the RA4 open-drain output.

Parts used in the 4-Digit Digital Thermometer:

  • PIC16F628A microcontroller
  • DS18B20 temperature sensor
  • Common cathode 7-segment LED display (4 digits)
  • BC337 transistors or equivalents
  • Seven 220 ohm resistors
  • 5V power supply

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.

4 DIGITS THERMOMETER USING DS18B20 DIGITAL SENSOR
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.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.

For more detail:    4 DIGITS THERMOMETER USING DS18B20 DIGITAL SENSOR

Quick Solutions to Questions related to 4-Digit Digital Thermometer:

  • What temperature range does this counter display?
    The device displays temperatures ranging from -55 to 125 centigrade.
  • How often is the temperature read?
    The temperature is read every 15 seconds, though this interval can be changed in the code.
  • What type of transistor is used in the circuit?
    All transistors used are BC337 or equivalent models.
  • How is the decimal point calculated in the math?
    The math uses integers for degrees while the tenths of degrees are calculated separately.
  • Why is Segment e connected differently?
    Segment e is connected differently because RA4 is an open drain output.
  • How are the four digits controlled?
    The four digits are multiplexed by pins 6-9 that drive the common cathodes cc1-cc4.
  • What is the total current consumption of the 5V supply?
    The total 5V supply current is 90mA.
  • What resistor value enables 15 mA per segment?
    Seven resistors of 220 ohms enable a current of 15 mA for each active segment.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter