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?


  • 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 urgently need your help. I have a copy of the circuit diagram that is used as a temperature sensor. It involves using a PIC16F872, LM35 temperature sensor and a LM6134. The problem is exactly what LM6134 is it to be used, there is 1/4 printed on the top of LM6134 and is there possibly an alternative to the LM6134 because they seem to be extremely hard to get hold of in todays world. Your help would be most appreciated thank you.

    Robert Hopkins -February 05, 2008

    Anyone got the Hex code of that project, I coudnlt find an assembler to do so. pls email me the hex code to grave77@eim.ae Thanks

    grave77 -November 03, 2007

    Anyone got the Hex code of that project, I coudnlt find an assembler to do so. pls email me the hex code to grave77@eim.ae Thanks

    grave77 -November 03, 2007
    Read more comments...

    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.
     
     

    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 RF Design
    Schematics Find Power Products Military Electronics Featured Vendors EE Events Free Design Resources