Patent ID: 8692479

Claim:
A method of controlling a ballast in a circuit for a lighting application and connected to a mains power supply, the method comprising determining whether a dimmer is present in the circuit, comprising determining whether a trailing edge dimmer is present and determining whether a leading edge dimmer is present; in response to detecting that a dimmer is present, determining a moment indicative of a zero-crossing of the power supply and setting a bleeder current through the ballast in dependence on the phase of the power supply within a mains half-cycle; and in response to determining that a dimmer is not present, disabling the bleeder current: wherein setting bleeder current through the ballast in dependence on the phase of the power supply comprises, in the case that a trailing edge dimmer is present: determining a phase of the trailing edge; setting a first bleeder current during a part of the mains half-cycle including the trailing edge; and at least one of setting a second bleeder current, lower than the first bleeder current, during a later part of the mains half-cycle, and disabling the bleeder current during an earlier part of the mains half-cycle.