Analog to digital temperature sensor

Click For Summary

Homework Help Overview

The discussion revolves around a temperature sensor interfaced with a 12-bit Analog-to-Digital Converter (ADC), where the sensor outputs a voltage corresponding to a temperature range. Participants are trying to determine the decimal value the ADC would provide for a specific temperature input.

Discussion Character

  • Exploratory, Assumption checking, Problem interpretation

Approaches and Questions Raised

  • Participants explore the relationship between voltage output and temperature, questioning the calculations based on the ADC's resolution. There are discussions about whether the ADC's input voltage range affects the resolution and how that impacts the final output value.

Discussion Status

Several participants have provided calculations and interpretations, with some suggesting that the original problem may contain typos or ambiguities. There is a general agreement on a calculated output of 800, but questions remain regarding the stated answer of 200 and the potential for a misunderstanding of the ADC specifications.

Contextual Notes

Participants note that the problem is part of a larger set of questions, which may influence the interpretation of the ADC specifications. There is uncertainty about whether the ADC should be treated as 10-bit or 12-bit based on previous parts of the 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   Reactions: 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   Reactions: 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: 473

Similar threads

  • · Replies 5 ·
Replies
5
Views
3K
Replies
9
Views
4K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 4 ·
Replies
4
Views
7K
  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 15 ·
Replies
15
Views
4K
  • · Replies 10 ·
Replies
10
Views
4K
  • · Replies 19 ·
Replies
19
Views
3K
  • · Replies 3 ·
Replies
3
Views
8K