1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Analog to digital temperature sensor

  1. Sep 12, 2014 #1
    1. The problem statement, all variables and given/known data
    A temperature sensor has a full scale output of 0 to 5 volts which corresponds to a temperature range of 0 to 100ºC. If the sensor is interfaced to a 12 bit Analog‐to‐Digital
    Converter (ADC) with a full‐scale output range of 0 to 10.0 volts, what decimal value will the
    ADC provide for a temperature of 39.1 ºC?


    2. Relevant equations
    ADC resolution = voltage measurement range / number of discrete quantization levels

    3. The attempt at a solution
    So usually when I have this kind of problem I'm only given one voltage. Here is my attempt at a solution, the answer is suppose to be 200(which doesn't seem to make sense to me right now either.)


    4096 resolution / 100ºC = 0.02441 (temperature per bit)

    39.1/100 * 4096 = 1601 bit
     
  2. jcsd
  3. Sep 12, 2014 #2

    berkeman

    User Avatar

    Staff: Mentor

    ADCs do not have output voltages. Can you clarify the question? Was that a typo?
     
  4. Sep 12, 2014 #3
    I copied the question exactly as it was stated, it's asking for the output in a decimal number
     
  5. Sep 12, 2014 #4

    berkeman

    User Avatar

    Staff: Mentor

    Then the question has a simple typo in it. The ADC must have an *input* voltage range of 0-10V then.

    So you are using the bottom half of a 12-bit ADC then. Does that change your calculations?
     
  6. Sep 12, 2014 #5
    Does that mean I can only use 0-5 volts?

    Would the resolution be halved from what I originally calculated, or is 5 volts always equal to a specific bit size?

    If I use 39.1/100 * 256 for 8 bits, I get an answer of 100.
    If I just use my original resolution halved, I get 4096/2 * 39.1/100 = 800 .
     
  7. Sep 12, 2014 #6

    berkeman

    User Avatar

    Staff: Mentor

    Your 2nd answer is correct.

    For a 10V input, the ADC output code is 0xFFF = 4095. (range is 0-4095).

    For a 5V input, the ADC output code is 2047 (corresponding to 100C out of the 5V sensor).

    For a temperature of 39.1C, your output code is (39.1/100)*2047 = 800.38, which rounds down to 800. :smile:
     
  8. Sep 12, 2014 #7
    Is there any reason the answer is 200? Is that a typo?

    I was thinking 512* 39.1/100 would be one way to get that answer, or if they divided by 4 somewhere
     
  9. Sep 12, 2014 #8

    berkeman

    User Avatar

    Staff: Mentor

    Weird. I'm not seeing how it could be 200, unless there are more typos or tricks in the problem statement. I'll ping some other Engineering Homework Helpers to have a look...
     
  10. Sep 12, 2014 #9

    berkeman

    User Avatar

    Staff: Mentor

    A couple other Homework Helpers agree with our answer of 800, given the problem statement. Is there any chance that the problem meant to specify a 10-bit ADC?
     
  11. Sep 12, 2014 #10
    It was part c) of a three part practice problem, but I don't think they have anything to do with it. Part a was a 10 bit ADC.

    Questions a) and b)
    a) A 10 bit Analog‐to‐Digital Converter (ADC) has a full‐scale output range of 0 to 5.0 V. What
    decimal number will the ADC return if the input voltage is 2.2 volts?
    b) A push button is connected to bit 7 (the most significant bit) of port B on the microcontroller
    board. The button is connected in such a way that bit 7 will read a logic “1” when the button is
    pressed and a logic “0” when the button is released. What hexadecimal number must be
    “ANDed” with port B in order to isolate bit 7; i.e., to read only bit 7 and ignore bits 0 to 6?
     
  12. Sep 12, 2014 #11
    I was looking at a similar problem, and the solution used voltage.

    If I calculated the problem below, using the method I used above, I would have had... 307/1023 * 90 = 0.27, so it wouldn't be correct according to that.
     

    Attached Files:

    • anss.png
      anss.png
      File size:
      147.1 KB
      Views:
      95
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Analog to digital temperature sensor
  1. Capcitance Analogy (Replies: 2)

  2. Temperature ? (Replies: 1)

Loading...