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

User avatar
By RogerClark
#4461 Can anyone tell me the current status of ADC ??

As far as I can gather, the esp8266 has and ADC that can measure between 0V and 1V with 10 bit resolution, however there are problems because the ADC can't be read when the device is transmitting, as it seems to read 1024 decimal at this time

I've looked in the SDK docs and there doesnt seem to be an API for the ADC, so I presume that it needs to be implemented by code in the driver folder.

I think the IoT example may have this code, though I have not managed to totally track it down.

ADC seems to be via pin TOUT on the esp8266, but this pin on the chip doesn't seem to be connected to a pin on the outside of the board on any of the modules including the ESP-07 (as far as I can tell)
I have several ESP-03's and I know TOUT is not connected to a pin on my module. So I presume that if I want to use ADC that I'm going to need to solder directly onto the chip.

If anyone could confirm or elaborate on any of the above, that would be fantastic ;-)
User avatar
By igrr
#4468 IIRC, SDK 0.9.3 has a system_adc_read() function that takes care of issues related to WiFi.
User avatar
By RogerClark
#4473 Thanks

I had already written some test code using that and was getting random values around 70

e.g. in my timer function

myTimer(void *arg)
uint8_t buffer[16];
uint16 adc = system_adc_read();
ets_sprintf( buffer, "%d\r\n", adc );

Are there docs for 0.9.3 or are you doing the same as me, looking in the headers and the assembler code ?
User avatar
By uhrheber
#4475 ESP-12 has the tout signal connected to a module pin.
If you want something more convenient, there's a cheap development kit for the ESP-12 available: ... 33472.html

I made my own breadboard adapter for an ESP-04, and soldered a wire directly to the tout pin of the ESP: