Digital thermometer with PIC16F84 circuit

Summary of Digital thermometer with PIC16F84 circuit


This project is a simple digital thermometer using a PIC16F84A microcontroller that measures ambient temperature by exploiting variations in the watchdog timer (WDT) time-out period instead of a separate temperature sensor. It counts WDT time-outs, calibrates time-out versus temperature, and maps counts to degrees Celsius. The device normally sleeps to save power, wakes on key press to display temperature, and offers a calibration mode to store new calibration values.

Parts used in the Digital thermometer with PIC16F84:

  • PIC16F84A microcontroller
  • LEDs for temperature display
  • Pushbutton(s) or keys (TEMP key and calibration controls)
  • Resistors (for LEDs and pull-ups as required)
  • Capacitors (for power decoupling and stability)
  • Crystal or resonator (if used for clock, optional depending on design)
  • Power supply (battery or regulated DC source)
  • PCB or prototyping board and wiring
This electronic project is a very simple thermometer that is based on the PIC16F84A microcontroller, designed by Microchip.
Why to use a thermometer that is designed using a microcontroller and not a classic analog thermometer? Because you can design a complex solution using few external components, resulting an low cost application that provide a high precision measurement .
Digital thermometer with PIC16F84 circuitThis Digital thermometer microcontroller project use watchdog timer function to measure temperature. The WDT on all PIC-micro microcontrollers has a nominal time-out period of 18 ms. The WDT time-out period varies with temperature, VDD and part-to-part process variations.
Without using a separate temperature sensor, it is possible to calculate the temperature with reasonable accuracy using the WDT time-out period.
To translate the environment temperature into an actual reading, the system must be able to do the following:
• Provide a method for establishing time-out to temperature calibration
• Count the number of WDT time-outs for a given period of time
• Equate the number of time-outs to a temperature
The PIC16F84A microcontroller is normally in SLEEP mode, consuming
very little operating current but if any key is pressed, it ‘wakes up’ from SLEEP and updates the WDT count, and checks for additional key presses. If there are none, it returns to SLEEP mode.
The WDT Thermometer has three distinct operating modes:
Digital thermometer with PIC16F84 circuit SchematicSLEEP Mode: This is the default mode the system starts in when power is applied .
Display Mode: When the TEMP key is pressed, the system wakes up and the LEDs show the temperature
in degrees Centigrade.
Calibration Mode: This mode creates a set of new calibration values, in addition to those present in the firmware.

Quick Solutions to Questions related to Digital thermometer with PIC16F84:

  • How does this thermometer measure temperature without a separate sensor?
    It measures temperature by counting variations in the PIC16F84A watchdog timer time-out period, which varies with temperature.
  • Can the thermometer work while minimizing power consumption?
    Yes. The PIC16F84A stays in SLEEP mode by default, consuming little current, and wakes only when a key is pressed.
  • What are the operating modes of the WDT thermometer?
    The three modes are SLEEP Mode, Display Mode (shows temperature in degrees Centigrade), and Calibration Mode (creates new calibration values).
  • How is temperature translated into an actual reading?
    The system establishes a time-out to temperature calibration, counts WDT time-outs over a period, and equates the count to a temperature.
  • Why use a microcontroller-based thermometer instead of an analog thermometer?
    Because it allows building a complex, low-cost solution with few external components that provides high-precision measurement.
  • Does the WDT time-out period remain constant?
    No. The WDT time-out period varies with temperature, VDD, and part-to-part process variations.
  • When does the PIC16F84A update the WDT count?
    It updates the WDT count when it wakes from SLEEP mode after a key press and checks for additional key presses before returning to SLEEP.

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