A DC to DC converter to convert an input voltage (Vin) to an output voltage (Vout), said DC to DC converter comprising: a pair of switches comprising a high side switch and a low side switch; an inductor coupled to said pair of switches; and a controller (102, 200) configured to estimate a zero crossing of an inductor current through said inductor, wherein said controller is further configured to provide a pulse width modulated signal and a low side switch enabling signal (LDR_EN), wherein said high side switch is responsive to said PWM signal and wherein said low side switch is responsive to said PWM signal and said low side switch enabling signal (LDR_EN), characterized by that said controller, comprising an energy storage element, is configured to provide said PWM signal in a digital ON state corresponding to a switch ON state during a first time interval (Ton), said controller being further configured to charge said energy storage element during said first time interval (Ton) and to discharge said energy storage element during a second time interval (Toff), wherein the inductor current rises and decreases, respectively, in proportion to the charge on the energy storage element, and wherein said controller is configured to control said first time interval (Ton) to be inversely proportional with said input voltage (Vin) less said output voltage (Vout) by charging said energy storage element during said first time interval (Ton) using a current that is proportional with said input voltage (Vin) less said output voltage (Vout), and by changing the PWM signal to a digital OFF state such that the switches (Q1, Q2) change to the switch OFF state, when the charge on the energy storage element reaches a predetermined charge threshold level. a pair of switches comprising a high side switch and a low side switch; an inductor coupled to said pair of switches; and a controller (102, 200) configured to estimate a zero crossing of an inductor current through said inductor, wherein said controller is further configured to provide a pulse width modulated signal and a low side switch enabling signal (LDR_EN), wherein said high side switch is responsive to said PWM signal and wherein said low side switch is responsive to said PWM signal and said low side switch enabling signal (LDR_EN), characterized by that said controller, comprising an energy storage element, is configured to provide said PWM signal in a digital ON state corresponding to a switch ON state during a first time interval (Ton), said controller being further configured to charge said energy storage element during said first time interval (Ton) and to discharge said energy storage element during a second time interval (Toff), wherein the inductor current rises and decreases, respectively, in proportion to the charge on the energy storage element, and wherein said controller is configured to control said first time interval (Ton) to be inversely proportional with said input voltage (Vin) less said output voltage (Vout) by charging said energy storage element during said first time interval (Ton) using a current that is proportional with said input voltage (Vin) less said output voltage (Vout), and by changing the PWM signal to a digital OFF state such that the switches (Q1, Q2) change to the switch OFF state, when the charge on the energy storage element reaches a predetermined charge threshold level.