A circuit for detecting a leading-edge phase-cut dimmer , the circuit comprising: an edge detector operable to receive an input signal, detect whether the input signal has a rapidly rising edge, and generate an edge detector output signal, wherein the edge detector output signal includes a signal pulse if a rapidly rising edge is detected in the input signal; a pulse stretcher operable to receive the edge detector output signal and generate a pulse stretcher output signal, wherein if the edge detector output signal includes a signal pulse, the pulse stretcher output signal includes a stretched pulse having a duration that is longer than the signal pulse received from the edge detector; and a filter operable to receive the pulse stretcher output signal and generate a filter output signal, wherein if the pulse stretcher output signal includes at least a predetermined number of stretched pulses within a predetermined amount of time, the filter output signal indicates the presence of a leading-edge phase-cut dimmer, and characterized in that the edge detector comprises: a comparator configured to receive the input signal at a first input of the comparator, the output of the comparator representing the edge detector output signal; an RC circuit comprising a resistor having a first end coupled to the input signal and a second end coupled to a capacitor ; and an offset voltage source coupled to the junction of the resistor and the capacitor of the RC circuit, operable to add a voltage offset to the signal at the junction of the resistor and the capacitor, and providing the resulting offset signal to the second input of the comparator. an edge detector operable to receive an input signal, detect whether the input signal has a rapidly rising edge, and generate an edge detector output signal, wherein the edge detector output signal includes a signal pulse if a rapidly rising edge is detected in the input signal; a pulse stretcher operable to receive the edge detector output signal and generate a pulse stretcher output signal, wherein if the edge detector output signal includes a signal pulse, the pulse stretcher output signal includes a stretched pulse having a duration that is longer than the signal pulse received from the edge detector; and a filter operable to receive the pulse stretcher output signal and generate a filter output signal, wherein if the pulse stretcher output signal includes at least a predetermined number of stretched pulses within a predetermined amount of time, the filter output signal indicates the presence of a leading-edge phase-cut dimmer, and characterized in that the edge detector comprises: a comparator configured to receive the input signal at a first input of the comparator, the output of the comparator representing the edge detector output signal; an RC circuit comprising a resistor having a first end coupled to the input signal and a second end coupled to a capacitor ; and an offset voltage source coupled to the junction of the resistor and the capacitor of the RC circuit, operable to add a voltage offset to the signal at the junction of the resistor and the capacitor, and providing the resulting offset signal to the second input of the comparator. a comparator configured to receive the input signal at a first input of the comparator, the output of the comparator representing the edge detector output signal; an RC circuit comprising a resistor having a first end coupled to the input signal and a second end coupled to a capacitor ; and an offset voltage source coupled to the junction of the resistor and the capacitor of the RC circuit, operable to add a voltage offset to the signal at the junction of the resistor and the capacitor, and providing the resulting offset signal to the second input of the comparator. <EOS>