voltmeter/A build, and a wrong number/12. When the number is wrong
A build, and a wrong number · 12 of 12

When the number is wrong

A wrong reading is nearly always one of five things: zero because the loop is open, stuck at the top because the input is too high, wandering because a ground is loose, a few percent off because nobody calibrated it, or right on an Uno and wrong on an ESP32 because of how the ESP32 converts.

Five wrong numbers

When the number is wrong
What it reads
Zero means SIG is at GND, and R10 puts it there whenever nothing drives the divider. The usual cause is the minus side of what you measure not on the GND screw, so there is no loop. Then a wire clamped by its insulation. Then SIG on a different pin from the one the sketch reads.

Pick what the reading is doing. The ringed part of the board is where to look first, and the list beside it is the order to check in, by how often each one is the answer.

Always zero

Zero means SIG is at GND, and the bottom resistor puts it there whenever nothing drives the divider. The usual cause is the minus side of what you measure not on the GND screw: the block measures from GND, and without that wire there is no loop. It measures from GND is the whole story.

Then the terminal: a wire clamped by its insulation looks connected and is not. Then the sketch: SIG_PIN naming a different pin from the one SIG is on.

Stuck at the top

The input is above your board's limit, 25 V on an Uno, about 15.5 V on an ESP32, 16.5 V on a Pico, or the screws are on something you did not expect. Take the input off. If the reading stays at the top with nothing on the terminal, SIG is on a supply pin, not the analog pin.

Wanders

Check the header's GND wire first. Without it, the block's ground reaches your board only through the thing being measured, if at all, and the reading drifts. Then the screws, which should be tight enough that a tug on the wire moves nothing. What wander is left after that is the ADC's own, and averaging sixteen readings takes most of it out.

A few percent off

Steady and a percent or two out is the resistors' tolerance and your board's reference. Calibrating and averaging fixes it with one number. More than a few percent is a settings mistake: VREF or ADC_MAX set for a different board, or a missing * SCALE.

Right on an Uno, off on an ESP32

The ESP32's converter is not a straight line and does not read all the way to 3.3 V. A sketch that divides a raw count by 4095 is right in the middle and wrong near both ends. Use analogReadMilliVolts, or read_uv in MicroPython, and keep SIG on an ADC1 pin.

When it does not work

How can I test the block without any code?

With a multimeter and nothing else. Put a battery on the terminal and measure from the header's GND pin to SIG: it should read a fifth of the battery's voltage. With the battery off, measure from the + screw to GND: about 37.5 kΩ. Either one wrong means a wiring fault, not a sketch.

It reads well under what my multimeter says.

Something with resistance of its own is in series with the input: a terminal clamped on a few strands, or a source such as a sensor output that cannot supply the block's small current. The multimeter, which draws almost nothing, does not see the drop. A battery or supply straight onto the screws should read correctly.

It reads a small voltage with nothing on the terminal.

A few hundredths of a volt at the input is a count or two of ADC noise, times five. More than that with nothing connected means SIG is picking something up: check the header's GND is wired, then that SIG is on an analog pin, not beside a PWM output in the same cable.

Which ESP32 pins can I move SIG to?

Another ADC1 pin: pins 32 to 39 on a classic ESP32, pins 1 to 10 on an ESP32-S3. ADC2 pins stop working while Wi-Fi is on. Keep clear of the pins used for flash memory, which the ESP32 cannot give up at all.

Where this goes next

Forty-odd blocks, and several of them are sensors whose analog output your board can now turn into a number.

Back to the blocks

Edit this page — content/books/voltmeter/when-the-number-is-wrong.mdx

Community

Questions about this product

See what other owners have asked, and read their solutions.

Ask a question ↗

Voltmeter

Loading discussions…

Discuss this article

Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.

Browse Modules and blocks on the forum