This paper lays out the problem of powering a Permanent Magnet Synchronous Motor (PMSM) by means of a photovoltaic (PV) generator without any battery or any other kind of energy accumulation system and develops a simple and efficient solution for it. The solution has been made by the implementation of a Proportional-Integral Controller (PI) based on Arduino platform as well as an appropriate tuning of its control parameters utilizing the tuning method known as AMIGOf (Approximate Mconstrained Integral Gained Optimization based on frequency response). The controller allows the motor to rotate at a speed range from repose state to the maximum speed that can be reached when the photovoltaic generator operates at its maximum power point (MPP). In order to assess the system operation, it has been built up an experimental system composed on the motor, an e-bike inverter and a small photovoltaic generator. Start-up and sudden drop of the available PV power tests have been carried out. The obtained results show a successful system behaviour, providing quick start-up without oscillations and a fast response to a drop of the available power. The generator voltage is always kept close to the control setpoint value, avoiding sharp voltage drops which could turn out the system to be unstable.