A power supply system which comprises; - at least one rectifier, which is connected to the mains input and rectifies the input voltage (Vin); - at least one transformer, which is arranged to convert the rectified input voltage (V T) to output voltages ((V CC); - at least one bulk capacitance to remove voltage discontinuities of the transformer input voltage (V T); - at least two switching elements, which switches input currents to the transformer; - at least one controller, which is arranged to control duration of conduction of at least one of the switching elements within a predefined duration limits, in accordance with the voltage value of at least one of the outputs ((V CC) of the transformer and a required voltage value at the said output ((V CC); - at least one low voltage output and at least one high voltage output characterized in that said power supply system further comprises; - at least one comparison means, which is arranged to measure the rectified input voltage (V T) and cancel out at least one switching element in case said rectified input voltage (V T) drops below a predefined threshold voltage; - at least one regulator, which is connected to said high voltage output of the transformer and is arranged to output a voltage equal to the voltage of the low voltage output of the transformer - at least one another switching element, which enables low voltage output of the system to power a main circuit during normal voltage input situation and which enables the regulator to power the main circuit when the comparison means detects that said rectified input voltage (V T) drops below said predefined threshold voltage. - at least one rectifier, which is connected to the mains input and rectifies the input voltage (Vin); - at least one transformer, which is arranged to convert the rectified input voltage (V T) to output voltages ((V CC); - at least one bulk capacitance to remove voltage discontinuities of the transformer input voltage (V T); - at least two switching elements, which switches input currents to the transformer; - at least one controller, which is arranged to control duration of conduction of at least one of the switching elements within a predefined duration limits, in accordance with the voltage value of at least one of the outputs ((V CC) of the transformer and a required voltage value at the said output ((V CC); - at least one low voltage output and at least one high voltage output characterized in that said power supply system further comprises; - at least one comparison means, which is arranged to measure the rectified input voltage (V T) and cancel out at least one switching element in case said rectified input voltage (V T) drops below a predefined threshold voltage; - at least one regulator, which is connected to said high voltage output of the transformer and is arranged to output a voltage equal to the voltage of the low voltage output of the transformer - at least one another switching element, which enables low voltage output of the system to power a main circuit during normal voltage input situation and which enables the regulator to power the main circuit when the comparison means detects that said rectified input voltage (V T) drops below said predefined threshold voltage.