ADS1115 and ESP32 How to measure voltage?[Video]
2.4GHz~2.5GHz Bluetooth, WiFi -40°C~85°C 2.7V~3.6V ADC, GPIO, I2C, I2S, PWM, SDIO, SPI, UART 150Mbps 20.5dBm 802.11b/g/n, Bluetooth v4.2 + EDR, Class 1, 2 and 3 -97dBm Module









2.4GHz~2.5GHz Bluetooth, WiFi -40°C~85°C 2.7V~3.6V ADC, GPIO, I2C, I2S, PWM, SDIO, SPI, UART 150Mbps 20.5dBm 802.11b/g/n, Bluetooth v4.2 + EDR, Class 1, 2 and 3 -97dBm Module
The ESP32 is a single-chip 2.4 GHz Wi-Fi and Bluetooth combination chip, and ADS1115 is a microcontroller. So this article is going to combine the ADS1115 with ESP32 to figure out how to measure the voltage.

ESP32 and ADS1115 ADC- Voltmeter project
Overview of ADS1115
For microcontrollers without an analog-to-digital converter or if you prefer a higher-precision ADC, the ADS1115 provides 16-bit precision at 860 samples/second through I2C. The chip can have four single-ended input channels or two differential input channels. To help boost smaller single/differential signals across the full range, an adjustable gain amplifier (up to x16) is incorporated. This ADC can measure a wide range of signals and is powered from 2 to 5 volts. It's also quite simple to operate.
Overview of ESP32
The ESP32 is a single-chip 2.4 GHz Wi-Fi and Bluetooth combination chip manufactured using TSMC's ultra-low-power 40 nm technology. For a wide range of applications and power profiles, it is developed and optimized for the best power performance, RF performance, robustness, versatility, features, and dependability.
ADS1115 VS ESP32 Features
ESP32 Features
Processors:
CPU: Xtensa dual-core (or single-core) 32-bit LX6 microprocessor, operating at 160 or 240 MHz and performing at up to 600 DMIPS
Ultra-low-power (ULP) co-processor
Memory: 320 KiB RAM, 448 KiB ROM
Wireless connectivity:
Wi-Fi: 802.11 b/g/n
Bluetooth: v4.2 BR/EDR and BLE (shares the radio with Wi-Fi)
Peripheral interfaces:
34 × programmable GPIOs
12-bit SAR ADC up to 18 channels
2 × 8-bit DACs
10 × touch sensors (capacitive sensing GPIOs)
4 × SPI
2 × I²S interfaces
2 × I²C interfaces
3 × UART
SD/SDIO/CE-ATA/MMC/eMMC host controller
SDIO/SPI slave controller
Ethernet MAC interface with dedicated DMA and planned IEEE 1588 Precision Time Protocol support[4]
CAN bus 2.0
Infrared remote controller (TX/RX, up to 8 channels)
Motor PWM
LED PWM (up to 16 channels)
Hall effect sensor
Ultra-low-power analog pre-amplifier
Security:
IEEE 802.11 standard security features are all supported, including WPA, WPA2, WPA3 (depending on the version)[5] and WAPI
Secure boot
Flash encryption
1024-bit OTP, up to 768-bit for customers
Cryptographic hardware acceleration: AES, SHA-2, RSA, elliptic curve cryptography (ECC), random number generator (RNG)
Power management:
Internal low-dropout regulator
Individual power domain for RTC
5 μA deep sleep current
Wake up from GPIO interrupt, timer, ADC measurements, capacitive touch sensor interrupt
ADS1115 Features
Ultra-Small X2QFN Package:
2 mm × 1.5 mm × 0.4 mm
Wide Supply Range: 2.0 V to 5.5 V
Low Current Consumption: 150 µA
(Continuous-Conversion Mode)
Programmable Data Rate:
8 SPS to 860 SPS
Single-Cycle Settling
Internal Low-Drift Voltage Reference
Internal Oscillator
I2C Interface: Four Pin-Selectable Addresses
Four Single-Ended or Two Differential Inputs (ADS1115)
Programmable Comparator (ADS1114 and ADS1115)
Operating Temperature Range:
–40°C to +125°C
ADS1115 VS ESP32 Pinout

ESP32 Pinout

ADS1115 Pinout
ADS1115 VS ESP32 Block Diagram

ADS1115 Block diagram

ESP32 Block diagram
ADS1115 VS ESP32 Applications
ESP32 Applications
Generic low power IoT sensor hub
Generic low power IoT loggers
Video streaming from the camera
Over The Top (OTT) devices
Music players
– Internet music players
– Audio streaming devices
Wi-Fi enabled toys
– Loggers
– Proximity sensing toys
Wi-Fi-enabled speech recognition devices
Audio headsets
Smart power plugs
Home automation
Mesh network
Industrial wireless control
Baby monitors
Wearable electronics
Wi-Fi location-aware devices
Security ID tags
Healthcare
– Proximity and movement monitoring trigger devices
– Temperature sensing loggers
ADS1115 Applications
Portable instrumentation
Consumer goods
Battery monitoring
Temperature measurement
Factory automation and process controls
Interfacing ADS1115 external ADC with ESP32

For the I2C connection, the ESP32 GPIO21 and GPIO22 are used. With the A0 pins of the ADS1115, connect the analog signal to the voltage you want to measure.
Why we need to use external ADC with ESP32?
ESP32 includes two built-in ADC modules, ADC0 and ADC1, with each channel having a 12-bit resolution. But, as mentioned in the ESP32 ADC lesson, the fundamental difficulty with ESP32 ADCs is that they have non-linear properties and display non-linear behavior. It can't tell the difference between 1mV and 2mV signals, hence it has a limited resolution. We can use an external high-resolution programmable ADC IC to fix these problems.
ADS1115 VS ESP32 Package information

ASD1115 Package information

ESP32 Package information
Datasheet PDF
- Datasheets :
Popularity by Region
How many channels are there in ADS1115?
The ADS1115 is a precision 4-channel 16-bit Analog-to-Digital Converter with an I2C interface that greatly improves the measurement accuracy over the built-in ADC of Arduino and similar uCs.
Does ESP32 have an ADC?
Two 12-bit SAR ("Successive Approximation Register") ADCs (Analog to Digital Converters) are integrated into the ESP32, which permits measurements on 18 channels (analog enabled pins). Some of these pins can be utilized to construct a programmed gain amplifier for measuring tiny analog signals.How does ADC work with Arduino?
The board's microcontroller contains an analog-to-digital converter (ADC) circuit that reads the changing voltage and transforms it to a number between 0 and 1023. When the shaft is fully twisted in one direction, the pin receives 0 volts, and the input value is 0.
What is the difference between ESP32 and ESP8266?
The ESP32 is a dual-core CPU with speeds ranging from 160 to 240 MHz, whereas the ESP8266 is a single-core processor with a speed of 80 MHz. These modules have GPIOs that handle SPI, I2C, UART, ADC, DAC, and PWM, among other protocols.
STA540 Power Amplifier: Datasheet, Pinout and Equivalents23 August 202124639
2SC1971 NPN Transistor: 2SC1971 Power Transistor, 17V, 2A, Datasheet pdf and Substitute23 December 20218918
NodeMCU ESP8266[Video+FAQ]: ESP32 vs ESP826604 May 20225007
NC7SB3157P6X: Overview, Features, and Applications14 December 2023738
1N4001 vs 1N4007: What’s the Differences?14 July 202222408
TPS61022RWUR Boost Converter, 0.5-V 7-VQFN and Switching Voltage Regulators17 March 20222955
TL072 JFET: Datasheet, Equivalent and Diagram29 April 202210781
Introduction to Microchip dsPIC33EP32MC202TESS29 February 2024131
A Complete Guide to 2025 Battery vs 2032 Swapping29 August 20254468
What is Smoke Detector?26 October 20213740
How New Battery Charger Technology is Shaping the Future10 July 20251177
Why is there a Chip Shortage?19 October 20212690
Battery Charger IC Guide16 February 202211928
China to Inject $40 Billion into Semiconductor Sector with New State Fund07 September 20232748
4680 Battery - Upgrade of Battery Technology17 December 20216783
Design and Implementation of High Frequency Inverter for Printer Based on IR211013 April 20229877
RF Solutions
In Stock: 122
United States
China
Canada
Japan
Russia
Germany
United Kingdom
Singapore
Italy
Hong Kong(China)
Taiwan(China)
France
Korea
Mexico
Netherlands
Malaysia
Austria
Spain
Switzerland
Poland
Thailand
Vietnam
India
United Arab Emirates
Afghanistan
Åland Islands
Albania
Algeria
American Samoa
Andorra
Angola
Anguilla
Antigua & Barbuda
Argentina
Armenia
Aruba
Australia
Azerbaijan
Bahamas
Bahrain
Bangladesh
Barbados
Belarus
Belgium
Belize
Benin
Bermuda
Bhutan
Bolivia
Bonaire, Sint Eustatius and Saba
Bosnia & Herzegovina
Botswana
Brazil
British Indian Ocean Territory
British Virgin Islands
Brunei
Bulgaria
Burkina Faso
Burundi
Cabo Verde
Cambodia
Cameroon
Cayman Islands
Central African Republic
Chad
Chile
Christmas Island
Cocos (Keeling) Islands
Colombia
Comoros
Congo
Congo (DRC)
Cook Islands
Costa Rica
Côte d’Ivoire
Croatia
Cuba
Curaçao
Cyprus
Czechia
Denmark
Djibouti
Dominica
Dominican Republic
Ecuador
Egypt
El Salvador
Equatorial Guinea
Eritrea
Estonia
Eswatini
Ethiopia
Falkland Islands
Faroe Islands
Fiji
Finland
French Guiana
French Polynesia
Gabon
Gambia
Georgia
Ghana
Gibraltar
Greece
Greenland
Grenada
Guadeloupe
Guam
Guatemala
Guernsey
Guinea
Guinea-Bissau
Guyana
Haiti
Honduras
Hungary
Iceland
Indonesia
Iran
Iraq
Ireland
Isle of Man
Israel
Jamaica
Jersey
Jordan
Kazakhstan
Kenya
Kiribati
Kosovo
Kuwait
Kyrgyzstan
Laos
Latvia
Lebanon
Lesotho
Liberia
Libya
Liechtenstein
Lithuania
Luxembourg
Macao(China)
Madagascar
Malawi
Maldives
Mali
Malta
Marshall Islands
Martinique
Mauritania
Mauritius
Mayotte
Micronesia
Moldova
Monaco
Mongolia
Montenegro
Montserrat
Morocco
Mozambique
Myanmar
Namibia
Nauru
Nepal
New Caledonia
New Zealand
Nicaragua
Niger
Nigeria
Niue
Norfolk Island
North Korea
North Macedonia
Northern Mariana Islands
Norway
Oman
Pakistan
Palau
Palestinian Authority
Panama
Papua New Guinea
Paraguay
Peru
Philippines
Pitcairn Islands
Portugal
Puerto Rico
Qatar
Réunion
Romania
Rwanda
Samoa
San Marino
São Tomé & Príncipe
Saudi Arabia
Senegal
Serbia
Seychelles
Sierra Leone
Sint Maarten
Slovakia
Slovenia
Solomon Islands
Somalia
South Africa
South Sudan
Sri Lanka
St Helena, Ascension, Tristan da Cunha
St. Barthélemy
St. Kitts & Nevis
St. Lucia
St. Martin
St. Pierre & Miquelon
St. Vincent & Grenadines
Sudan
Suriname
Svalbard & Jan Mayen
Sweden
Syria
Tajikistan
Tanzania
Timor-Leste
Togo
Tokelau
Tonga
Trinidad & Tobago
Tunisia
Turkey
Turkmenistan
Turks & Caicos Islands
Tuvalu
U.S. Outlying Islands
U.S. Virgin Islands
Uganda
Ukraine
Uruguay
Uzbekistan
Vanuatu
Vatican City
Venezuela
Wallis & Futuna
Yemen
Zambia
Zimbabwe


Product
Brand
Articles
Tools



