Abstract A key point in the control of photovoltaic (PV) systems is the design of the maximum power point tracking (MPPT) algorithm. Although a huge number of approaches has been proposed in literature, the methods based on the perturb and observe (P&O) technique are the most widely employed in commercial products. The reason is in the fact that P&O can be implemented in cheap digital devices by assuring high robustness and a good MPPT efficiency. The low hardware resources required by the P&O algorithm are especially useful in distributed MPPT architectures, where the cost makes the difference. The performances of the P&O algorithm implemented in a digital device are affected by the quantization effect and numerical approximations. In this paper the basic P&O algorithm is suitably improved in order to compensate for these effects. A design recipe for choosing the best values of the P&O parameters is also given. The conclusions of the theoretical analysis are validated through simulations and experiments.