This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LM35: Configuring LM35C for extended temperature range to work with ATtiny85 (1MHz)

Part Number: LM35
Other Parts Discussed in Thread: LMT84, TMP235

Many greetings to All,

I've honestly done my best to research this before asking this question... That said, I am using an Arduino UNO to program an ATtiny85 microprocessor to read an LM35C and light an LED based on ranges of the LM35C. My main question is, "How do I configure the LM35C so that I get the Celsius temperature ranges below 2C. I see several circuit diagrams on the Internet pertaining to this, but there is no consistent solution; hence, I figured I'd ask the experts. Relevant information might be that I am using the ATtiny85 in it's basic form, with the 1MHz speed--not 8MHz. 

  • Hi John,

    Please see Figure 18 on page 16 of the datasheet.

    The device outputs 10mV/°C referenced to ground. This means at 0C, it should output 0V, but it can't drive that close to ground. Thus, it's typically noted that it only works down to 2C or 20mV.

    Just like an op-amp, the LM35 needs a negative supply below ground in order for it to output voltages less than zero. In figure 18, two diodes are used to lift the LM35's GND pin up off of actual ground. The differential voltage observed between VOUT and GND will appear negative when temperature is below 0C.

    Thanks,
    Ren
  • Ren, Thanks for the rapid response. You'll have to forgive my lack of experience in electronics area, I know enough to be dangerous; my background is primarily software development and I dabble in the electronics when I have to. In my current configuration, I have the Vout of the LM35 going to a single pin on the ATtiny85., while the +Vs comes from the supply and the GND goes to common ground of the 5VDC supply.

    In the schematic you suggested, it appears that I now have two pins to account for? Again, I'm sorry, but I don't quite understand. To be able to read (-) temperature values am I required to monitor two pins instead of the singe Vout? The ATtiny85 is very limited in available pins, two to be exact--one for the LM35C and one for the LED.

  • Hi John,

    Regarding Figure 18, the voltage Vout observed between the nodes marked +/- will be capable of going below 0V to indicate a temperature below 0°C. You will need to use an ADC configured for differential measurements and connect both pins of the ADC to measure this voltage Vout in this way.

    When an ADC makes a measurement with one pin, it is called single ended. The ADC is still observing voltage between two pins, but it is implied that one of those pins is the ADC's ground. In the case of Figure 18, if you were to make a single-ended measurement at the LM35 Vout pin then you would see the the temperature voltage summed with the forward voltage of the two diodes. You would need to know the voltage across these diodes in order to subtract it from your result. It will be about 0.7V*2 but it will vary.

    If, for some reason, you can only make single-ended measurements, I would recommend using a zener diode or shunt reference in place of the two diodes. This would give you a more precise voltage offset to subtract.

    It's not possible to measure temperatures below 0C with the LM35 without modifying your circuit in this way. If you're unwilling or unable to do so, I recommend using a different analog output temperature sensor such as LMT84 or TMP235. These products don't cross 0C at 0V. You can browse all of TI's analog temperature sensor offerings at the following link. www.ti.com/.../products.html

    Thanks,
    Ren
  • As usual, I'm left with left-over Twinkie sponge cake all over my face. I got so focused on trying to get a solution to the LM35 problem it didn't occur to me to look for another sensor; one that didn't cross the 0C/-Voltage threshold. It's the old can't see the forest for the trees (or in this case tree). Thank you very much; if the prototype we're building passes muster we'll probably be ordering several thousand of the LMT84s.

    Many thanks!