An optoelectronic circuit receiving a variable voltage containing alternating ascending and descending phases, which circuit comprises sets of light-emitting diodes mounted in series, a module for each set for comparing the voltage at one of the terminals of the set with at least a first threshold and a control module which is connected to the comparison modules and is suitable, during each ascending phase, for interrupting the flow of a current in each set when said voltage of said set goes above the second threshold or when said voltage of the set which is adjacent to said set and through which current passes goes above the first threshold and is suitable, during each descending phase, for controlling the flow of a current in each set when said voltage of the set which is adjacent to said set and through which current passes goes below the first threshold.