An energy harvesting chip designed to extract maximum power from a TEG