ESP32 ArduinoCore Interface – ADC





ESP8266 NodeMCU Interface – ADC


ESP8266 with  ADC Interface

                    This the simple example of ADC with ESP8266. ESP8266 have a in-build ACD unit with 10 bit resolution(10bits-0 to 1024 steps), so no need to add a external ADC converter ICs. if your beginner try this below codes and understand the ADC with ESP8266. I used Ai-thinger’s ESP-12F module(not used NodeMCU Dev Board) wit USB to UART Programmer and NodeMCU firmware. but you can also use any other firmware like Arduino code, Man-goose OS to do this. In this experiment used 3 NodeMCU module libraries are UART (for printing), Timer(for looping), and ADC Module. So your NodeMCU firmware should have this modules. NodeMCU only support only one ACD pin. ADC bin converts voltage from 0 to 3.3 according to 0- 1024 values(10bit resolution)

  •  Required Hardware Components :  2x USB to UART converter programmer, 1x ESP8266 Module(Used Ai-Thinker’s ESP-12F module), 1x Variable resistor  (Pot-10k)
  • Required software tools : ESPlorer IDE Tool,

Note : if you use NodeMCU Dev board don’t need ESP8266 Ai-Thinkers Module and UART Programmer. Because NodeMCU Dev Board have already Programmer.

Circuit Diagram



  • EX  : tmr.alarm(0,500,1, function printf( end)
  • tmr.alarm function is like a loop for 500microseconds, So every microseconds once that ESP read the ADC value from that pin
  • print function is the same as uart.write(0,"\n") the value to terminal window
  •  read the ADC value.




ESP8266 Arduino-Core Interface – ADC



  • Required Hardware – ESP8266 with Programmer (or)  NodeMCU Dev Kit
  • Required Software Tools  – Arduino IDE with ESP8266 Core






Next :

Previous :


Embedded Interface – ADC

ADC Example


  • The analog signal is continuous I time and it is necessary to convert this to a flow of digital values. It is therefore required to define the rate at which new digital values are sampled from the analog signal. The rate of new values is called the sampling rate or sampling frequency of the converter.
  • The most common ways for implementing ADC are direct conversion, successive approximation, ramp compare, Wilkinson, integrating, delta encoded, pipelined, sigma delta, time interleaved, intermediate FM stage, other types.
  • A successive approximation ADC uses a comparator to successively narrow a range that contains the input voltage.
  • The values are usually stored electronically in binary form, so the resolution is usually expressed in bits.
  • The number of discrete values available, or levels, is assumed to be power of two.
  • Resolution can also be defined electrically, and expressed in volts. The minimum change in voltage required to guarantee a change in the output code level is called least significant bit.



Next :

Previous :


if you have any queries call us +918300026060 or WhatsApp Dismiss


Your Cart

%d bloggers like this: