Nowadays, electric vehicles are growing rapidly with various study about it, no exception regarding to the battery charging system. Electric vehicles use many types of battery, including NiMH battery. One of the study or research about charging system is about how to optimize battery charging using an intelligent algorithm. However, this method is rarely implemented in real-Time and only through the help of the computer software. In this project, we discuss the implementation of the Particle Swarm Optimization Algorithm as a real time optimization method on the charger controller with the hope of providing solutions according to the user needs. For the 3 optimization charging conditions the prototype results in calculations with error costs of 0.33%, 7.22%, and 5.55%, respectively, compared to the results in the simulation. With this value, the implementation of PSO in real-Time systems has achieved a 95% success rate.