Analog to digital temperature sensor

AI Thread Summary
The discussion revolves around calculating the output of a 12-bit ADC interfaced with a temperature sensor that outputs 0 to 5 volts for a temperature range of 0 to 100ºC. The initial calculations suggested that for a temperature of 39.1ºC, the ADC output would be 800, derived from the formula (39.1/100) * 2047. There was confusion regarding an expected answer of 200, prompting discussions about potential typos in the problem statement and whether the ADC might actually be 10-bit instead. Ultimately, participants agreed on the output of 800 based on the given parameters, indicating a possible misunderstanding or error in the original problem.
orangeincup
Messages
121
Reaction score
0

Homework Statement


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?


Homework Equations


ADC resolution = voltage measurement range / number of discrete quantization levels

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
 
Physics news on Phys.org
orangeincup said:

Homework Statement


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?


Homework Equations


ADC resolution = voltage measurement range / number of discrete quantization levels

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

ADCs do not have output voltages. Can you clarify the question? Was that a typo?
 
  • Like
Likes 1 person
I copied the question exactly as it was stated, it's asking for the output in a decimal number
 
orangeincup said:
I copied the question exactly as it was stated, it's asking for the output in a decimal number

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?
 
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 .
 
orangeincup said:
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 .

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:
 
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
 
orangeincup said:
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

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...
 
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?
 
  • Like
Likes 1 person
  • #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?
 
  • #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.
 

Attachments

  • anss.png
    anss.png
    71 KB · Views: 452

Similar threads

Back
Top