Patent ID: 8631696

Claim:
A method comprising: lowering a sensor unit in a tank, the tank capable of receiving a material; transmitting wireless signals using the sensor unit; compensating for variations in a medium within the tank using wireless signals that are reflected by a reference finger, the reference finger disposed at a known distance from an emitting surface of the sensor unit; determining a first distance between the material and the sensor unit using wireless signals that are reflected off the material; determining a second distance between the sensor unit and a main unit that lowers the sensor unit; determining a level of the material in the tank using the first and second distances; determining, by the sensor unit, the level of the material in the tank as the tank is filled; raising, by the main unit, the sensor unit as the tank is filled; and adjusting a rate of adding the material to the tank based on the level of the material in the tank; wherein determining the first distance comprises: filtering electrical signals representing the wireless signals reflected off the material using a filter; amplifying an output of the filter using an amplifier; filtering an output of the amplifier based on a strength of the output of the amplifier using an envelope filter; buffering an output of the envelope filter using a buffer; determining a derivative of an output of the buffer; detecting zero crossings in the output of the buffer using the derivative of the output, the zero crossings detected using a zero-crossing detector, wherein consecutive zero crossings define a measuring window; generating a count value using a counter, wherein starting and stopping of the counter is based on the zero crossings; determining a time difference between when the wireless signals are transmitted and received using the count value; and determining the distance between the sensor unit and the material based on the time difference.