A self-regulating power supply (601, 901) for a led light source, the power supply (601, 901) comprising: - a drive power input (602, 603) for receiving drive power, - a lighting output (604, 605, 904, 905) for providing supply voltage and supply current to a led light source connected to the lighting output, - between said drive power input (602, 603) and lighting output (604, 605, 904, 905), a converter (606, 906) for generating said supply voltage and supply current from said drive power, - voltage regulating means (607, 907) for regulating a value of said supply voltage, - current regulating means (608, 908) for regulating a value of said supply current, and - a control unit (609, 909) which is arranged to control said voltage and current regulating means (607, 608, 907, 908), characterized in that said control unit (609, 909) is arranged to a) change (701, 802) said supply voltage in a controlled manner to detect where an operating voltage range of the led light source lies by detecting at least a lower limit thereof as the voltage at which, or in the immediate vicinity of which, the supply current begins to significantly rise above zero, b) measure (703, 803, 806) the value of said supply current in said operating voltage range, c) deduce (702, 704) a nominal maximum value of said supply current at least partly on the basis of said measurement of the value of the supply current made in the operating voltage range by increasing the supply voltage by a specific constant quantity from said lower limit and measuring how high the supply current increased and/or what was the highest value of a derivative of the supply current curve in this interval, and d) set the deduced nominal maximum value of the supply current as a first target value of the supply current. - a drive power input (602, 603) for receiving drive power, - a lighting output (604, 605, 904, 905) for providing supply voltage and supply current to a led light source connected to the lighting output, - between said drive power input (602, 603) and lighting output (604, 605, 904, 905), a converter (606, 906) for generating said supply voltage and supply current from said drive power, - voltage regulating means (607, 907) for regulating a value of said supply voltage, - current regulating means (608, 908) for regulating a value of said supply current, and - a control unit (609, 909) which is arranged to control said voltage and current regulating means (607, 608, 907, 908), a) change (701, 802) said supply voltage in a controlled manner to detect where an operating voltage range of the led light source lies by detecting at least a lower limit thereof as the voltage at which, or in the immediate vicinity of which, the supply current begins to significantly rise above zero, b) measure (703, 803, 806) the value of said supply current in said operating voltage range, c) deduce (702, 704) a nominal maximum value of said supply current at least partly on the basis of said measurement of the value of the supply current made in the operating voltage range by increasing the supply voltage by a specific constant quantity from said lower limit and measuring how high the supply current increased and/or what was the highest value of a derivative of the supply current curve in this interval, and d) set the deduced nominal maximum value of the supply current as a first target value of the supply current.