Design and implementation of an energy harvesting system