Image Number 8 for United States Patent #5525040.
A controller for controlling the pumping unit for an oil well comprises a housing having a first and a second tip for placement in a flow of oil between the wellbore to holding tanks; means for generating a substantially constant power; a constant power heater in the first tip connected to the means for generating, for radiating a substantially constant heat; means for determining the temperature at each the first and second tips and for generating a digital signal indicative of the temperature of the first and second tips; supervising means for controlling the means for determining, processing the digital signal for determining a rolling average signal, and generating a control signal therefrom which is independent of ambient temperature of the oil flow; and means for switching the pumping unit on or off, according to the control signal. The controller further comprises means for calibrating the means for determining. The constant power heater is preferably a FET connected in series with a resistor. The invention also provides a optimizing method for controlling a pumping unit of an oil well.