Particular embodiments disclosed herein provide a surgical laser system comprising a laser source, a lens, a memory, and a processor in data communication with the memory and configured to execute instructions which cause the processor to control the laser source based on a detection signal received from a circuit. The circuit comprises a first amplifier, a second amplifier, and a switch coupled between the second amplifier and a reference potential node and whose state is based on an output of a first comparator. The circuit further comprises a second comparator coupled to the second amplifier and a logic gate coupled to the first comparator and the second comparator.