Zmpt101b Library For Proteus (PREMIUM)

Double-click the alternator to edit its properties. Set the Amplitude to (which yields ~220V RMS) or 170V (for ~120V RMS), and set the Frequency to 50Hz or 60Hz based on your regional grid standards.

What you are currently running (7, 8.x, etc.)? Which microcontroller you intend to link with the sensor?

This confirms your library works perfectly.

Despite the widespread use of the ZMPT101B in physical projects, there is no official or standard "ZMPT101B library" for the Proteus simulation software. This is a common situation for many newer or more specialized components. zmpt101b library for proteus

void loop() float voltage = voltageSensor.getRmsVoltage(); Serial.println(voltage); delay(1000);

In Proteus, you can interface the ZMPT101B with an Arduino Uno library to visualize waveforms and calculate RMS values.

// Sample over one or more AC cycles for (int i = 0; i < samples; i++) readValue = analogRead(sensorPin); // Convert ADC reading to voltage (0-5V) sensorValue = (readValue / 1024.0) * 5.0; // Subtract the DC offset (VCC/2 = 2.5V) sensorValue = sensorValue - 2.5; sumSquared = sumSquared + (sensorValue * sensorValue); // Simple delay to achieve a 50Hz sampling rate // For 50Hz, 1000ms/50Hz = 20ms per cycle, for 400 samples, each sample takes 20ms/400 = 50µs // The analogRead() function itself takes ~100µs, so adjust as needed delayMicroseconds(250); Double-click the alternator to edit its properties

By following this guide, you can successfully implement the ZMPT101B library into Proteus, allowing you to debug your code and circuit configurations safely before handling live mains electricity.

Tip: The ProgramData folder is hidden by default in Windows. Enable "Hidden items" in the View tab of Windows File Explorer to access it. Step 3: Copy and Paste the Files Close Proteus if it is currently running. Copy both the .IDX and .LIB files you downloaded.

To configure the ZMPT101B component, follow these steps: Which microcontroller you intend to link with the sensor

(typically a ZIP or RAR file) from reputable engineering community sites like The Engineering Projects Locate Proteus Directories : Find where your Proteus software is installed, usually in

Place a terminal and connect it to the GND pin of the ZMPT101B. 3. Monitoring the Output

If your simulation produces incorrect voltage readings:

Open Proteus, hit the key to open the pick device window, and search for: ZMPT101B: The newly installed sensor module. ARDUINO UNO: Or your preferred microcontroller. ALTERNATOR: To simulate the 220V/50Hz AC source. VTERM: Virtual Terminal to display serial monitor outputs.