An electrosurgical unit having detection circuitry for reducing radiofrequency leakage current in an electrosurgical unit. The electrosurgical unit includes a radiofrequency generator configured to generate electrosurgical energy, the radiofrequency generator including a detection circuit having a resistor ladder and an isolation transformer in electrical communication with the resistor ladder. The detection circuit is configured to detect a change in impedance across the isolation transformer and correlate the change in impedance to one of a plurality of predetermined energy thresholds.