A method for operating a battery charger configured to be connected to a battery, comprising the steps of: connecting the battery to the battery charger; determining a capacity C of the battery, wherein the step of determining the capacity C of the battery comprises calculating the capacity using a capacity function that gives the capacity C of the battery for a given conductivity G; determining an initial charging current using the capacity C of the battery; applying the determined initial charging current as a charging current to the battery; determining the voltage change with time ΔV/Δt over the battery; adjusting the charging current based on the voltage change with time ΔV/Δt to obtain a predetermined rate of change of the output voltage ΔV/Δt, wherein the step of determining the capacity of the battery comprises: generating an electrical pulse across a plus pole and a minus pole of the battery; measuring a first voltage V1 across the plus pole and the minus pole at a first time during said pulse; measuring a second voltage V2 across the plus pole and the minus pole at a second time after said pulse; calculating a voltage difference ΔV 12 between said first voltage and said second voltage; calculating the conductivity of the battery according to: G=I pulse /ΔV 12 where I pulse is the current of the electrical pulse; calculating the capacity C of the battery according to: C=q, where q is a capacity function that gives the capacity C of the battery for a given conductivity G. connecting the battery to the battery charger; determining a capacity C of the battery, wherein the step of determining the capacity C of the battery comprises calculating the capacity using a capacity function that gives the capacity C of the battery for a given conductivity G; determining an initial charging current using the capacity C of the battery; applying the determined initial charging current as a charging current to the battery; determining the voltage change with time ΔV/Δt over the battery; adjusting the charging current based on the voltage change with time ΔV/Δt to obtain a predetermined rate of change of the output voltage ΔV/Δt, wherein the step of determining the capacity of the battery comprises: generating an electrical pulse across a plus pole and a minus pole of the battery; measuring a first voltage V1 across the plus pole and the minus pole at a first time during said pulse; measuring a second voltage V2 across the plus pole and the minus pole at a second time after said pulse; calculating a voltage difference ΔV 12 between said first voltage and said second voltage; calculating the conductivity of the battery according to: G=I pulse /ΔV 12 where I pulse is the current of the electrical pulse; calculating the capacity C of the battery according to: C=q, where q is a capacity function that gives the capacity C of the battery for a given conductivity G. generating an electrical pulse across a plus pole and a minus pole of the battery; measuring a first voltage V1 across the plus pole and the minus pole at a first time during said pulse; measuring a second voltage V2 across the plus pole and the minus pole at a second time after said pulse; calculating a voltage difference ΔV 12 between said first voltage and said second voltage; calculating the conductivity of the battery according to: G=I pulse /ΔV 12 where I pulse is the current of the electrical pulse; calculating the capacity C of the battery according to: C=q, where