Arduino Analog Voltage Calculator (analogRead)
NOVOArduino analog voltage calculator: convert analogRead() values to volts and back for 10/12-bit boards, any AREF, with voltage-divider input and code.
Funciona 100% no seu navegador — o que você insere nunca é enviado nem armazenado nos nossos servidores.
Esta ferramenta ainda não está totalmente traduzida, por isso parte do texto continua em inglês. A ferramenta funciona da mesma forma em todos os idiomas.
DEFAULT: AVCC (≈ the 5 V supply — USB power is often 4.6–5.1 V).
Vpin = raw × Vref / 1024 = 512 × 5 / 1024 = 2.5 V
Arduino code
const float VREF = 5.0; // volts — measure it for best accuracy
void setup() {
Serial.begin(9600);
}
void loop() {
int raw = analogRead(A0);
float vPin = raw * VREF / 1024.0;
Serial.print(raw);
Serial.print('\t');
Serial.println(vPin, 3);
delay(500);
}Board data: ATmega328P, 10-bit ADC, 5 V logic. Real readings also include reference tolerance, offset and noise of a few LSB — verify against the datasheet for your exact board.
Exemplos rápidos
Entradas típicas e os resultados que esta ferramenta gera.
Visão geral
analogRead() returns a number, not a voltage. To turn it into volts you need the ADC resolution of your board (10-bit on the Uno, Nano and Mega, 12-bit on ESP32, Due and Pico) and the reference voltage the ADC compares against — the 5 V supply, an internal 1.1 V or 2.56 V reference, or whatever you feed into AREF.
This Arduino analog voltage calculator converts a raw reading to the pin voltage and back, shows the size of one LSB and the full-scale range, and supports both the datasheet formula (divide by 1024) and the common sketch formula (divide by 1023). Add a resistor divider to measure batteries or 12 V rails: the tool computes the real input voltage, the divider current and warns when the pin would exceed the reference or the logic supply. Board data comes from the MCU datasheets and runs entirely in your browser.
Por que usar esta ferramenta?
- Board presets for Uno, Mega, Leonardo, ESP32, Pico and more
- Raw → volts and volts → raw in one place
- Voltage divider math with over-voltage warnings
- Ready-to-paste analogRead() sketch
- Free and private, runs in your browser
Recursos
Board & reference presets
Pick the board and analogReference() option; custom or EXTERNAL AREF voltages are supported.
Two directions
Convert a raw reading to volts, or find the reading you should expect for a voltage.
Resolution per LSB
Shows one LSB and full scale for 8- to 14-bit resolution where analogReadResolution() exists.
Voltage divider input
Enter R1 and R2 with values like 10k or 4k7 to compute Vin, current and resistor power.
Safety warnings
Warns when the pin voltage saturates the ADC or exceeds the board’s logic supply.
Code snippet
Copy a sketch with analogReference(), analogReadResolution() and the conversion formula.
Como usar
Choose board and reference
Select your board, the AREF option and the resolution.
Pick a direction
Use Raw → voltage or Voltage → raw and type the value.
Add a divider if needed
Tick the divider option and enter R1 (top) and R2 (bottom).
Copy the code
Check the formula and warnings, then copy the generated sketch.