: [ V_out = V_in \times \fracR_2R_1 + R_2 ] For 25V→5V, choose ( R_1 = 20k\Omega, R_2 = 5k\Omega ).

void loop() int adcValue = analogRead(A0); float voltageAtSensor = (adcValue / 1023.0) * 5.0; float actualVoltage = voltageAtSensor * (25.0 / 5.0); // Scaling factor Serial.print("Measured Voltage: "); Serial.println(actualVoltage); delay(1000);

void setup() Serial.begin(9600);

Here’s a complete write-up on creating and using a (specifically for modules like the ZMPT101B AC voltage sensor or DC voltage sensor modules like 0-25V, 0-35V). This write-up assumes you’re building a custom Proteus library because Proteus doesn’t include these sensors by default. Complete Write-up: Voltage Sensor Library for Proteus 1. Introduction Voltage sensors are essential for monitoring electrical parameters in embedded systems. In simulation environments like Proteus, having accurate models of voltage sensors allows engineers to test ADC reading, signal conditioning, and microcontroller code before hardware implementation.