Managing plug-in electric vehicles (PEVs) recharging with different capacities can achieve the optimum operation schedule. Otherwise, stability issues for the microgrid may occur. Therefore, Energy management becomes essential for charging stations to meet the complexity of bidirectional power flow and multiple resource availability. This paper presents an energy management system of PEVs based on multiple resources managed by a DC microgrid. Three main resources are used: the national grid, Photovoltaic cells (PV), and Battery. The grid and PV cells are centralized distributed, whereas Batteries are decentralized distributed. Balance options are defined to match the vehicle requirements based on power availability, even the surplus power between the connected vehicles. The aims are to optimize grid energy usage, long life of the storage devices, and improve resilient power to the load demand. Metaheuristic methods (PSO) are used to enhance the response to the charging station operator. The results show that electric vehicles are a promising solution to keep the voltage stability of the grid in a high-demand approach. The PV is a flexible and cheap resource to recharge electric vehicles and synergize the national grid. Sometimes, trading power from a high state of the charging PEV to a lower one is beneficial to maintain the stability of the charging station. Keywords: microgrid, charging station, Electric vehicles, multiple resources, voltage stability.