The leakage principle,characteristics and protection device installation position of the charging system with charging piles are analyzed,and a design scheme of B-type residual current protector for charging pile is proposed to detect the residual current through dual magnetic core and the corresponding topology.The mechanism of realizing the trip of the residual current type corresponding to different topologies is analyzed.Magnetic modulation technology is used to detect the DC residual current.For other types of residual current,a current detection scheme of direct rectification without waveform recognition is proposed.According to the current types detected by different topological structures,is proposed a method of selecting the material with flat hysteresis loop and high permeability for the upper core,and the amorphous or nanocrystalline material with high remanence for the lower core.The DC residual current is measured by Multisim simulation software,and the results show that the magnetic modulation technology based on high remanence material can reflect DC residual current.