With the continuous growth of energy consumption, the rationalization of energy has become a priority. The photovoltaic energy sector remains a major occupation for researchers in the field of production optimization or storage methods. The concept developed in this work is a mixed optimization approach for energy management during battery charging with a duty cycle. A selective collaborative algorithm intervenes to choose and use the appropriate results of the few techniques to optimize the charging time of a battery and estimate its state of charge by using the minimum possible tools. This is done using a collective database that is accessible in real time. It also effectively allows the synchronization of information between several customers. This approach is performed on a mobile application on android, through a Google Firebase platform that allows us to secure collaborative access between multiple customers and use the results of the calculations of some algorithms. It gives us the values obtained by the various sensors in real time to accelerate the charging speed of the battery. The validation of this approach led us to practice a few scenarios using an Arduino board to show that this approach has a better performance.