Maker Pro
Maker Pro

ADC Values

Kittu20

Oct 21, 2022
17
Joined
Oct 21, 2022
Messages
17
I have a general question. I am trying to understand how we get the temperature value from the ADC value.

I found that we need to convert the abc's value in to voltage and then convert the voltage to temperature.

Let's say we have a 8 bit ADC that gives 255 samples.

How to represent these samples from 0 to 5 volts?
 

Keonte45

Aug 29, 2022
78
Joined
Aug 29, 2022
Messages
78
To convert the ADC value to a voltage value, you can use the following equation:

Voltage = (ADC value / (2^n - 1)) * (Vref)

Where:

ADC value is the digital value output by the ADC
n is the number of bits in the ADC (8-bits in your example)
Vref is the reference voltage for the ADC (usually 3.3V or 5V)
So, for an 8-bit ADC with a reference voltage of 5V, the voltage value corresponding to an ADC value of 255 (the maximum value) would be:

Voltage = (255 / (2^8 - 1)) * 5V = 5V

And the voltage value corresponding to an ADC value of 0 (the minimum value) would be:

Voltage = (0 / (2^8 - 1)) * 5V = 0V

Once you have the voltage value, you can convert it to temperature using a thermistor, a thermocouple, or any other type of temperature sensor. This conversion typically involves using a mathematical equation or a lookup table based on the characteristics of the temperature sensor.

Remember that the voltage-to-temperature conversion is not linear, and the sensor may have a different temperature coefficient. That's why the manufacturer will provide a lookup table or a mathematical equation that relates the sensor's voltage output to temperature.
 
Top