Zmpt101b Proteus Library -
"Then simulate it," Kenji said sarcastically. "Oh, wait. You can't. Because Proteus doesn't have a ZMPT101B library."
"No," Elara smiled, rubbing her eyes. "We saved three more blown op-amps."
"We can't test the firmware on the ESP32 until the analog signal is clean," Elara argued, staring at a smoldering resistor.
Her team at AetherGrid Labs was designing a smart home energy monitor. The heart of their analog front end was the ZMPT101B, a precision voltage transformer capable of sensing mains AC (230V) down to a safe, measurable 0-5V signal. It was perfect: cheap, accurate, and galvanically isolated. zmpt101b proteus library
Kenji looked at the open Proteus file. He saw a ZMPT101B symbol he had never seen before, connected to an ESP32 model running actual Arduino code for RMS calculation.
The ZMPT101B_Proteus_Library.zip eventually made its way to a popular engineering forum. It wasn't pretty. It didn't have a fancy installer. But it worked.
It wasn't perfect. At voltages below 50V, the output was noisy. Above 250V, it clipped asymmetrically. She tweaked the SATURATION_COEFF variable in the code. Recompiled. Reloaded. Ran again. This time, the wave was clean from 10V to 300V. She had done it. "Then simulate it," Kenji said sarcastically
"Run the simulation," she said.
"Elara?"
She hit "Play."
"Is that... a library?"
She named her project ZMPT101B_MODEL . The code was brutal. She had to define the pinout: VCC, GND, OUT, and AC_IN. The core logic was a time-stepping function that read the differential input voltage, calculated the primary current, transformed it magnetically (including a 1-degree phase lag she learned from the datasheet), and then fed it into a virtual op-amp model with a gain of 5 and an offset of 2.5V.
There was just one problem. Simulation.
Dr. Elara Vance was losing her mind. Or rather, her oscilloscope was losing its magic smoke—again.
She jerked awake. "It's done," she croaked, pointing to her screen.