A square wave generator (30) suitable for use with an electrosurgical device is provided. In one embodiment, the square wave generator includes a voltage source (102) configured to output a waveform and a comparator (104) operatively coupled to the voltage source (102) and configured to output energy in the form of a square wave. The generator may also include at least one sensor (122) configured to sense an operational parameter of the energy outputted from the comparator (104) and to provide a sensor signal corresponding thereto and a controller (124) adapted to receive the at least one sensor signal and in response thereto control the voltage source (102).