help understanding how adc works

Thread Starter

JuneBug26

Joined Jul 2, 2018
4
I am trying to connect a thermistor(10k) with my 10k resister in series and noticed that the adc values were off so I decided to use another fixed 10k to ensure I didn’t connect something wrong or have a bad component.

I noticed that when I connect two 10k resistors in series, one side connected to the 5V and the other to ground I get Vout=2.5. The moment I connect the Vout to one of the AD inputs on the board the voltage now reads 3.34V. Why is the voltage different? All the AD inputs on the board are floating and there is no VRef.

If I replace the 10k with 100k resister, connected in series with my thermistor I get the proper voltage reading. Why am I having to change to a higher resistance value? I was thinking of maybe using a capacitor or an op amp but I just want to understand why my adc values differ.

Vcc 5V
______
|
|
R1 10k
|
|
Rthermistor 10k ————-Vout (ad input)
|
|
GND
 

danadak

Joined Mar 10, 2018
4,057
Thats sort of an indication ADC is overranged on its input, that its
full scale range, set by a reference, is lower than 5V, in this case looks
like a 3.3V reference.

Regards, Dana.
 

AnalogKid

Joined Aug 1, 2013
12,127
A thermistor is a very non-linear sensor. When connected in series with a fixed resistor, the voltage at the junction will *not* give you a linear temperature-to-voltage relationship. In a typical system, the non-linear voltage readings are converted in software to the correct temperature values. What is the manufacturer and thermistor part number you are using? Can you post a datasheet or a link to one? Also, can you post a schematic of the whole circuit?

ak
 

Thread Starter

JuneBug26

Joined Jul 2, 2018
4
A thermistor is a very non-linear sensor. When connected in series with a fixed resistor, the voltage at the junction will *not* give you a linear temperature-to-voltage relationship. In a typical system, the non-linear voltage readings are converted in software to the correct temperature values. What is the manufacturer and thermistor part number you are using? Can you post a datasheet or a link to one? Also, can you post a schematic of the whole circuit?

ak
https://www.vishay.com/docs/29049/ntcle100.pdf
this is the thermistor i am using. When I use the 10k resistor I am getting a temperature reading of 61.2F which is wrong. With a thermometer I get my room temperature to be 70.1F. Now if i use a 100k resistor instead I get a reading of 72.3 which is a better.
 

MrChips

Joined Oct 2, 2009
34,807
I would but I don't know the part number. The relay board i am using doesn't have a data sheet.
https://store.ncd.io/product/industrial-high-power-relay-controller-8-channel-8-channel-adc/
Your ADC is internal to the MCU which is a Microchip PIC16F690.
The board uses 10kΩ pull-up resistors to +5V on the ADC inputs.
Hence when you connect the 10k-10k voltage divider, you end up with 5k-10k, giving 3.3V from a 5V supply.

Eliminate your external R1 and you should get 2.5V with your external 10kΩ input.

Note that there is an error in the ndc.io documentation.
With 8-bit ADC, the range is 0 to 255.
With 10-bit ADC, the range is 0 to 1023, not 0 to 2047 as stated in the documentation.
 

Thread Starter

JuneBug26

Joined Jul 2, 2018
4
Your ADC is internal to the MCU which is a Microchip PIC16F690.
The board uses 10kΩ pull-up resistors to +5V on the ADC inputs.
Hence when you connect the 10k-10k voltage divider, you end up with 5k-10k, giving 3.3V from a 5V supply.

Eliminate your external R1 and you should get 2.5V with your external 10kΩ input.

Note that there is an error in the ndc.io documentation.
With 8-bit ADC, the range is 0 to 255.
With 10-bit ADC, the range is 0 to 1023, not 0 to 2047 as stated in the documentation.
Thank you soo much! It works now. I thought the board did not have the 10k pull because when I contacted one of the engineers there they said my board did not have the pull or pull down like other boards and they should all be floating. Thanks again for your help.
 

MrChips

Joined Oct 2, 2009
34,807
Thank you soo much! It works now. I thought the board did not have the 10k pull because when I contacted one of the engineers there they said my board did not have the pull or pull down like other boards and they should all be floating. Thanks again for your help.
You're very welcome. Happy to be of assistance.
 
Top