With the cost of renewable energy sources like photo-voltaic solar progressively declining, it is expected that contribution from these sources in overall power generation will increase. However, these newer sources have their own set of draw-backs. First and foremost is the variability in generation, then, controlling the power output from solar is also not trivial. Furthermore, there is a mismatch between the demand profile from the consumer and the supply profile of renewable generation. This increased penetration of renewable sources may lead to grid related problems such as over voltage, power back ow and instability. In this paper we propose a curtailment based solution to ameliorate the problem of over production. We provide an algorithm which controls the power output from solar panels. When demand is less than the maximum production capacity of the panels, the algorithm curtails the output to match the demand. And when demand is more, the algorithm does a best effort to produce maximum possible power.