Analog AC sine wave (centered around a DC offset, typically VCC/2). Operating Voltage (VCC): 5V DC. Output Current: Up to 2mA.
I can provide tailored code, wiring diagrams, or mathematical formulas for your specific setup. Share public link
| Component | Proteus Library | Notes | | --- | --- | --- | | ZMPT101B (simplified model) | – | Use a sine voltage source | | Arduino Uno | ARDUINO (from the Arduino library) | – | | Resistors, capacitors | RES, CAP | Only if you build the full sensor circuit | | Virtual Terminal | VIRTUAL TERMINAL | To view serial output from Arduino | | Analogue probes | – | For monitoring the signal |
Arduino Nano or Uno (or simulation-friendly microcontroller) Resistors and Capacitors (for conditioning circuit) Virtual Terminal/Display (for debugging) Circuit Setup Steps zmpt101b proteus library
Your target (e.g., 220V/50Hz or 110V/60Hz)?
#include // Optional: Use a filter library for easier RMS calculation const int sensorPin = A0; float testFrequency = 50.0; float windowLength = 40.0 / testFrequency; // Time window for sampling int rawValue = 0; float intercept = -0.04; // Calibration intercept float slope = 0.0405; // Calibration slope (adjust in simulation) float current_Volts; unsigned long prevMillis = 0; void setup() Serial.begin(9600); pinMode(sensorPin, INPUT); void loop() RunningStatistics inputStats; inputStats.setWindowSecs(windowLength); while((millis() - prevMillis) < 1000) // Sample for 1 second rawValue = analogRead(sensorPin); inputStats.input(rawValue); prevMillis = millis(); float rmsInput = inputStats.sigma(); current_Volts = (rmsInput * slope) + intercept; // Convert to AC RMS Volts Serial.print("Voltage RMS: "); Serial.println(current_Volts); Use code with caution. Troubleshooting Simulation Errors 1. "Simulation is not running in real-time"
Connect the pin directly to an analog input channel (e.g., pin A0) of your simulated microcontroller (like an Arduino Uno). 3. Monitoring Tools Analog AC sine wave (centered around a DC
The microcontroller must sample the analog wave, find the peak values, and calculate the Root Mean Square (RMS) voltage. Upload this optimized code into your Proteus Arduino block:
C:\ProgramData\Labcenter Electronics\Proteus 8 Professional\Data\LIBRARY
Connect the (Pin 0) of the Arduino to the TXD pin of the Virtual Terminal. Arduino Simulation Code I can provide tailored code, wiring diagrams, or
Connect the input side of the ZMPT101B to your AC source, usually involving a high-value limiting resistor (e.g., 2k-5k Ωcap omega , depending on input voltage).
ZMPT101BLibrary.IDX (contains the visual indexing for the component picker) How to Install the Library in Proteus
Open a new Proteus ISIS schematic capture window. Press the key on your keyboard to open the "Pick Devices" window and search for the following components: ZMPT101B: The newly installed module. ALTERNATOR: To simulate the 220V/50Hz mains supply.
Typical path for Proteus 8: C:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\Data\LIBRARY
Open a new schematic capture page in Proteus and press on your keyboard to open the Pick Devices window. Search for and select the following components: ZMPT101B: The newly added library module. ALTERNATOR: To act as the 220V AC mains source. ARDUINO UNO (or any preferred microcontroller library). VSOURCE / POWER: For the 5V DC supply. GROUND: For circuit referencing. OSCILLOSCOPE: To monitor the input and output waveforms. 2. Circuit Connections