Simulation, design and fabrication of a planar micro thermoelectric generator