Electronic Design

  
Reprints     Printer-Friendly    Email this Article    RSS        Font Size     What's This?


[Ideas For Design]
Low-Cost Digital Thermometer Uses Single-Chip Microcontroller

Brian Merritt  |   ED Online ID #1538  |   February 18, 2002


In many applications, the ability to read and display temperature is either desirable or an absolute requirement. Some of these applications include temperature probes, thermostats, CPU monitors, and process-control equipment. The figure illustrates a simple system for reading and displaying the temperature. This circuit requires only one microcontroller (MCU), as opposed to other solutions that need separate power management and analog converter chips. Moreover, the circuit doesn't require any special treatment of the reset pin because the MCU used incorporates brown-out detection.

The MSP430F412 MCU from Texas Instruments executes the code from flash memory while being clocked from a high-speed internal oscillator. First, the code reads the resistive sensor using the single-slope analog conversion technique. Then, the reading is converted to a BCD value and displayed on the LCD. The LCD doesn't re-quire a separate driver chip; it's directly driven by the MCU. Also, the LCD displays a flashing "F" to indicate that the reading is in degrees Fahrenheit, and that the circuit is actively reading the temperature.

Once the display is updated, the MCU enters low-power standby mode. During this time, only an internal timer is active and being incremented by the 32-kHz crystal. This timer controls the framing frequency of the LCD so that it remains on, displaying the last temperature reading. After a software selectable time delay, the same timer generates an interrupt. The interrupt then restarts the CPU and internal high-speed oscillator, and the whole process repeats. Each cycle of the interrupt either clears or writes the "F" to the display, causing it to flash.

The MSP430F412 is specifically designed for low-power battery-based applications. As a result, while the MCU is in standby mode with the LCD on, the entire circuit only draws about 1.5 µA. Because the MCU has extremely fast startup and shutdown times, it can spend more than 97% of its time in standby mode. When the circuit is in active mode or measuring the sensor, it draws only an average current of 110 µA. Combining the long standby time and the short active time results in an overall average current of under 5 µA for the circuit. If the circuit were powered from a 220-mAh, 2032-type coin cell, it could operate continuously for up to five years between battery changes.

The digital thermometer task re-quires only a small fraction of the MCU's resources. The program uses less than 17% of the flash memory. There are 21 I/O lines available for other uses, and the CPU is off at most times. With these facts in mind, it's easy to see how the digital thermometer could be just a small part of a more complex application implemented on the same MCU. The thermometer could be a subfunction of a circuit that controls production equipment, changing the speed and power based on the temperature reading.

Or instead, it could be the heart of a digital thermostat that also reacts to the time of day, as the 32-kHz input directly divides down to provide a real-time clock. The thermometer could even be part of a datalogging system that uses the MCU to store the data and run the code. This is possible because the MSP430F412 can write to its own flash memory.

To download a listing, enter the appropriate InstandDoc ID at http://www.elecdesign.com and click Download the Code.


Reprints   Printer-Friendly  Email this Article  RSS    Font Size   What's This?


  • A Mid-Year Check On The Optimism Meter
  • Cadence’s Grab For Mentor In Flux
  • “Turbo” Technology Enhances RF Verification
  • Partnership Yields Concurrent Mechanical and PCB Design
  • Testbench Tool Exploits Distributed Compute Environments
  • Hardware/Software Co-Design Comes Of Age
  • Show Videos Take Center Stage On ElectronicDesign.com
  • Formal Verification Suite Takes In Wider View Of Designs
    1) Build A Smart Battery Charger Using A Single-Transistor Circuit
    (242 views today)
    2) Bob's Mailbox
    (120 views today)
    3) Smart Optics Push Camera Phones Out Of The “Dark” Ages
    (108 views today)
    4) Easily Convert Decimal Numbers To Their Binary And BCD Formats
    (101 views today)
    5) Trick A BJT-Based Converter Into Starting At Only 250 mV DC
    (89 views today)
    ALL TOP 20



    Reader Comments

    i want circuit for an embedded single chip temperature controller design

    sankar -July 02, 2008

    wow not........

    Anonymous -May 22, 2008

    tachometer program

    hariagung prabowo -May 10, 2008

    Dear friends, I need some help from you. I need a controller for incubate my pet birds eggs. and the controller like 1. Temperature range is 20.9C-39.9C [OR] 60.1F-105.9F. 2.Is it possible to make Humidity controller 50%-70% combine with Temperature controller?

    Please help me to make this type controller. I hope to you can help me about this project. Awaiting for your reply Regards Santhosh

    SANTHOSH .E -April 28, 2008

    I NEED THE CIRCUIT DIAGRAM AND SOURCE CODE

    A -April 09, 2008

    can send a code plz

    N -April 09, 2008

    can you send the source code for this microcontroller please

    Dan -March 25, 2008

    i need the circuit diagram of a digital weighing scale.

    digital scale` -February 05, 2008

    It is very much usefull.

    Anonymous -July 26, 2007   (Article Rating: )

    Rating Only

    Rating Only -July 26, 2007   (Article Rating: )

    Rating Only

    Rating Only -July 07, 2007   (Article Rating: )

    please send me the workin principal and crcuit diagram of digital temp. measuring device.

    Riasat Azim -July 03, 2007   (Article Rating: )

    please send me shematic and detail of this circuit.i.e lcd thermometer

    zaheer ahmad -June 04, 2007

    please i am interesting in designing a 16 bit microcontroller ,please send me the logic diagram,programming for ic,s and else what required thanks,i need it

    engrabid -May 04, 2007

    Not working

    mary -April 28, 2007   (Article Rating: )

    Hello, I would like to have a circuit for human body temperature measurement.. My idea is to use a PIC16 f877A and display the measurement on LCD..Thank you... Iam in need..

    Harsha -March 20, 2007

    Hello, I would like to have a circuit for human body temperature measurement.. My idea is to use a PIC16 f877A and display the measurement on LCD..Thank you

    Harsha -March 20, 2007

    i need a good explanation about embedded , graphical lcd and uses of graphical lcd with circuit diagram.thank you..

    VNB -October 10, 2006   (Article Rating: )

    I WANT A GOOD EXPLANATON ABOUT EMBEDDED C AND ITS PROGRAMMING COMMANDS, PLEASE GIVE SOME EXAMPLES AND ITS EXPLANATIONSU. THANK YOU.

    senthil.c -October 10, 2006   (Article Rating: )

    i need a circuit of the single wire temperature detector which interface with the PIC84F16A and the glcd display...im using the interrupt in the software as well....so if u dont mind,pls response to me asap.

    Anonymous -October 05, 2006   (Article Rating: )

    please let me know where i can buy the components required to construct this thermometer. i will like to use a positive resistance temperature device PRT for my probe

    rotimi lijofi -August 30, 2006   (Article Rating: )

    I WOULD LIKE TO KNOW HOW TO MAKE A SCEMATIC BOARD ABOU TEMPERATURE, BLOOD PRESSURE AND WEIGHT SCALE. ON MY PRIJECT MULTIFUNCTION CHAIR.

    GEMINI -August 26, 2006   (Article Rating: )

    I WOULD LIKE TO KNOW HOW TO MAKE A SCEMATIC BOARD ABOU TEMPERATURE, BLOOD PRESSURE AND WEIGHT SCALE. ON MY PRIJECT MULTIFUNCTION CHAIR.

    GEMINI -August 26, 2006   (Article Rating: )

    plz send me the circuit diagram and list of components as soon as possible

    merin -August 17, 2006

    hi...my project is temperature detector which interface with graphical LCD and programmed by PIC microcontroller.....can i have details for the software(PIC),circuitary for the temperature detector with explaination..really need the information asap...plz as early as possible

    dhananashree -July 27, 2006

    hi...my project is single wire temperature detector interface with graphical LCD and programmed by PIC microcontroller.....can i have details for the software(PIC),circuitary for the temperature detector with explaination..really need the information asap...tq

    zeed -July 26, 2006   (Article Rating: )

    where can i get the circuit diagram of this low cost digital thermometer as well as the microcontroller program too?please tell me so i can sart building this project and hopefully i could pass it next week...thanks

    lenniegonzales -July 16, 2006

    from where i can get the circuit diagram of this low cast digital thermometer using single uc?

    Anonymous -July 15, 2006

    please I need the circuit diagram of electronic thermometer

    uremu -June 23, 2006

    please I need the circuit diagram of electronic thermometer

    uremu -June 23, 2006

    please send circuit or datasheet Digital Thermometer microcontroller. Thank you

    Mohammad -May 29, 2006

    please send the microprocessor/microcontroller program too. thank you

    gayathiri -April 16, 2006   (Article Rating: )

    please send the microprocessor/microcontroller program too. thank you

    gayathiri -April 16, 2006   (Article Rating: )

    I want to know about single chip solution for multichannel digital temperature contriller

    neel -April 08, 2006   (Article Rating: )

    PLEASE SEND ME 80C51 MICROCONTROLLER BASED PROJECT WITH ITS CODING.IHAVE AN EXAM ON IT AFTE THREE WEEKS

    Anonymous -April 03, 2006   (Article Rating: )

    please send me a program to interface the pic16f877 to gsm modem..i also used lm35 as a sensor and lcd display.

    Anonymous -March 26, 2006

    Please send circuit design for review

    HWL -March 20, 2006   (Article Rating: )

    pls send me the circuit for a digital temperature display pls

    nikhil -March 13, 2006

    A better document: http://www.gaw.ru/pdf/TI/app/msp430/slaa129.pdf

    Anonymous -March 12, 2006

    Interesting.......please forward circuit design. Many thanks in advance.

    Anonymous -January 29, 2006   (Article Rating: )

    Interesting.......please forward circuit design. Many thanks in advance.

    Anonymous -January 29, 2006

    please send me the circuit diagram with full details as soon as possible

    Anonymous -January 20, 2006

    i would like the circuit diagram

    A S UDENT WHO HAS AN EXAM ON THIS IN 2 DAYS!!1 -January 12, 2006   (Article Rating: )

    panget

    Anonymous -December 19, 2005

    Sand me the circiut diag of making it & how to interface with PC

    Sathish -December 02, 2005   (Article Rating: )

    Hi, how can i connect the thermometer to PC parallel port? Thanks Silver

    Silver -November 23, 2005

    its very usefull to us. not only i thing its very usefull to basis to electronics.

    Andrew -September 16, 2005   (Article Rating: )

    nothing

    Anonymous -August 26, 2005   (Article Rating: )

    Please send to me full details about low cost digital thermometer uses single chip microcontroller with circuit diagram and any way to interface this project and any idea for the enhancement of this digital thermometer.

    soethi -August 22, 2005

    give full details about lowcost digital thermometer uses single chip microcontroller with circuit diagram

    dhivya -August 01, 2005

    i want a sample tempeartuer thrmanmater digitel

    Anonymous -May 06, 2005

    Display the circuit along with the information.

    Anonymous -February 09, 2005   (Article Rating: )

    Is there any way to interface this project with a PC using C++? I'd like to display the temperature in 'C & `F as well as the time on the LCD and monitor. Very nice site. Regards.

    Vasish -February 08, 2005   (Article Rating: )

    We would like to know whether this thermometer can be used for measuring human body temperature? If so, what will be the cost?

    Nithya -December 03, 2004

    Any idea for the enhancement of this digital thermometer?

    Ralph Karlo O. Robles -September 21, 2004

    I have selected your website because of our project design and have many designs to make. You have a lot of information. I really appreciate your site. Thanks a lot.

    morris oracoy -March 25, 2004

    POST YOUR COMMENTS HERE
    Name:

    Email:
    Your Comments:

    Enter the text from the image below


    Please refresh the page if you have trouble reading this text.

    Search Electronic Design
         
      
     
    Web Seminar
    Sponsored By:
    Title: Read Pacing: A Performance Enhancing Feature of PCI Express Gen 2 Switch Devices
    Speakers: 
    Date: 07/01/08
    Register: 

    Electronic Design Europe Electronic Design China EEPN Power Electronics Auto Electronics Microwaves & RF RF Design
    Schematics Find Power Products Military Electronics Featured Vendors EE Events Free Design Resources