The ZMPT101B Proteus Library allows you to simulate AC voltage measurement in a virtual environment before building physical hardware. It models the ZMPT101B AC voltage sensor module, which is typically used for measuring voltages up to 250V AC with an analog output signal. 🛠️ How to Add ZMPT101B Library to Proteus
Since Proteus does not include this sensor by default, you must manually add the external library files to the software's directory.
Download the Files: Search for "ZMPT101B Proteus Library" and download the compressed folder (usually containing .LIB and .IDX files). Locate Proteus Library Folder:
Proteus 8 and above: C:\ProgramData\Labcenter Electronics\Proteus 8 Professional\LIBRARY (Note: ProgramData is often a hidden folder).
Proteus 7: C:\Program Files (x86)\Labcenter Electronics\Proteus 7 Professional\LIBRARY.
Copy and Paste: Copy the downloaded .LIB and .IDX files and paste them into the identified LIBRARY folder.
Restart Proteus: Close and reopen the software to refresh the component list. zmpt101b proteus library
Search for Component: Open "Pick Devices" (keyboard shortcut P) and search for "ZMPT101B" or "Voltage Sensor". 🔌 Pin Configuration in Proteus
When you place the ZMPT101B model in your schematic, it generally features two sets of pins to represent the high-voltage input and low-voltage output:
AC Input Side: Connects to the AC source (e.g., a VSINE component in Proteus) to simulate mains power. VCC: Connects to a +5V DC power source. GND: Connects to the common ground of your DC circuit.
OUT: Provides an analog sine wave output centered at approximately 2.5V. This pin connects to an Arduino's analog pin (e.g., A0) for processing. 📝 Simulation and Code Integration
ZMPT101B 250V AC Voltage Sensor with Arduino, Voltage Monitoring
The real-world ZMPT101B outputs an AC signal riding on a DC offset (2.5V). To calculate RMS voltage in simulation, use this code: The ZMPT101B Proteus Library allows you to simulate
#include <LiquidCrystal.h>LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
int sensorPin = A0; float offset = 2.5; // Simulated offset (2.5V) float sensitivity = 0.185; // Simulated sensitivity (adjust this) float vRMS; float sum = 0;
void setup() lcd.begin(16, 2); lcd.print("AC Voltmeter"); delay(2000); lcd.clear();
void loop() sum = 0; // Sample 1000 points for accurate RMS for (int i = 0; i < 1000; i++) float sample = analogRead(sensorPin) * (5.0 / 1023.0); float vMains = (sample - offset) / sensitivity; sum += sq(vMains); delayMicroseconds(100); // Simulate 10kHz sampling
vRMS = sqrt(sum / 1000);
lcd.setCursor(0, 0); lcd.print("Mains Voltage:"); lcd.setCursor(0, 1); lcd.print(vRMS); lcd.print(" V "); // Clear extra digits void loop() sum = 0; // Sample 1000
delay(500);
What exactly are you placing on your schematic? A good ZMPT101B Proteus library includes:
| Pin Name | Description | In Simulation | | :--- | :--- | :--- | | VCC | Power supply (5V DC) | Connects to your virtual DC source. | | GND | Ground | Common ground with MCU. | | OUT | Analog output (0-5V AC signal) | Connects to ADC pin of virtual Arduino/ PIC. | | AC_L / AC_N | Mains input (High voltage) | Connects to a sine wave generator (e.g., 220V, 50Hz). |
Important: The library model is an idealized version. It assumes perfect linearity. In real life, you often need to calibrate the potentiometer. In the simulation, you can adjust the "Gain" parameter in the component properties.
C:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\LIBRARYAppData – check your installation).ZMPT101B.IDX and ZMPT101B.LIB into the LIBRARY folder.