
HLK-PM01 AC-DC Module Library for Proteus Simulation

Hello friends, I hope you all are doing great. Today, I am going to share the new HLK-PM01 AC-DC Module Library for Proteus Simulation. The HLK-PM01 is the little white block that turns a project into a mains-powered gadget: 230 V AC on two pins, an isolated 5 V on the other two, up to 3 W - enough for an ESP32, a relay and a few LEDs inside a wall switch or a smart plug. With this library you can run a full Proteus simulation of that module, from the mains side with its peaky input current and its bulk capacitor to the regulated 5 V output and its efficiency.
HLK-PM01 AC-DC Module Library for Proteus
Latest version: V1.0 (November 2026, this tutorial)
Helping Tools
- Serial Monitor Advance: a serial terminal window for the UART of your board
- Serial Monitor Expert: the serial monitor with extra debugging tools
- LCD Library for Proteus V3.0: 16x2, 20x4 and I2C LCDs to show your readings
The demo powers a 5 V rail from 230 V 50 Hz and lets an Arduino measure the rail while it switches two loads, so you can watch both sides of the module at once.
NOTICE: Our team has put a lot of effort into these small parts: the bodies, the animation and the pop-ups are all our own design, and you get them free. Your feedback is the fuel that keeps us going, so please tell us what you think in the comments below or in the motor driver board of our forum. And if our free libraries help you, you can buy us a coffee. So, let's get started with the HLK-PM01 AC-DC Module Library for Proteus Simulation:
What Is the HLK-PM01 AC-DC Module?
The HLK-PM01 is a complete mains power supply potted in a 34 x 20 x 15 mm case. Inside are a fuse resistor, a bridge rectifier, a small high-voltage capacitor, a flyback converter with its transformer - which provides the isolation - and the regulation. It takes 100 - 240 V AC (90 - 264 V at the extremes) or 120 - 370 V DC and gives 5 V at up to 600 mA. Many similar modules exist for 3.3 V and 12 V outputs; this library models the 5 V, 3 W one.
| HLK-PM01 AC-DC module | |
|---|---|
| Input | 100 - 240 V AC 50 / 60 Hz, or 120 - 370 V DC |
| Output | 5 V, 600 mA (3 W), isolated |
| Efficiency | about 70 % at full load |
| Size | 34 x 20 x 15 mm, four pins |
| Pins | AC, AC / -Vo, +Vo |
| Uses | smart plugs, wall switches, sensors and controllers on the mains |
Why the Input Current Comes in Peaks
Behind the AC pins sits a bridge rectifier and a bulk capacitor of a few microfarads. The capacitor holds a voltage close to the mains peak - about 325 V on 230 V mains - and the converter runs from it. The bridge can only conduct while the mains voltage is higher than the capacitor's, which happens only near the top of each half cycle. So the module takes its whole input current in short, tall pulses rather than as a sine wave. That is why its power factor is low - 0.3 to 0.5 depending on the load: the RMS current is two to three times what the real power alone would need. One module does not matter; a hundred of them on one circuit do.
Hold-Up Time
The same capacitor keeps the output alive for a moment when the mains disappears. It discharges from the peak voltage down to the point where the converter can no longer run - the hold-up time. At light load that is a fraction of a second; at full load a few tens of milliseconds. Enough for a microcontroller to notice the falling input and save its state, if it is quick.
Isolation
The output is isolated from the mains by the flyback transformer: -Vo is not connected to either AC pin. That is what makes it safe to touch the 5 V side - as long as the circuit board keeps a proper distance between the two sides. The isolation protects against shocks; it does not make the AC side less dangerous.
The Module in the Simulation
The model follows the physics of the input stage. Between the two AC pins it is a bridge into a 4.7 uF capacitor behind 15 ohm: current flows only while the mains is above the capacitor's voltage, and each simulation step charges the capacitor consistently with that current (its companion model is part of the stamp). The capacitor feeds the converter's power - the output power plus its losses - so its voltage ripples and the input current comes in peaks exactly as on a real module. The output is 5.00 V behind 0.08 ohm between +Vo and -Vo, nothing at all is stamped between the two sides, the converter runs while the capacitor is above 90 V, and over 0.9 A the output goes into hiccup. The pop-up measures the mains' RMS voltage and current, the real power and the power factor over each 20 ms.
Features of the HLK-PM01 AC-DC Module Library for Proteus Simulation
- A real-looking module: the 34 x 20 mm white case at its real size with its print; it warms in colour with its losses.
- A real mains input: the bridge and the bulk capacitor, the peaky input current, the power factor and the ripple.
- A real output: a regulated, isolated 5 V with a 600 mA rating and a hiccup current limit.
- The numbers that matter: RMS voltage and current, real power, power factor, efficiency, hold-up time.
- A pop-up: the mains voltage, the input current and the bulk capacitor over 40 ms, eight tiles - graphs, an event log and a check page.
- A complete package: about 2.2 MB with the library, our IRLZ44N MOSFET, resistors and power resistors, our Arduino UNO V4.0 and the demo, without the source code of the model.
The HLK-PM01 in Proteus
The device is HLKPM01TEP in TEPHLKPM01.LIB, under Modules > Power, with the prefix U and the model TEPHLKPM01.DLL. Search HLK-PM01, AC-DC or power module in Pick Devices. On the left are the two mains pins, AC1 and AC2; on the right +VO and -VO. The module has no properties - like the real one, it has nothing to adjust.
Download HLK-PM01 AC-DC Module Library for Proteus Simulation
Click the button below to download HLK-PM01-AC-DC-Module-Library-for-Proteus-v1.0.zip (about 2.2 MB, without the source code of the models):
HLK-PM01 AC-DC Module Library for Proteus V1.0- README.txt: installation, the demo, the wiring, troubleshooting and the limits of the simulation.
- Proteus Library Files:
TEPHLKPM01.LIB,TEPNMOS.LIB,TEPRESISTOR.LIB,TEPPOWERRES.LIBandArduinoV4TEP.LIB. - Proteus Model Files:
TEPHLKPM01.DLL,TEPNMOS.DLL,TEPRESISTOR.DLL,TEPPOWERRES.DLLandTEPARDUINO.DLL. - Arduino Code: the demo sketch (no library).
- Proteus Simulation: the demo project, its HEX file and copies of the DLLs.
No Proteus yet? Read How to Download and Install Proteus 7 and 8. New to libraries? Follow How to Install a New Library in Proteus.
How to Install HLK-PM01 AC-DC Module Library for Proteus Simulation
- Close Proteus and extract the whole zip file, for example to your Desktop.
- Copy the files from Proteus Library Files into the LIBRARY folder of Proteus.
- Copy the files from Proteus Model Files into the MODELS folder.
- Delete
TEPHLKPM01.IDXfrom the LIBRARY folder if it is there. - Start Proteus, press P and search for HLK-PM01.
Proteus Simulation of a Mains-Powered 5 V Rail
The demo uses an A4 sheet with Proteus's own ALTERNATOR as the mains - 325 V peak, which is 230 V RMS, at 50 Hz, its minus as the earthed neutral - the HLK-PM01 U1, and its 5 V output feeding a divider to A0 of our Arduino UNO Library for Proteus V4.0 and two 22 ohm loads, each switched by our IRLZ44N from the N-MOSFET Library for Proteus on D7 and D8. In the simulation the neutral and the 5 V side's ground share the sheet's ground; the model itself keeps the two sides apart. The Arduino's monitor is built in, the same window as our TEP Serial Monitor Advance for Proteus. Open HLK-PM01-230V-to-5V-ArduinoUnoV4.pdsprj.
The Sketch
The sketch needs no library. Each step switches on none, one or both loads, waits, and reads the rail through the 10 kohm / 10 kohm divider:
setLoad(n);
delay(1200);
float rail = readVolts(A0, RAIL_K);
The current comes from Ohm's law on the loads:
float amps = n * rail / LOAD_OHMS; // the loads' current
HLK-PM01 Simulation Results
Open the project and press Run. The demo runs 5.0 simulated seconds and took about two minutes on our PC with the pop-up open and the pictures being taken - the 50 Hz input needs small time steps. Click the module for its pop-up. Every number below comes from one simulation run, the demo exactly as it ships.
No Load
Within the first millisecond the bulk capacitor passes 98 V on the rising mains and the converter starts. With no load the capacitor sits at 324 V, just under the 325 V peak: the module takes only 0.08 W from the mains - its own losses - at 230 V RMS, 50 Hz and 1 mA RMS. The power factor is 0.29: the little current there is comes in thin spikes. The output holds 5.000 V, and with so little drawn from the capacitor, the hold-up tile says it would keep the output alive for nearly three seconds after the mains disappeared.
One Load
At 1.5 s the first 22 ohm load comes on: 0.227 A at 4.982 V, 1.13 W out. The module now takes 1.57 W from the mains - 72 % efficient - and the input current, 0.018 A RMS, flows in sharp pulses near each peak of the mains, once on the positive half cycle and once on the negative. The power factor rises to 0.39 as the pulses grow wider. The capacitor now drops a little between the peaks, and the hold-up time falls to about 150 ms.
Both Loads
With both loads the output gives 0.451 A at 4.964 V, 2.24 W - 75 % of the module's 3 W. The mains supplies 3.15 W at 0.031 A RMS, a power factor of 0.44, and the efficiency is 71 %: 0.91 W turns into heat inside the case. The bulk capacitor now swings by 18 V between the peaks and sits at 314 V on average - the red line in the pop-up sags visibly between the pulses of orange current - and the hold-up time is down to 71 ms. That is the classic picture of a capacitor-input supply, drawn by the simulation itself.
The Graphs, the Event Log and the Check Page
The Graphs page plots the input current, the bulk capacitor, the output voltage and the output current. The Event log records the start. The Check page sums up the run: the mains at 229 V RMS and 325 V peak, the bulk capacitor and its hold-up, the output with 0.451 A the most against its 600 mA rating, and the module's own 0.08 W with no load. The 13.2 W "the most" is the very first 20 ms: the inrush that charges the empty bulk capacitor at switch-on - the reason the module has a fuse resistor in front of its bridge.
The Arduino measures the rail at each step: 5.00 V with no load, 4.99 V at 0.227 A and 4.97 V at 0.451 A - the module's 0.08 ohm of output resistance - and prints 1.13 and 2.24 W.
Module or Step-Down Converter?
If your project already has a 12 V or 24 V supply, a DC-DC converter like our LM2596 Buck Converter Library for Proteus is the efficient way to 5 V. The HLK-PM01 is for when the mains is the only supply: it replaces a plug-in adapter and fits inside the enclosure. Its 70 % efficiency and its low power factor are the price of that convenience - fine for a few watts, a reason to choose a bigger supply beyond that.
Try It Yourself
- Change the ALTERNATOR to 170 V peak (120 V RMS, 60 Hz): the output stays at 5 V, the input current rises.
- Lower it to 80 V peak: the bulk capacitor no longer reaches 90 V and the module does not start.
- Add a 6.8 ohm load (0.74 A): over the 600 mA rating - the pop-up warns; at 5 ohm (1 A) the output goes into hiccup.
- Feed it 300 V DC instead of AC: the bridge conducts all the time and the input current is smooth.
- Watch the hold-up tile at each load: the more power, the shorter the hold-up.
Ideas to Extend the Demo
- A smart plug: an ESP32 and a relay powered from the module.
- A mains-loss detector: the Arduino watches the rail and saves its data before the hold-up runs out.
- An energy meter with a current sensor on the load side.
Your Own Sketches
The demo sketch is in the zip file, and you can change it in the Arduino IDE. New to Arduino? Start with our Arduino Tutorial for Beginners. Export the compiled binary, and set the UNO's PROGRAM property to the new file. Our guide on How to get the HEX file from Arduino shows you where the file ends up.
Things to Know Before Using a Real HLK-PM01
- Mains is dangerous: work on the AC side only unplugged, fuse the input, and keep 6 mm between the AC and the 5 V side.
- Isolation: the output is isolated, but only if the wiring and the board keep the mains away from it.
- Power: 3 W - a microcontroller, a relay coil and LEDs; not a motor or a heater.
- Heat: at full load the case gets warm - give it some air in a closed box.
- Noise: add a capacitor on the 5 V side close to your circuit.
Troubleshooting
- No output: the mains missing or too low, or the output overloaded (HICCUP).
- The 5 V rail sags: the load is over 600 mA.
- The simulation is slow: the 50 Hz input needs 100 us steps - that is normal.
- A real module whines or gets hot: it is overloaded or poorly ventilated.
- The part is not simulated:
TEPHLKPM01.DLLis missing from MODELS and from the project folder.
Limitations of the Simulation
- The input bridge and bulk capacitor, the regulated output, the hiccup limit and the efficiency follow the class's data and its circuit; the module is our own drawing.
- Our own figures: 15 ohm in front of the bridge, 4.7 uF, 0.08 ohm out, the loss fit (70 % at 3 W), 25 K/W for the case.
- Not modelled: the flyback's switching and its noise, the output ripple's shape, the isolation breaking down.
- Arduino is a name of Arduino; this library is not made or endorsed by Arduino, Labcenter or the module's maker.
- Tested in Proteus 8.5 in November 2026 (the demo as shipped). Proteus 7 is not supported.
So, that was all about the HLK-PM01 AC-DC Module Library for Proteus Simulation. I hope it helps you plan your next mains-powered gadget - the load, the efficiency and the safety distances - before the first real module is plugged in. If you have any questions, ask in the comments and I will help you out. Till the next tutorial, take care and have fun!






















Comments
0