This application includes a computer program listing Appendix in the form of a compact disc (two identical copies). The files of the compact disc are specified in an Attachment located at the end of the specification and before the claims hereof.
This invention relates to a delta detection method for detecting capacitance changes caused by relative movement between a physical object and a capacitance sensor.
It is well known to employ capacitive sensing to initiate or control the operation of various types of apparatus and systems. For example, it is known to utilize capacitance sensors to initiate operation of paper towel dispensers and other dispensers by sensing proximity of a user's hand.
Described below in greater detail are traditional approaches commonly practiced for both analog and digital detection when utilizing capacitance sensors to detect the location of physical objects. The prior art approaches have a number of drawbacks which also will be described below. One of these drawbacks is “ghosting”, or the incorrect interpretation of a noisy signal as a valid detection event.
The unique method of the present invention as encompassed in software detects capacitance changes while also filtering out false triggers. The invention employs delta detection methodology as the basis for calculating changes in capacitance.
The delta detection method of the invention is for detecting capacitance changes caused by relative movement between a physical object and a capacitance sensor.
The method includes the step of obtaining a sequence of signal readings from the capacitance sensor during the relative movement.
The method also incorporates the step of establishing a plurality of time period based counting windows, each counting window encompassing a selected portion of the sequence of signal readings differing from the selected portions of the sequence of signal readings encompassed by the other of the counting windows.
The sequence of signal readings is stored as collected raw data.
The collected raw data is utilized to calculate the delta values between selected counting windows.
The calculated delta values are stored in an array of delta values.
The step of searching for a predetermined event based on the array of delta values is also a part of the method.
Other features, advantages and objects of the present invention will become apparent with reference to the following description and accompanying drawings.
With reference to
Each box depicted by dash lines in
The capacitance sensor forms what is essentially an antenna, and the oscillations from the sensor will not produce a single, stable frequency, but rather a noisy series of readings. One method for reducing the effect of the noise is to smooth out the signal (e.g. low-pass filter or average). This may be done with RC-type circuits in the analog domain or through signal processing in the digital domain. The smoothed out signal is depicted in
Multiple averages or different time-lengths may also be used. This is typically done by looking at times when an average of shorter time length crosses over or under an average of longer time length. This is shown in
These methods have drawbacks for detecting short-duration events such as a hand wave. The
The method of the present invention is presented in block diagram form in
Utilizing the delta detection method of the present invention, the starting point for processing data is the counting window.
The sequence of readings is stored, usually in memory attached to a microcontroller or other programmable device. No averages are computed. Instead, the method looks at the difference between readings taken at different points in time. These points in time may in fact be consecutive readings, or they may be separated by a set or arbitrary length of time, as depicted in
Using this collected raw data, the processing then proceeds as follows. The difference or the delta between counting windows is calculated and this is stored in an array of “delta” values. The length of the array is a function of the type of event detected, and the noise signal.
At the next appropriate time interval or time step, a new signal value is obtained. If the stored sequence of signal values is at its maximum length, the oldest value in the sequence may be dropped, and the new signal reading takes its place in a location that reflects the time-order of signal readings.
If the raw frequency were to be plotted, this array of delta values could be considered a proxy for the second derivative of the raw frequency curve. A detection event now becomes a specific pattern in this second derivative.
One example of what the algorithm will search for, while maintaining a lengthy array of delta values of suitable length, or an array of readings upon which each delta computations are performed at each time interval, is a pattern similar to a square wave pulse, such as depicted in
In a linear representation, this pattern match will look similar to that shown in
The comparison values may be stored as an explicit sequence of values, or stored implicitly as a part of the mathematical function that performs event detection.
In some applications, one delta calculation may be insufficient to establish a detection event. The delta method can be extended to use multiple samples, across arbitrary lengths of time, as illustrated in
In this case, the reading at time (Y+1) is compared to the reading at time (X+1), and the reading at time (X) is compared to the reading at time (Y). The two comparisons may look for the same threshold, or they may be independent tests.
For example, for a very sharp change in the signal, the comparison between X and Y may look for a small change and a large change between (X+1) or (Y+1). Alternately, a small change in a noisy environment may look for a moderate, identical change in both comparisons.
Multiple windows can also be used when storage space is limited, as more windows may allow storage of smaller amounts of data.
For paper towel dispensers and other types of dispensers that use a rotating roller mechanism to dispense product, it is necessary to control the rotation of the roller or drum in order to control the amount of dispensed product. One traditional method for doing this is the use of magnets and a sensor (Hall effect sensors or reed switches). By placing a magnet in a specific location on the drum, and a magnet sensor nearby, it is possible to count the revolutions of the drum roller. The drawbacks of this method include relatively high manufacturing expense, since magnets and sensors are expensive. Also, multiple magnets are required when one revolution of the roller does not provide sufficient control of the dispensed material.
Another traditional method is to use timers to control the length of time the motor driving the roller is energized. The primary drawback of this method is that it requires significant and ongoing calibration due to variability of power source to the motor and variability in the mechanical structure (“friction” is variable).
To overcome these limitations, capacitance sensing technology can be used to track drum/roller movement. This requires a relatively inexpensive sensor mounted near the roller and the placement of a strongly dielectric target material somewhere on the roller. In
Using capacitance sensing for tracking a rotating or otherwise periodically moving object poses challenges. The traditional prior art approach to dealing with capacitance sensed signals is to smooth or average them (
For a rotating device of circular shape, the signal generated should resemble something like a sine wave or other essentially periodic waveform of relatively stable frequency which is a function of the rotation speed of the roller. Thus, to detect a specific point on the rotating cylinder (drum or roller) passing near the sensor, it is only necessary to search for a peak value.
However, with noise it is possible the peak value with negative noise won't meet the threshold necessary to trigger a detection event. Or, a value with positive noise far from a peak event is sufficient to trigger a false detection.
The proposed delta method for this particular application is the general delta method described above. The look-back distance between samples is a function of the sampling rate and the rotational speed of the cylinder (drum or roller). The counting window is small, to allow for multiple counts across the general maximum and minimum parts of the expected curve. See
For random noise, this significantly increases the probability of detecting a peak while reducing the chance of a false positive. This is because a threshold value closer to the theoretical maximum distance between peaks and minimums can be used.
Two further variations or embodiments are proposed to deal with particularly challenging sensing environments as shown in
The first variation uses multiple simultaneous deltas. This can be achieved in several ways, the simplest being to perform multiple comparisons at each point in time. With multiple comparisons, a detection event can be treated as a more complex “voting” scheme—e.g., two out of three delta compares meet a threshold.
The second variation is to detect both maximum and minimum values in the signal generated by the rotating object. This is shown in
This is advantageous as it doubles the resolution at which the roller can be controlled, which allows for finer control of the quantity being dispensed by the roller or drum. The cost implications are obvious.
There may be implementations wherein the rotating object—e.g. a drum or roller spun by an electric motor, cannot maintain a constant rotational speed or cadence.
An example of how this can occur is in the case of a battery-powered motor, the batteries having been significantly depleted, cause a slowing rotation of the drum or roller. In the case of a paper dispenser where the paper is stored on a large roll, the rotational speed may be different between a full roll (heavy) and a nearly depleted roll (light). A further example is the possible effect of friction of the mechanical structure changing as the dispenser is used over time.
The delta method of this invention allows an approach for dealing with these variations in rotational speed. As shown in
The variation of this look-back method distance is a function of the particular embodiment; for example, the look-back distance can be a function of the measured voltage at the battery terminals. Or the mechanical changes over time can be characterized, and the look-back distance can be calculated using an algorithm that understands the “aging” of the frictional resistance of the mechanical system.
The method steps of this invention can be carried out simultaneously with respect to multiple detection events. The method may include the step of selectively searching for different detection events.