20 Hz power supply consisting of a square wave inverter and a band pass filter is a very important unit of source injection type stator earth fault protection. This paper developed a 20 Hz square wave inverter scheme based on micro control unit. The design and calculation of the LC band pass filter are given in detail. A voltage clamp circuit is also designed. It can be used to alleviate the impact of fault voltage on the square wave inverter when single-phase earth fault happens, and to protect the internal circuit from being damaged. The developed 20 Hz power supply is flexible, stabile and reliable.