Same-day dispatch before 2 PM · Free delivery over ₹999 · GST invoices Get the appPrices incl. GST
Geekobot
Snap & SendNEWGeeko AIWhere's myOrder
Log in
Products
  • Projects
    • Component guidesHow parts work, with code you can run
    • Learning pathsFrom your first LED to your first robot
    • Workshops & eventsOnline sessions for makers and classes
    • ElectrolarkFree guided builds, simulator and certificates
    • Students & teachersStudent discount and classroom help
    • CommunityShare builds and ask other makers
    • CalculatorsOhm's law, LED resistor, 555 and 100+ more
    • Circuit builderWire parts and run the circuit, powered by Electrolark
    • Geeko AIAsk what to buy or how to wire it
    • Snap & SendPhotograph a part or list, we find it
    • Part finderAnswer a few questions, get the right part
    • Compatibility checkWill these two parts work together?
    • Compare partsSpecs side by side
    • Business & bulk ordersGST invoices, credit and volume prices
    • Request a quotationSend your list, get a quote
    • Classroom kitsPer-student kits and lab bundles
    • Gift cardsFor students, teams and events
  • Atal Tinkering Lab
BOM to cart
Geekobot

Components, kits and know-how for makers, students, engineers, labs and businesses across India.

Ask Geeko AIOrders, parts and projects, any timeEmail supportReply within 1 working dayGet the Geekobot appAdd it to your home screen, free

Follow us

Shop

  • Boards & SBCs
  • Sensors & Modules
  • IoT & Wireless
  • Drone & FPV
  • 3D Printing
  • Filaments & Resins
  • Motors & Drivers
  • Power & Batteries
  • Semiconductors
  • Passive
  • Displays & LEDs
  • Switches & Relays
  • Wires & Cables
  • Prototyping
  • Tools & Test
  • Robotics
  • STEM Kits
  • Atal Tinkering Lab
  • Mechanical Parts
  • Audio

Orders

  • Track your order
  • Help & support
  • Shipping and delivery
  • Refunds and cancellation
  • Contact us

Learn

  • Projects
  • Geeko AI project assistant
  • Learning paths
  • Guides
  • Calculators
  • Electrolark: free guided builds

Part tools

  • Part finder
  • Compare parts
  • Will it work with my board?

Institutions

  • Classroom kits
  • Atal Tinkering Lab
  • Students & teachers
  • Workshops & Events

Business

  • Business & education
  • Request a quotation
  • BOM bulk upload
  • Quick order by SKU

Company

  • About Geekobot
  • Community
  • Gift cards
  • Terms & conditions
  • Privacy policy
  • Product directory
  • Sitemap

© 2026 Geekobot, a trade name of OLatus Systems Private Limited. All rights reserved.

20, 1st Floor, Neeladri Complex, 10th Cross, Sampige Rd, 2nd Main, Malleshwaram, Bengaluru, Karnataka 560003 · GSTIN 29AACCO0462F1ZM

+91 91810 15607 · connect@geekobot.in · Monday to Saturday, 10 AM to 2 PM IST

UPI · CARDS · NETBANKING · GST INVOICES

ShopProjectsGeeko AIGuides
Compare 0 parts →
Log in

Shop by category

Shop all components
  • Boards & SBCs1,910 products
    • Alternative Single Board Computers
    • Arduino Ecosystem
    • FPGA & Logic Boards
    • Microcontroller & Wireless Boards
    View all
  • Sensors & Modules4,701 products
    • Biomedical & Heart Rate
    • Current, Voltage & Power
    • Force, Weight & Pressure
    • Gas, Weather & Environmental
    View all
  • IoT & Wireless2,314 products
    • RF Modules
    • RFID & NFC
    • Antennas & RF Accessories
    • Cameras & Smart Vision
    View all
  • Drone & FPV3,558 products
    • Flight Control & Navigation
    • FPV Video & Optics
    • Frames & Structural Parts
    • Motors & Propulsion
    View all
  • 3D Printing2,204 products
    • 3D Printers
    • 3D Scanners & Digitizers
    • Laser Engravers & Cutters
    • Material Management & Upgrades
    View all
  • Filaments & Resins1,472 products
    • Filaments
    • Photopolymer Resins
    View all
  • Motors & Drivers463 products
    • BLDC Motor Drivers
    • DC & Geared Motors
    • DC Motor Drivers
    • Linear Actuators & Solenoids
    View all
  • Power & Batteries557 products
    • Battery Holders & Connectors
    • Breadboard Power
    • Chargers & BMS
    • DC-DC Converters
    View all
  • Semiconductors295 products
    • Diodes & Rectifiers
    • Interface & RF Encoder ICs
    • Logic ICs (74xx)
    • Logic ICs (CD4000)
    View all
  • Passive67 products
    • Capacitors
    • Circuit Protection
    • Crystals & Oscillators
    • Inductors
    View all
  • Displays & LEDs572 products
    • 7-Segment & Dot Matrix
    • Addressable LEDs
    • Character LCDs
    • Graphic LCDs
    View all
  • Switches & Relays184 products
    • Keypads & Touch
    • Push Buttons & Tactile
    • Relay Modules
    • Relays
    View all
  • Wires & Cables233 products
    • Board-to-Wire Connectors
    • Crimp & Splice
    • Headers & Dupont
    • Heat Shrink & Sleeving
    View all
  • Prototyping101 products
    • Breadboards
    • Interface Modules
    • PCBs & Perfboards
    View all
  • Tools & Test717 products
    • Bench Power Supplies
    • Hand Tools
    • Measuring Tools
    • Meters & Testers
    View all
  • Robotics180 products
    • Humanoid & Legged Robots
    • Robot Chassis & Platforms
    • Robotic Arms & Grippers
    • Wheels & Casters
    View all
  • STEM Kits268 products
    • Arduino Learning Kits
    • Coding & IoT Kits
    • Early Coding (Ages 3-8)
    • Invention Kits
    View all
  • Atal Tinkering Lab196 products
    • Package 1: Electronics, Robotics, IoT and Sensors
    • Package 2: Rapid Prototyping Tools
    • Package 3: Mechanical, Electrical and Measurement Tools
    • Package 4: Power Supply, Accessories and Safety Equipment
    View all
  • Mechanical Parts212 products
    • Bearings
    • Brackets & Mounts
    • Couplers
    • Fasteners & Standoffs
    View all
  • Audio109 products
    • Amplifier Modules
    • Buzzers & Sirens
    • Speakers
    View all
  1. Home
  2. ›Guides
  3. ›Electronics Fundamentals
  4. ›ADCs Explained
Step 5 of 16 in Arduino from zeroPart of a learning path.
Next

Concept explainer · Beginner · 4 min read

ADCs Explained

How analogRead Works on Arduino, ESP32 and Pico

By Geekobot Learning Team · Updated 24 Oct 2026

I'm using
Wiring, code and the Run it panels follow your board.
On this page
Short answerResolution and reference voltageBoard-by-board quirksReading a voltage with averagingMeasuring higher voltages and small signalsReducing noiseTry itCommon mistakesFAQsParts and next steps
Short answer

An analog-to-digital converter (ADC) measures a voltage and returns a number. On an Arduino Uno, analogRead gives 0 to 1023 for 0 to 5 V, so each step is about 4.9 mV. The ESP32 and Pico return 0 to 4095 for 0 to 3.3 V. Convert a reading to volts with volts = reading x reference / maximum count, keep the input below the reference voltage, and average several readings to reduce noise.

Key specs at a glance

Uno / Nano / Mega
10-bit, 0 to 1023, 5 V reference (or 1.1 V internal)
ESP32
12-bit, 0 to 4095, about 0.1 to 3.1 V usable with default attenuation
Raspberry Pi Pico
12-bit, 3 inputs on GP26 to GP28, 3.3 V reference
ESP8266
10-bit, one input (A0)
External upgrade
ADS1115: 16-bit, 4 inputs, I2C, programmable gain
Source impedance
Keep under about 10 kΩ on AVR boards
01

Resolution and reference voltage

An ADC divides the range from 0 V to its reference voltage into steps. A 10-bit ADC has 1024 steps; a 12-bit ADC has 4096. The step size (the smallest change it can see) is reference / steps: 5 V / 1024 = 4.9 mV on an Uno, 3.3 V / 4096 = 0.8 mV on a Pico. Converting back:

volts = reading x Vref / (2^bits - 1)

So a reading of 512 on an Uno is about 2.5 V. Accuracy also depends on the reference: if the Uno's 5 V rail is really 4.8 V from USB, every reading is 4% off. Use analogReference(INTERNAL) (1.1 V) for small signals, or measure the real supply and use that value. The ADC resolution calculator does the arithmetic.

02

Board-by-board quirks

BoardQuirkWhat to do
Arduino UnoReference follows the 5 V supplyUse INTERNAL 1.1 V or an external AREF for accuracy
ESP32Non-linear below about 0.1 V and above about 3.1 VUse analogReadMilliVolts(), which applies factory calibration
ESP32ADC2 pins do not work while Wi-Fi is onUse ADC1 pins (GPIO 32 to 39)
ESP32Default attenuation measures up to about 3.1 VanalogSetPinAttenuation() for lower ranges
ESP8266 NodeMCUBare chip reads 0 to 1 V; board divider extends it to 3.3 VCheck your board before adding dividers
Raspberry Pi PicoArduino-Pico returns 10-bit by defaultCall analogReadResolution(12)
Raspberry Pi (Pi 4, Pi 5)No ADC at allAdd an ADS1115 or MCP3008
Arduino Uno
Quirk:
Reference follows the 5 V supply
What to do:
Use INTERNAL 1.1 V or an external AREF for accuracy
ESP32
Quirk:
Non-linear below about 0.1 V and above about 3.1 V
What to do:
Use analogReadMilliVolts(), which applies factory calibration
ESP32
Quirk:
ADC2 pins do not work while Wi-Fi is on
What to do:
Use ADC1 pins (GPIO 32 to 39)
ESP32
Quirk:
Default attenuation measures up to about 3.1 V
What to do:
analogSetPinAttenuation() for lower ranges
ESP8266 NodeMCU
Quirk:
Bare chip reads 0 to 1 V; board divider extends it to 3.3 V
What to do:
Check your board before adding dividers
Raspberry Pi Pico
Quirk:
Arduino-Pico returns 10-bit by default
What to do:
Call analogReadResolution(12)
Raspberry Pi (Pi 4, Pi 5)
Quirk:
No ADC at all
What to do:
Add an ADS1115 or MCP3008
03

Reading a voltage with averaging

Average 16 readings and print volts (Arduino Uno) · Arduino C++Verify & upload in Electrolark
const int PIN = A0;
const float VREF = 5.0;      // measure your real 5 V rail for better accuracy

void setup() { Serial.begin(115200); }

void loop() {
  long sum = 0;
  for (int i = 0; i < 16; i++) {
    sum += analogRead(PIN);
    delay(2);
  }
  float raw = sum / 16.0;
  float volts = raw * VREF / 1023.0;
  Serial.println(volts, 3);
  delay(500);
}
04

Measuring higher voltages and small signals

Above the reference

use a voltage divider. To read up to 15 V on a 3.3 V ADC, 100 kΩ over 27 kΩ gives about 3.2 V at 15 V. Account for the ratio in code and add a small capacitor (100 nF) across the lower resistor for a steadier reading.

Small signals

a thermocouple or load cell gives millivolts; amplify them with an op-amp or a dedicated chip such as the HX711, or use an ADS1115 with its programmable gain.

Never exceed the supply

more than the board's supply voltage on an analog pin can damage it. Add a series resistor (1 to 10 kΩ) as protection when the source could spike.

05

Reducing noise

Average several samples, add a 100 nF capacitor from the analog input to ground, keep sensor wires short and away from motor wires, and power analog sensors from a clean supply. On ESP32, readings are noisier during Wi-Fi transmission: take samples between transmissions or average more. If you still need precision, an external ADC beats the built-in ones.

06

Try it: ADC resolution calculator

Change the values and the diagram and results update as you type.

07

Common mistakes to avoid

  • !Assuming the Uno's 5 V reference is exactly 5.000 V.
  • !Using ESP32 ADC2 pins with Wi-Fi on.
  • !Feeding more than 3.3 V into an ESP32 or Pico analog pin.
  • !Reading a high-impedance divider (1 MΩ) on an Uno and getting drifting values.
  • !Expecting linear readings from the ESP32 near 0 V and 3.3 V.
08

Frequently asked questions

What does analogRead return?

A number proportional to the input voltage: 0 to 1023 on 10-bit boards like the Uno, 0 to 4095 on 12-bit boards like the ESP32 and Pico.

How do I convert analogRead to voltage?

volts = reading x reference voltage / maximum count. On an Uno: volts = reading x 5.0 / 1023.

Why are my ESP32 analog readings wrong?

The ESP32 ADC is non-linear near the ends of its range, ADC2 fails with Wi-Fi on, and the default range tops out near 3.1 V. Use ADC1 pins and analogReadMilliVolts().

How many analog inputs does a Raspberry Pi Pico have?

Three usable ADC inputs on GP26, GP27 and GP28, plus an internal temperature sensor.

When should I use an ADS1115?

When you need more accuracy, more inputs, small signals with gain, or an ADC on a Raspberry Pi, which has none built in.

Parts for this guide

  • 16mm Rotary Potentiometer (Linear)
    ₹14View
  • Resistor Assortment Kit (30 Values)
    ₹33View
  • Digital Multimeter
    ₹177View
Shop Potentiometers & Trimmers

Calculators

ADC resolution calculatorVoltage divider calculator

Terms in this guide

ADCAnalog-to-digital converter: turns a voltage into a number. A 10-bit ADC gives 0 to 1023; a 12-bit ADC gives 0 to 4095.ResolutionThe smallest step a measurement or output can represent. A 12-bit ADC on 3.3 V has steps of about 0.8 mV.Analog signalA signal whose voltage varies continuously, such as a sensor output of 0 to 3.3 V, rather than switching only between HIGH and LOW.Voltage dividerTwo resistors in series that output a fixed fraction of the input voltage.VrefOn stepper drivers, the reference voltage that sets the coil current limit.I2CInter-Integrated Circuit: a two-wire bus (SDA and SCL) that connects many devices by address.CalibrationMeasuring a sensor against known conditions so its raw numbers can be converted into meaningful values, such as dry and wet readings for a soil sensor.

Projects that use it

Put this into practice: 34 step-by-step builds in our project library use parts from this guide.

Beginner · 45 minutesAutomatic dusk-to-dawn lightView projectBeginner · 1–2 hoursWi-Fi dusk light with manual overrideView projectBeginner · 45 minutesPico fading night light (MicroPython)View project
Browse all 34 projects

Keep learning

Component guideBeginnerPotentiometers and TrimmersA potentiometer is a three-terminal variable resistor: the outer pins connect across the full resistance and the middle pin (wiper) taps a point you set with the knob.3 min read · Passive ComponentsComponent guideBeginnerLDR Light SensorsAn LDR (light-dependent resistor or photoresistor) has high resistance in the dark, about 1 MΩ, and low resistance in bright light, under 1 kΩ.3 min read · SensorsComparisonBeginnerSoil Moisture SensorsResistive (YL-69) vs capacitive v1.2/v2.0 soil moisture sensors: why resistive probes corrode, Arduino and ESP32 wiring, dry and wet calibration, auto watering.3 min read · SensorsComponent guideBeginnerESP32 GuideThe ESP32 is a low-cost 3.3 V microcontroller from Espressif with built-in Wi-Fi and Bluetooth, used for IoT devices, smart-home controllers and web dashboards.5 min read · Boards & MicrocontrollersConcept explainerBeginnerPWM ExplainedPWM (pulse-width modulation) switches a pin fully on and off very quickly; the share of time it is on, the duty cycle, sets the average power.3 min read · Electronics Fundamentals

Sources

  • Microchip ATmega328P datasheet, ADC chapter
  • Espressif ESP32 ADC documentation
  • Raspberry Pi RP2040 datasheet, ADC chapter
  • Texas Instruments ADS1115 datasheet

Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

On this page
Short answerResolution and reference voltageBoard-by-board quirksReading a voltage with averagingMeasuring higher voltages and small signalsReducing noiseTry itCommon mistakesFAQsParts and next steps
Need a hand?Ask Geeko AI which part fits your project, or talk to the Geekobot team.Ask Geeko AIHelp & support

Parts for this guide3 items · ₹224

16mm Rotary Potentiometer (Linear) · Resistor Assortment Kit (30 Values) · Digital Multimeter

Run itChange the inputs and watch the output
Serial monitor115200 baud
2.200

A simulation of the sketch above, so you know what to expect. Real readings vary with your parts and wiring.

Ask the Community

Ask a question