Design and Implementation of a Thermopile-Based Earth Sensor