Patent ID: 7969221

Claim:
A square wave generator, comprising: a sawtooth wave generator for generating a sawtooth wave, the sawtooth wave generator comprising a capacitor and a switching unit connected parallel to each other; and a convertor for generating a square wave based on the sawtooth wave; wherein a first terminal of the capacitor is electrically coupled to a power source and the convertor, and a second terminal of the capacitor is grounded, the switching unit comprises a trigger and a field-effect transistor, an input terminal of the trigger is connected to the first terminal of the capacitor, and an output terminal of the trigger is connected to the gate of the field-effect transistor, the source of the field-effect transistor is grounded, and the drain of the field-effect transistor is connected to the first terminal of the capacitor, when a voltage of the first terminal of the capacitor is not less than a first threshold voltage of the trigger, the trigger is turned on to activate the field-effect transistor, the field-effect transistor is turned on to ground the first terminal of the capacitor, so that the capacitor discharges rapidly.