![]() The analog voltage is converted to digital values and displayed on the Serial Monitor. Let us now build a small circuit to demonstrate the ADC function of ESP8266.Ī 10 KΩ Potentiometer is chosen as the analog input device with its end terminals connected to 3.3V and GND and the Wiper Terminal connected to A0 Pin of NodeMCU. If you have an ESP8266 NodeMCU board, then you can directly use the ADC Pin (A0) for reading analog voltages in the range of 0V to 3.3V. Demonstration of ESP8266 ADC using NodeMCU WARNING: Do not provide more than 1V directly to the ADC Pin (TOUT – Pin 6) of ESP8266EX SoC. ESP-01 users, who don’t have access to ADC Pin can solder a wire to Pin 6 of ESP8266EX SoC and use it with the voltage divider. If you want to use the ADC for 0V to 3.3V, then you have to use a voltage divider circuit as shown above. IMPORTANT NOTE: The voltage range of ADC in ESP8266 SoC is 0V to 1V. If you take a look at the schematic of NodeMCU, the ADC0 pin in the above pinout image acts as an input to the voltage divider formed by 220 KΩ and 100 KΩ resistors with the output of the voltage divider given to the TOUT Pin of ESP8266EX SoC. ![]() The NodeMCU board, which is essentially based on the ESP-12E Wi-Fi Module, has a pin for ADC called A0.Īdditionally, NodeMCU also takes care of the input voltage range limit from the original 0V to 1V to more user friendly 0V to 3.3V. If you are desperate, then you can use the Pin 6 as ADC Pin but remember that it can accept voltages in the range of 0V to 1V only. If you have the vanilla ESP8266 Board i.e., ESP-01, then you are out of luck, as it doesn’t have the pin for ADC on the board. If you are building the firmware from the SDK, then refer to the datasheet and other relevant documentation, as there is a lot more information regarding the ADC and its configuration. But when measuring external voltage at TOUT Pin, the input voltage range should be between 0V and 1V. ![]() For Power Supply Voltage measurement, the TOUT Pin must be left floating.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |