ohmio

Circuits / Sensors

Arduino UNO: voltmeter with a voltage sensor module

The module is a 30 kΩ and 7.5 kΩ divider: S carries a fifth of the voltage at its terminal, so a 25 V input still fits the 5 V ADC, and the program multiplies the reading by five

Arduino UNO: voltmeter with a voltage sensor module, simulated on a breadboard

Tap a part to see its voltages and currents. It is a model, not a measurement.

What do you need?

The AliExpress links are affiliate links: if you buy through them ohmio.dev gets a commission, at no extra cost to you. Affiliate links

This page is a guide: the numbers come from a simulation, and real parts vary. Check your parts before you power the circuit. Safety and responsibility

How does an Arduino measure a voltage above 5 V?

The Arduino's analog input accepts 0 to 5 V, so a bigger voltage has to be shrunk first. The voltage sensor module is a divider of 30 kΩ and 7.5 kΩ: pin S carries one fifth of the voltage at VIN. At 9 V, S is 1.80 V and analogRead gives 369. At 25 V, S reaches 5.00 V and the reading is 1023, the top of the scale, which is why 25 V is the limit. The program undoes both steps: reading × 5.0 / 1023.0 gives the volts at A0, and multiplying by five gives the input's. With 9 V the serial monitor shows 9.02, and with 12 V it shows 12.02. Each step of the converter is about 0.024 V at the input, so the last digit is not exact. Connect the ground of the source to the Arduino's ground, and never go above 25 V.

Values from the Protoboard ISO simulation: a model, not a bench measurement.