Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By leenowell
#41607 Hi all,

I am having some trouble getting the ADC to work and was hoping you could help?

I am trying to build a thermometer using the ADC to read the voltage across the thermistor. The thermistor is around 100k ohms at room temperature so I have used a 400k resistor on the voltage divider to make it within the 0 to 1v range required by the pin.

Reading the PIB using system_ADC_read give a fluctuating value. Also putting a multi meter across the thermistor similarly gives a fluctuating voltage.

I assume it it therefore something to do with my wiring....

I have an ftd1232 supplying a steady 3.35v (measured when not connected to the esp12f). I have connected the power pins to the +/- of the breadboard and then supply the esp and the voltage divider from the breadboard power rails.

In terms of troubleshooting, I have measured the voltage on the breadboard power rails and it too fluctuates both when the voltage divider is connected or not. Also, the same setup using an arduino (here I had the other resistor in the divider as 100k as I didn't need to reduce the voltage) and it works fine.


I suspect I am doing something stupid but can't work it out.. Any help appreciated

Thanks

Lee.
User avatar
By leenowell
#41708 Hi All,

I have now at least solved the varying voltage issue. It seems there was a dodgy breadboard connection between the thermistor and the ADC pin. Wiggling it a bit seems to have fixed the problem. The ADC values and voltage is largely stable now but the value itself is incorrect. Looks like it is reading lower than it should be for some reason.

More troubleshooting tonight but thought I would update in case anyone can benefit from it.

thanks

Lee.