16f877 with LM335 problem


Closed Thread
Results 1 to 40 of 47

Hybrid View

  1. #1
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: 16f877 with LM335 problem

    I think you are better off with the LM335 as it's output is 10mv/deg K. The LM35 is 10mv/deg.c. There is going to be a problem with the accuracy below 0 deg C. when using the LM35. If you would like rather than analog you could use a TMP-03/04 from Analog Devices which is a pulse width output. I have used these before and work quite well. Just a thought...
    Dave Purola,
    N8NTA
    EN82fn

  2. #2
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default Re: 16f877 with LM335 problem

    I think you are better off with the LM335 as it's output is 10mv/deg K. The LM35 is 10mv/deg C.
    Hum...can you explain a little more please?

    I thought Kelvin were used to express a temperature difference and Celsius/Fahrenheit would represent a value. I must be wrong.
    Roger

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,139


    Did you find this post helpful? Yes | No

    Default Re: 16f877 with LM335 problem

    Deg Kelvin references differently. 0 deg Kelvin is the absolute zero. The point that every thermal motion stops. To convert it to Celsius, just add 273,15. So the 0 Celsius is 273,15 Kelvin and 0 Kelvin -273,15 celsius.

    Ioannis

  4. #4
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default Setting up the LM35 and an opamp as voltage doubler

    Thanks Ioannis.

    This (schema) is where I have come up to now - using the simple simplest, maybe too simple (...) The opamp acts as a voltage doubler (seems enough for what I need).

    BTW, I'm using a 16F690 with 10 bits ADC.
    Name:  rsz_ampli_op_2x.jpg
Views: 3919
Size:  9.6 KB
    At 24°C, the LM35 outputs 1,199V so the opamp's Vout shows 2,396V.

    Now, what is the LM35 going to output at 0°C or even less, around -20°C?

    Since 1,199V represent 24°C, can I say that at 0°C, I will have 0,959Volts (LM35 Vout)?

    Talking "temperature", what is the reference when adjusting temperature sensors at home?

    Is it this?
    Name:  rsz_digital_thermometer_hyrometer_30010106.jpg
Views: 3512
Size:  9.3 KB
    Noooooooooooooo......

    NB: You're absolutely right about Kelvins. In the field, talking with cooling systems engineers, to make sure we don't get messed up while setting up machines, we (wrongly) use Kelvins to express a temperature difference or threshold and degrees to set a temperature value
    Roger

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,139


    Did you find this post helpful? Yes | No

    Default Re: Setting up the LM35 and an opamp as voltage doubler

    I don't think it will work for minus temps the way you got it.

    Your output as I said earlier, would be directly from the LM35, meaning from the output pin AND the GND pin of the LM35. NOT the circuit Ground.

    Now, that leads us to another problem. Your new output will be 0 volts at 0 C, positive at positive temps but negative below zero (LM35 output would seem more negative than the LM35 ground). So the opamp would not be able to handle this negative voltageas you designed it.

    You are going to need a differential amplifier, such as the first opamp in my design.

    Ioannis

  6. #6
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default Re: Setting up the LM35 and an opamp as voltage doubler

    Okay,

    I'll give a try to your circuit.

    Will a LM358N opamp do the job or does it absolutely need to be LMC662?

    Another thing, having in mind the accuracy I need is not that critical (+/- 2°C is okay), what is a "simple" way to measure a freezer's temperature?

    Would a thermistor do the trick in an acceptable way too?
    Roger

  7. #7
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,139


    Did you find this post helpful? Yes | No

    Default Re: Setting up the LM35 and an opamp as voltage doubler

    A thermistor is far from linear. I would not use it now, at least without first trying other things.

    I came up with a simpler solution to your problem. Drop the op-amp and drive the LM35 output to one ADC of your PIC. Now drive the raised GND of the LM35 to another ADC input of your PIC.

    Since the two voltages, referenced to ground, are positive, you can do a calculation in your program. (LM35output-LM35Gnd)*100 and you will have your temp. Be careful here because the subtraction will give you a negative result if the real temp is below zero.

    So now you have a circuit absolutely minimal.

    I would suggest to use a PIC with 10bits ADC and increase the resolution with oversampling to 12 bits with Darrel Taylor's oversampling routines when you have it working.

    Ioannis

Similar Threads

  1. 16F877 HSERIN problem with 3th party software
    By RFsolution in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 11th March 2009, 17:11
  2. LCD problem with 16F877
    By alexx_57 in forum General
    Replies: 10
    Last Post: - 25th July 2007, 13:47
  3. problem using 16f877
    By yrch in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 20th February 2006, 18:58
  4. 16F877 20MHz problem
    By swordman in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 31st July 2004, 10:02
  5. 16F877, DS18S20 and Serial Comm Problem
    By YellowTang in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 26th April 2004, 10:36

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts