NodeMCU A0 reads 1023 too early: the analog input only accepts up to 1 V

The ESP8266 ADC accepts only about 0 to 1 V on the bare chip. Many boards add a divider for 3.3 V, but check yours.

What the message means

A signal above the input range reads the maximum. A voltage far above the limit can damage the chip.

Fix it in this order

  1. Check the schematic of your board for a divider on A0.
  2. If there is none, use a divider so the sensor output stays below 1 V.
  3. If there is one, the input range is about 0 to 3.2 V and you must not exceed 3.3 V.
  4. Never connect 5 V directly to A0.
  5. Average several readings, since the ADC is noisy.
  6. Use an external ADC module if you need more channels or accuracy.

Why it happens

The bare ESP8266 chip reads only 0 to about 1 V on its analog pin. Many NodeMCU boards add a voltage divider so that 3.3 V can be read, but not all do.

Check your board. If it has no divider, add one so the input never exceeds 1 V, and never feed 5 V into A0.

If you see this, do this

You seeDo this
Reads 1023 with a light sensorInput range exceeded.
Reads wrong values with Wi-Fi onNoise. Average and filter.

ADC noise, voltage divider basics.

Last reviewed: November 2026. These are the usual causes and the order that finds them fastest. Test on your own board; clones and cables differ.

Why this happens

The ESP8266 has one 10-bit analog input. The bare chip expects 0 to about 1 V and gives readings from 0 to 1023 over that span. Any input above about 1 V reads 1023, which is why a sensor seems to reach full scale far too early. NodeMCU-style boards often add a resistor divider so the pin accepts roughly 0 to 3.3 V, but the divider values differ between boards.

The ADC is also noisy, and Wi-Fi activity disturbs it, so single readings jump by several counts. That is separate from the range problem but often seen at the same time.

How to confirm the cause

  • Look at the board photo or schematic for two resistors between the A0 header pin and the chip. Their presence suggests a built-in divider.
  • Measure with a multimeter: with the sensor at its highest output, read the voltage at the chip side of the divider. Near 1 V or below is safe.
  • Connect A0 to GND and read it; it should be 0 or very close. Then connect through a known divider to 3.3 V and check the reading against your calculation.
  • Print 20 readings of a steady voltage. A spread of a few counts is normal noise; a spread of tens of counts points to supply or Wi-Fi interference.
  • Check that you did not set the ADC to read the supply voltage in the sketch, which stops external readings.

Worked example

A divider for a 0 to 3.3 V sensor on a bare input, using 27 kohm over 10 kohm. The arithmetic assumes a nominal 1.0 V full scale; check your chip.

ratio     = 10 / (27 + 10) = 0.270
Vpin max  = 3.3 * 0.270   = 0.892 V
raw max   = 0.892 / 1.0 * 1023 = about 912
Vsensor   = raw / 1023 * 3.7        (3.7 = 37/10)
raw = 456 -> 456/1023 = 0.4457 -> * 3.7 = 1.649 V

int raw = analogRead(A0);
float volts = raw / 1023.0 * 3.7;

Common mistakes

  • Connecting 5 V to A0 on any board.
  • Assuming every NodeMCU has the same divider.
  • Using ADC_MODE(ADC_VCC) to read the supply while a sensor is wired to A0; that mode needs the pin left unconnected.
  • Using a high-impedance sensor without a buffer or capacitor, which gives unstable readings.
  • Reading once and trusting it.

If this did not fix it

  • Sensor output that is truly above its stated range, because it is powered from 5 V.
  • Noise from Wi-Fi. Read several times and average, or add a small capacitor close to the pin.
  • Needing more channels or accuracy than the built-in ADC gives. An external ADC module is the usual answer.