Correct circuit for reading ADC
Posted: 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.
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
+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.