Correct circuit for reading ADC

leenowell
Posts: 162
Joined: Tue Jan 15, 2019 1:50 pm

Correct circuit for reading ADC

Postby leenowell » Fri Jan 03, 2025 12:26 pm

Hi All,

I am not the best at circuit design so suspecting this is a simple question.

I am trying to make a thermometer using the ESP. After a lot of Googling, I see that the ADC isn't the most accurate so trying to set up the circuit to be the best it can and then see how accurately I can get it to work. From what I have read, I think this amounts to the following
1. connect the thermometer to 2 channels of the ADC and read from both and average the results
2. Put a bypass capacitor in the circuit ( e.g. 100 nF ceramic capacitor)
3. After around 2.5v and before around 0.14v the readings are inaccurate

Not sure what power source to use as looking for this to be run on batteries but wanted to check my understanding of how to design/ wire it up - sorry for the ASCII art :). Is the following correct?

+V -------- R1 ---------- Thermistor -------- gnd
|
|
|
(X)

If so, I have a few questions please
1. Do I connect (X) to both ESP pins one for each channel?
2. Assume I need to determine the resistance of the thermistor at the lower and upper end of the temperature range then calculate R1 to ensure that the voltage between (X) and gnd is between 0.14v and 2.5v at these resistances.
3. The bypass capacitor - does this need to go between (X) and gnd? Is the size (I assume that is 100 micro farad?) critical or if I have a similar size how big/ small could I use? Also is the ceramic type important?
4. For the battery size, what size should I go for? I am thinking I need to be careful that the voltage between (X) and gnd doesn't exceed a particular value to prevent damage to the ESP?

Many thanks in advance for your help and sorry if these are basic questions

Lee.

leenowell
Posts: 162
Joined: Tue Jan 15, 2019 1:50 pm

Updated: Correct circuit for reading ADC

Postby leenowell » Sat Jan 04, 2025 10:11 am

Hi all,

I have found an old circuit I did for this with an 8266 instead of the esp32. Looks like I did the capacitor as I guessed above. The interesting thing is that for some reason I put another resistor in parallel with the thermistor (it was actually 2 resistors in series which I assume is because I used what I had). Any idea what the purpose of this extra resistor is? According to my notes the resistors are
R1 = 13k
The 2 in parallel add up to - 21k
The thermister is 100k at room temp
The ceramic capacitor is blue (if that matters) and has 104 written on it.

Thanks in advance for any help in unpicking this

Lee.

leenowell
Posts: 162
Joined: Tue Jan 15, 2019 1:50 pm

Re: Correct circuit for reading ADC

Postby leenowell » Sun Jan 05, 2025 10:50 am

Anyone have any thoughts on this?

Who is online

Users browsing this forum: No registered users and 0 guests