Source: https://mokxi.com/parts/voltagesensor
Updated: 2026-11-16

Part

# Voltage sensor, 0 to 25 V

A 30 k and 7.5 k divider on a red board: S is a fifth of the voltage on the screw terminal, so 25 V reads 5 V.

See every part

- 5 pins
- In 1 project
- In 1 lesson

Drawn live by the editor's own code, at the size you see it.

At a glance

## The Voltage sensor, 0 to 25 V in brief

What it is, and where it sits on the bench.

The 0 to 25 V voltage sensor is the small red kit board with a screw terminal, VCC and GND for the voltage to measure, and a header of S, + and -. There is no chip: 30 k from VCC to S and 7.5 k from S to GND make S a fifth of the input, and the header’s + is not connected to anything. Wire S to A0 and - to the board’s GND. On an Uno 5 V at S is the 25 V of the listing; on an ESP32 the 3.3 V converter tops out at 16.5 V. Mokxi puts the two resistors really in the circuit, so the source sees 37.5 k of load and one with a few kilohms behind it reads low, as on a bench. An Uno’s 10-bit step is 24.4 mV on the terminal, and 12 V reads as 491 counts. The terminal’s GND and the header’s - are one trace, so the measured circuit shares the Arduino’s ground. The classic mistake is putting the voltage on the header’s +, which goes nowhere. Resistor tolerance, power rating, the clamping above 25 V and any isolation are not modeled.

Family

Sensors

Pins

5

Pins

## 5 pins

Named as the editor names them, so a wire lands where you expect it.

Pin

What it does

VCC

Screw terminal: the plus of the voltage to measure.

GND

Screw terminal: the minus of the voltage to measure.

S

The divider's middle, a fifth of the input. To an analog pin.

+

Not connected on the board.

The same trace as the terminal's GND. To the Arduino's GND.

How to use it

## How to use the 0-25 V voltage sensor with an Arduino

The voltage to measure goes in the screw terminal, plus on VCC and minus on GND. On the header, S goes to A0 and minus to the Uno’s GND; the header’s plus is not connected to anything. The terminal’s GND and the header’s minus are one trace, so wiring minus to the Uno also grounds the measured circuit.

The board is a 30 k and 7.5 k divider, so S is a fifth of the input: read A0, scale to volts and multiply by 5. 12 V reads as 491 counts, and one count is 24.4 mV on the terminal. The example averages 16 readings and shows the bench supply’s voltage on an I2C LCD; press the supply’s buttons and the reading follows.

Part pin

Board pin

VCC

Supply V+

GND

Supply V-

S

A0

GND

On an ESP32 or any 3.3 V board the same module reads at most 3.3 x 5 = 16.5 V, not 25, and a 12-bit reading scales as raw * 3.3 / 4095 before the times 5.

Click to open it in the editor

This is the simulator itself, running here. Click anything to open it in the editor.

Open this project in the editor Read the full tutorial

Volts from the divider, from the DC voltmeter

How it is modeled

## What is true about the Voltage sensor, 0 to 25 V, here

In its help article’s own words: what the simulation gets right, and where it stops.

### Modeled

There is no datasheet for this board; the numbers are the ones every listing and
tutorial gives (for example the components101 "Voltage Sensor Module" page):

The ratio. 30 k and 7.5 k make S = VIN / 5. 12 V on the terminal is 2.4 V on
S, which an Uno reads as 491.

The 25 V limit is the ADC's. On a 5 V Uno, S can go up to 5 V, which is 25 V
on the terminal. On a 3.3 V board (an ESP32, a Pico, an Arduino Due) the same board
reads at most 3.3 x 5 = 16.5 V. The resistors do not change.

The resolution. One step of a 5 V, 10-bit converter is 4.9 mV at S, so 24.4 mV
on the terminal. 9 V reads as 8.99 V on an Uno, and that is the converter, not the
board.

The shared ground. The terminal's GND and the header's - are one trace, so
wiring - to the Arduino puts the measured circuit's minus on the Arduino's ground.
That is how a bench supply's minus gets to ground in the DC voltmeter template.

### Not modeled

The resistors' tolerance (1% or 5% on real boards; here the ratio is exactly 5, so a
real board may need a calibration factor), their power rating, and what happens past
25 V on a 5 V board: on a real one S goes over the converter's supply and the
microcontroller's input protection diode conducts through the 30 kohm. Nothing on the
board isolates the measured circuit, so it cannot measure mains or anything that must
not share a ground with the Arduino.

From Voltage sensor module, in full.

Projects

## See the Voltage sensor, 0 to 25 V in a project

One built-in project uses it. It opens in the editor, already wired.

Lessons

## Where it turns up in a lesson

One lesson places it in its own circuit.

### Learn articles

1 lesson

- Arduino 0-25 V Voltage Sensor: Wiring and Code

Boards

## The boards it is shown on

This board has a built-in project with the Voltage sensor, 0 to 25 V in it.

- Arduino Uno R3

More parts

## The rest of the bench

Every one of these is drawn and simulated the same way.

Full-size breadboard

A real 0.1 inch grid with the rails and the center channel, 63 columns wide.

Jumper wires

Drag from any pin or hole to any other. Corners snap, and you can drag them.

Power

A supply rail at the voltage you choose.

Ground

The other end of every circuit.

LED

Lights when current flows. Five colors, and the brightness is what your eye would see.

Filament lamp

A tungsten bulb in a holder: an inrush when it is switched on cold, tens of milliseconds to warm up, and dim on half its voltage.

Resistor

Any value you like, with the color bands drawn to match.

ESP32-C3-DevKitM-1

A RISC-V board that runs your firmware at 160 MHz on the real memory map.

Pushbutton

A 12 mm tactile switch. Hold it while the simulation runs.

Raspberry Pi Pico

The RP2040 board on our own Cortex-M0+ core. Pick a program and press Run.

Raspberry Pi Pico W

Raspberry Pi Pico W (RP2040). The same board and the same pinout as a Pico, with the CYW43439 on it. The WiFi is simulated (no radio; real internet through the Cloud panel’s switch), and the on-board LED, which hangs off that chip rather than off GP25, is driven through the same path. Everything else is the Pico.

Raspberry Pi 4 Model B

Raspberry Pi 4 Model B: the 40-pin header, driven by main.py with RPi.GPIO or gpiozero.

See every part

## Wire up the Voltage sensor, 0 to 25 V

Open the editor and push it into the breadboard. It is free, and it runs on your own machine.

Start building free Open the editor
