An effective and long-lasting power supply is the backbone of any IoT device. Switch-mode power supplies (SMPSs) are undoubtedly good for powering IoT devices, but most of them are bulky and expensive. Fortunately, compact SMPS modules are available at an affordable price nowadays, and Hi-Link is a prominent maker of such modules under 5 W and less than $5. Hi-Link modules (also called HLK modules) are, in fact, PCB-mounted, encapsulated, and galvanically isolated switching AC/DC buck converter modules that take a 100- to 240-Vac input and deliver a constant 5- or 3.3-Vdc output.
Recently, I tore down an HLK module (HLK-PM01 AC/DC 5 V/3 W) just for hardware analysis. The inside of the module is filled with something that should be removed to access the inside electronics. This was not hard for me; I scratched away some stuff and removed the residue with acetone. The module reveals a simple but clever design centered around the AP8012 — an offline SMPS primary switcher chip from AiT Semiconductor Inc. The AP8012 combines a dedicated current mode PWM controller with a high-voltage power MOSFET on the same silicon chip. The bottom side of the circuit board has the mains switcher AP8012, the rectifier diode SS26, and the precision-voltage feedback/reference chip TL431. The top side of the circuit board holds other crucial components like the bridge rectifier, filter capacitors, chopper transformer, etc. Besides, there’s also a photocoupler as an isolated (optical) feedback element. Surprisingly, all electrolytic capacitors are rated 105°C; that’s fine as long as the module is not overloaded.
As you might have noticed, at the heart of most Wi-Fi IoT modules is the ESP8266 SoC from AI-Thinker, which runs at 3.3 Vdc. Although HLK is a great power supply module for IoT and DIY projects, especially because of its compact size and low cost, the 3.3-V version is not as easy to find compared to the 5-V (and 12-V) versions. So allow me to share how to make a very simple, yet reliable, 5-V to 3.3-V DC/DC buck power supply adapter for the 5-V HLK module. The key component is an AMS1117-3.3 LDO fixed-voltage regulator designed to automatically maintain a stable 3.3-V output voltage and output current up to 1 A. AMS1117-3.3 (in an SOT-223 package) supports input voltage range from 4.6 to 15 V and is protected against short-circuit and thermal overload conditions. Because ESP8266 and similar SoCs are very sensitive to an improper power supply, double decoupling capacitors are used at the output section of the following schematic to ensure better stability during different power conditions. Note that it’s good to try two or more different types and even different values of decoupling capacitors to bypass the power supply because some capacitors will be better than others for filtering out certain noise frequencies.
If you’re facing frequent reset issues with your Wi-Fi IoT module (especially ESP8266), make sure that the power supply is providing ample current to the IoT module. Based on my experience, another reason for the reset issue is the employment of cheap flash memory chips in copycat Wi-Fi IoT modules!
An improvement on the aforementioned idea is also available as an off-the-shelf power supply module from another maker, and most online electronics retailers would stock it. Just do a search with the key “IOT-AC53,” which is an 85- to 265-Vac to 5-V/3.3-V 3.5-W DC isolated dual-power-supply module.
The observed total power consumption of the HLK-PM01 module in idle state is about 150 mW, and there’s no problem running for two hours at a rated load with 230-Vac mains except that it got slightly hot. My trusty tools showed that the switcher works at around 60 KHz. The module performs well; I haven’t discovered any problems with it yet. That’s all for now!