Electrical – What could be the issue with energy monitoring IC (HLW8012) and the non-isolated power supply

power supplyswitch-mode-power-supply

This circuit works fine when I replace the 220v power supply with a cheap power supply(I assume they are isolated) from aliexpress. However, when I use my own power supply(schematic below), it causes the 0R resistor, fusible resistor, AMS1117 IC and HLW8012 IC to blow out with smoke.
my power supply circuit is also working fine under load when not connected to power monitoring circuit.
I think there is something wrong with my GND but I don't know how to solve it.
Chinese datasheet for HLW8012 can be found here and some english info about it here
enter image description here

Best Answer

Yes you will have a ground issue with this circuit. The problem is that the GND of your circuit is a local ground. That means local to your circuit. If your circuit is powered on then the GND in your circuit will be at roughly half of the mains voltage.

That means that if you connect this circuit to a PC, it's case would become live at half mains voltage. That is extremely dangerous and that's why PC cases are (or should be) grounded via the mains earth connecttion. This means that the PC's mains earth connection will short your circuit's ground to mains earth. Your power supply circuit is not designed to handle that so it blows up.

You really need to study the subject of mains isolation, why it is needed (safety) and how it is done (transformer, opto couplers, wireless).

Then browse the internet for similar (mains power monitoring) projects to learn how it is done. You will find that monitoring mains current directly via a shunt resistor is always a challenge. It is much easier to use a current transformer or a Hall sensor based module as these already provide mains isolation so they're much easier to use.

Related Topic