Electric vehicles can potentially be the best means of transportation for improving air quality, provided that they are powered by electricity from natural gas or wind, water or solar power. In this paper we describe a simple cooperative algorithm that exploits the energy management units of Plug-in Hybrid Electric Vehicles (PHEVs) to absorb the expected forthcoming energy available from renewable sources. The proposed approach bridges the gap between mobility patterns and power grid constraints, and allows to prevent green energy from being wasted while at the same time reducing the complexity burden of the power grid to charge unexpected loads of electric vehicles. Simulation results are given to show the efficacy of the proposed method