Projects   /   LCD & Display Projects   /   PIC16F877A

Digital Thermometer using pic microcontroller and MCP9700

In this article you will learn, Digital Thermometer using pic microcontroller and MCP9700:

Published
Updated

At a glance

CategoryLCD & Display Projects
PIC modelPIC16F877A
Reading time~4 min
Jump to a section
  1. Material Required
  2. LM35 Temperature Sensor:
  3. ADC in PIC Microcontroller PIC16F877A:
  4. Quick Solutions to Questions related to Digital Thermometer using PIC Microcontroller:
  5. Related projects

Summary of Digital Thermometer using pic microcontroller and MCP9700

This tutorial details building a digital thermometer using a PIC16F877A microcontroller and an LM35 temperature sensor. The system reads analog voltage from the sensor, converts it via the internal SAR ADC, and displays the Celsius value on a 16x2 LCD. The project requires a PicKit 3 for programming, a 20 MHz crystal oscillator, a 7805 voltage regulator, and various passive components like resistors, capacitors, and a potentiometer to ensure accurate temperature measurement without external calibration.

Parts used in the Digital Thermometer using PIC Microcontroller:

  • PicKit 3
  • LM35 Temperature Sensor
  • 16*2 LCD
  • PIC16F877A IC
  • 40 - Pin IC holder
  • Perf board
  • 20 MHz Crystal OSC
  • Female and Male Bergstick pins
  • 33pf Capacitor (2 Nos), 100uf and 10uf cap
  • Resistors: 680 ohm, 220 ohm, 10K, and 560ohm
  • Potentiometer 10k
  • LED of any color
  • Soldering kit
  • IC 7805
  • 12V Adapter
  • Connecting wires
  • Breadboard
Digital Thermometer using pic microcontroller and MCP9700
Digital Thermometer using LM35 and PIC microcontroller

In this tutorial, we are making a Digital Thermometer using PIC microcontroller and LM35 Temperature Sensor. In this project, we will sense the temperature using LM35 and display it on 16x2 LCD. LM35 Temperature Sensor is accurate and cheaper and doesn’t require any external calibration. The output voltage is proportional to Celsius temperature scale and changes by 10mV per °C.

Material Required

  • PicKit 3
  • LM35 Temperature Sensor
  • 16*2 LCD
  • PIC16F877A IC
  • 40 - Pin IC holder
  • Perf board
  • 20 MHz Crystal OSC
  • Female and Male Bergstick pins
  • 33pf Capacitor - 2Nos, 100uf and 10uf cap.
  • 680 ohm, 220 ohm, 10K and 560ohm Resistor
  • Potentiometer 10k
  • LED of any color
  • 1 Soldering kit
  • IC 7805
  • 12V Adapter
  • Connecting wires
  • Breadboard

LM35 Temperature Sensor:

LM35 temperature sensor has zero offset voltage, which means at 0°C the output will be 0V. The maximum voltage it can handle is 1.5V which means it can be able to sense a maximum temperature of 150°C (1.5V / 10mV).

Digital Thermometer using pic microcontroller and MCP9700-LMS

Pin No Function Name
1 Supply voltage; 5V (+35V to -2V) Vcc
2 Output voltage (+6V to -1V) Output
3 Ground (0V) Ground

We have already used LM35 with many other microcontrollers to measure the temperature:

As we already told that LM35 gives analog output, so first we need to read that analog values using PIC Microcontroller and then we will convert them into digital values using ADC (Analog to Digital Conversion). So we will learn ADC in PIC Microcontroller before going any further.

ADC in PIC Microcontroller PIC16F877A:

There are many types of ADC available and each one has its own speed and resolution. The most common types of ADCs are flash, successive approximation, and sigma-delta. The type of ADC used in PIC16F877A is called as the Successive approximation ADC or SAR in short. So let’s learn a bit about SAR ADC before we start using it.

Successive Approximation ADC:  The SAR ADC works with the help of a comparator and some logic conversations. This type of ADC uses a reference voltage (which is variable) and compares the input voltage with the reference voltage using a comparator and difference, which will be a digital output, is saved from the Most significant bit (MSB).  The speed of the comparison depends on the Clock frequency (Fosc) on which the PIC is operating.

For more detail: digital thermometer using pic microcontroller and MCP9700

  • What is the primary function of the LM35 sensor in this project?
    The LM35 senses temperature with zero offset voltage at 0°C and provides an output proportional to the Celsius scale.
  • How does the PIC16F877A convert the sensor data?
    The microcontroller uses its Successive Approximation Register (SAR) ADC to convert the analog voltage from the LM35 into digital values.
  • Can the LM35 sensor measure temperatures up to 150°C?
    Yes, because the maximum voltage it can handle is 1.5V, which corresponds to a maximum temperature of 150°C.
  • What type of ADC is utilized in the PIC16F877A?
    The PIC16F877A utilizes a Successive Approximation ADC (SAR) that compares input voltage with a variable reference voltage.
  • Does the LM35 require external calibration for this project?
    No, the article states that the LM35 is accurate and does not require any external calibration.
  • What component is used to display the measured temperature?
    A 16x2 LCD is used to display the temperature readings converted by the microcontroller.
  • What power supply configuration is required for the circuit?
    The project uses a 12V adapter and an IC 7805 regulator to provide the necessary voltages, including 5V for the Vcc pin.
  • How is the speed of the ADC comparison determined?
    The speed of the comparison depends on the Clock frequency (Fosc) on which the PIC is operating.
Beginner Tutorials · PIC16F877A

PIC16F877 Driving LCD in 4-Bit Mode using PIC16F877 with Proteus Simulation

Introduction This microcontroller project shows how a PIC16F877 can drive an LCD display using 4-bit mode inside a Proteus simulation.The project demonstrates...

Programmers & ICSP · PIC16F877A

EPE PIC/LCD Demo using PIC16F877 with Proteus Simulation

IntroductionThe EPE PIC/LCD Demo is a classic microcontroller project that demonstrates how a PIC16F877 can fully control a PG12864F graphical LCD.Designed as...

Motors & Robotics · PIC16F877A

Efficient Sun-Following Robot: A Solar Tracker with Microcontroller Control

Abstract The impending global challenge of dwindling non-renewable fuel resources underscores the urgency of transitioning towards renewable energy alternatives like solar power....

LCD & Display Projects

Leveraging Blockout Banners for Effective Electronics and Tech Product Displays

Blockout banners have become a popular and effective tool for displaying electronics and tech products in various settings, from trade shows and...

LCD & Display Projects · PIC18F4520

Interfacing PIC18F4520 microcontroller with an HD44780 LCD

Introduction Being able to display data from a microcontroller visually has many advantages. It allows for menus, status indicators, and instructions to...

LCD & Display Projects

Video Project Development in the Midst of an Impromptu Online Semester

Receiving robot parts in the mail was an unexpected conclusion to the Winter 2020 semester for students. However, when faced with a...

Ibrar Ayyub

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...