What (Arduino, PIC, ESP32) you are using for the simulation. Whether your target grid voltage is 110V/60Hz or 220V/50Hz .
To use a pre-made ZMPT101B visual module in Proteus, you need to download third-party library files. These are widely available on electronics community blogs and GitHub repositories. Step 1: Download the Library Files
Several academic and hobbyist projects have used Proteus for exactly this purpose. One notable example is an automatic power factor correction circuit, where the entire design (including the ZMPT101B voltage sensor, an ACS712 current sensor, an Arduino Uno, and relay switching) was simulated in Proteus before implementation. zmpt101b proteus library
Comprehensive Guide to Using ZMPT101B in Proteus Simulation (ZMPT101B Proteus Library) The Go to product viewer dialog for this item.
If searching "ZMPT101B" yields no results, double-check that the .IDX and .LIB files are in the correct directory and that you restarted Proteus as an Administrator. What (Arduino, PIC, ESP32) you are using for the simulation
Because Labcenter Proteus does not include the ZMPT101B in its native library repository, you must download a third-party library block (typically created by engineering communities like The Engineering Projects or GitHub contributors). Step 1: Download the Library Files
const int sensorPin = A0; // ZMPT101B OUT connected to A0 const float vCC = 5.0; // ADC reference voltage const float calibrationFactor = 42.5; // Adjust to match input RMS in simulation void setup() Serial.begin(9600); void loop() unsigned long startTime = millis(); float maxCurrent = 0; float minCurrent = 1023; float sampleVoltage = 0; float sumOfSquares = 0; long sampleCount = 0; // Sample the AC wave for 20 milliseconds (one full 50Hz cycle) while (millis() - startTime < 20) int rawValue = analogRead(sensorPin); // Convert raw ADC to voltage centered around VCC/2 offset float voltage = ((rawValue * vCC) / 1023.0) - (vCC / 2.0); sumOfSquares += sq(voltage); sampleCount++; // Calculate Mean Square and Root Mean Square (RMS) float meanSquare = sumOfSquares / sampleCount; float rmsVoltageOutput = sqrt(meanSquare); // Scale the output to reflect the actual primary AC Mains voltage float finalACVoltage = rmsVoltageOutput * calibrationFactor; Serial.print("Simulated AC RMS Voltage: "); Serial.print(finalACVoltage); Serial.println(" V"); delay(1000); Use code with caution. Troubleshooting Common Simulation Issues These are widely available on electronics community blogs
Search and select the following parts from the Proteus library: Represents the 220V AC mains source.
Because Proteus does not include this specific module in its standard built-in libraries, users must install a custom library to simulate it. This write-up covers the sensor, the importance of the library, how to install it, and how to use it effectively in your simulations.
To help you further with your simulation, please let me know: Which are you currently running?