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

[Ideas For Design]

Two-Chip Digital Thermometer Delivers 0.4°C Accuracy



Ricardo Jimenez, Neftali Salazar, Mayoral Ulises  |   ED Online ID #2476  |   July 8, 2002

Article Rating: Not Rated

An LED digital thermometer with an operating range between 0°C and 150°C, 1°C resolution, and ±0.4°C accuracy is presented in the figure. This design is based on the PIC16F872 microcontroller. Because a software routine handles all tasks, an external ADC and decoders aren't required. A National Semiconductor LM35 temperature sensor gives the circuit a high linearity and low percentage error of the sensed temperature.

Output from the LM35 is connected to an LM6134 op amp, which is configured as a noninverting amplifier with a gain of 2. This gain serves to adjust the sensor's resolution (V/°C) to the microcontroller's ADC. Because only 8 bits of the ADC are used, the resolution is 20 mV.

The ADC's reference voltages, V+ and V−, are VDD and ground, respectively. Software in the microcontroller performs several functions, such as ADC operation, conversion from BCD to seven segments, overflow, and out-of-range detection. Register ADCON1 configures the reference voltages and the ADC's analog input.

Five typical temperature measurements are described in the table. Notice that the 8-bit reading from the ADC is converted to a BCD format that corresponds to the real sensed temperature. A software subroutine then converts the BCD reading to a seven-segment format to directly drive the LED display. Port RB drives the units digit, while Port RC drives the tens digit. The microcontroller's output lines, RC7 and RB7, control the hundreds digit.

The following description is based on the software listing, found at www.elecdesign.com:

The temperature reading from the microcontroller's ADC goes to the register, ADRESH. A subroutine called OP_TAB translates this result to BCD, then adds it to the program counter, PCL. This creates an unconditional jump to get the BCD value using the RETLW-type instruction, which contains the two BCD digits of the measured temperature. Next, the BCD reading is converted to a seven-segment format by calling the subroutine OP_TAB2. Subroutine OP_TAB3 controls the hundreds digit.

To download a listing, click Download the Code at the top of the page.




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


  • Parasitic Extraction Tool Targets Next-Generation Custom ICs
  • Synopsys Jumps Into ESL-Synthesis Pool
  • Verify Control Systems Before Committing To Hardware
  • You're Using How Many FPGAs?
  • Tool Up For The FPGA Blitz
  • Support Will Have Android Showing Up In Embedded Apps
  • High-Level Design In EDA—Quo Vadis? (Or, Where Are You Going?)
  • New Power-Management Policies Emerge At DAC
    1) Build A Smart Battery Charger Using A Single-Transistor Circuit
    (168 views today)
    2) Hot Hands For Some Cool Rock: Motion Sensing Meets Audio Engineering
    (163 views today)
    3) White LEDs Promise Green Illumination Domination
    (96 views today)
    4) Bidirectional H-Bridge DC-Motor Motion Controller
    (62 views today)
    5) A Multi-Level Approach Makes Understanding Motor Control Easier
    (55 views today)
    ALL TOP 20







    POST YOUR COMMENTS HERE

    Name:

    Email:
    Rate this article:

     less useful more useful 
    1
    2
    3
    4
    5
    Your Comments:

    Enter the text from the image below




    Please refresh the page if you have trouble reading this text.
    (Acceptable Use Policy)
     
     

    PartFinder

    Find real-time pricing, stock status, same-day/next-day shipping options and more. Brought to you by Digi-Key. Go to PartFinder.    
    GlobalSpec

    PART SEARCH :
    Powered by: GlobalSpec - The Engineering Search Engine
    Sponsored Links

    Electronic Design Europe Electronic Design China EEPN Power Electronics Auto Electronics Microwaves & RF
    Mobile Dev & Design Schematics Find Power Products Military Electronics EE Events Related Resources