The drawings are not necessarily to scale, with the emphasis instead placed upon the principles of the present invention. Additionally, each of the embodiments depicted are but one of a number of possible arrangements utilizing the fundamental concepts of the present invention. The drawings are briefly described as follows.
a and 1b is a functional block diagram of a positional flow sensing apparatus according to an exemplary embodiment of the present invention.
It is important to establish the definition of a number of terms and expressions that will be used throughout this disclosure. The terms “liquid holding container” and “container” indicate any liquid holding method, such as a bottle, jug, barrel, keg, etc., from which a fluid can be dispensed, unless it is otherwise apparent from the context. A “Pouring Event” occurs when the faucet handle is moved from the closed position to open and back to closed again. Thus, a pouring event is initiated each time the dispensing valve is moved from the closed position to an open or partially opened position. Other important terms and definitions will be provided, as they are needed, to properly and concisely define the present invention and its associated novel characteristics and features.
Referring now to
The local controller 1 is operatively coupled to a flow detector analog positional sensor 2, for determining when pouring is not occurring, when a pouring event is in progress, and the flow control valve positional information.
The output of the position sensor 2 is periodically sampled by using the timer 4 and detected by the local controller 1. In the preferred embodiment, the analog or digital output of the position sensor 2 is input to the microcontroller 3 using analog-to-digital converters. However, it will be recognized that in other embodiments, digital information from the analog position sensor 2, can be passed to the processor as digital data.
The local controller 1 is operatively coupled to a Communication Unit 5 to convey the positional information to a Tap Hub Module 6 using the Communication Master Unit 7.
The Communication Master Unit 7, and/or the Tap Hub Module 6 thereof, communicates with a Personal Computing Device 9, to receive and display information for viewing by a user. The Personal Computing Device 9 is operatively coupled to the Tap Hub Module 6 using optional communication methods, such as Ethernet, USB, or Wireless methods. The Tap Hub Module 6 may also provide communications through a Removable Storage Device 8. This device may be in addition to the other communication methods.
The accelerometer or inclinometer analog positional sensing device of the present invention has an output voltage, which is related to the position of the analog sensing device and its relation to the gravitational force g. Since the position indicator element shown in
Since the movement of the handle can effect both the X and Y axis values, the magnitude of angular displacement is calculated using the square root of the sum of the squares of the X and Y values. This is not enough information, unless the closed position is at the vertical position of the handle, since it will only describe a curve that has a minima as it passes through vertical and two maxima at each lever extreme.
This can be solved by calculating using the squares of X-Xc and Y-Yc, where Xc is the value of the X axis when closed and Yc is the value of the Y axis when closed. Again, this calculation will only be valid if the sensing unit is not allowed to rotate. A rotational change can be detected by noting a magnitude change from Xc and Yc, when the handle is in the closed position. Software can be used to detect this situation and resetting the Xc and Yc values.
The positional flow sensing device is advantageously employed in conjunction with a liquid dispensing device, such as beer or other beverage, oil, etc. Referring now to
The sensing device p can be, for example, an accelerometer sensing device, an inclination sensing device, or other similar devices measuring acceleration, velocity or gravitational forces.
The sensing device p communicates with the Tap Hub Module by any acceptable method to convey a pouring event. In this preferred embodiment the method of communication is through a wireless connection. The Tap Hub Module communicates to the Personal Computing Device to enable the exchange of information between The Personal Computing Device and the local controller. The user interface is preferably a custom software application on the Personal Computing Device. This software application is coupled to the Tap Hub Module and Local Controller thereby enabling a user to input information to the fluid flow measuring system and receive information therefrom.
The Personal Computing Device 9, which may be termed a “master controller,” may be provided in a microprocessor-based “programmed” embodiment, such as a finite state machine provided via a programmable logic device, and is arranged to determine the volume of fluid dispensed when a pouring event occurs, or alternately a standard personal computer running a custom software application. In addition, it is contemplated that the master controller may further be employed to tabulate pouring event data and categorize this data for the user. For example, the tabulated data may be used to provide quantity of fluid dispensed, and categorized by container and/or type of fluid, during a specified duration. Optionally the information may be made available to a printer or other data communication interface.
Once the Personal Computing Device has determined the pouring event has concluded, the fluid volume information will be calculated and categorized totals will be updated. As discussed, the pouring related information may include a “total number of pours”, since a defined event, and also a “cumulative monetary” value or total for all the pours, since a defined event.
A defined event may be entered into the local controller, when a user inputs a pre-determined event sequence of switch presses. The sequence of switch presses may be provided to the local controller by way of switches, switches and display selection, or keypad, and will cause certain information (e.g., association between valve and beverage or fluid type or brand, event definitions, such as cleaning or service, etc.) to be defined or set to a desired initial value. Similarly, a defined event, initiated in an equivalent manner, may be assumed to reset other items or counts, including a number of categorized pours from the container.
As discussed above, prior art dispensing devices have significant accuracy concerns and problems. One drawback that arises with low cost dispensers, such as the device disclosed in U.S. Pat. No. 4,436,223, to Wilson, is caused by attempting to time a pouring event with a fixed (time) duration limit. The timing of a pouring event to determine volume can be accurate only so long as the flow rate is constant. However, when considering a container of the type to which the present invention may be applied, the flow rate may decrease as liquid is dispensed and the volume of liquid in the container decreases. That is, when a liquid holding container is full, or nearly full, liquid flow rate may be at a peak. Then, as the container empties, the rate may decrease, e.g., due to a decrease of pressure upon the liquid at a dispensing location.
As a result, the period of time required to dispense a pre-selected and uniform volume of liquid (with each pouring event) may be shorter when the container is full than it would be when the container is half full or nearly empty. Accordingly, a table of correction values, e.g., in a look up table or other digital storage device, may be determined, e.g., as a function of the type and size of the dispensing container, as well as other parameters and particulars, and be made available as needed to adjust the volume calculation for a pouring event.
For example, after one or some other preselected number of pouring events have occurred, a value contained in the table may be modified to more accurately determine the calculated volume for the next one or more pouring events. Therefore, to provide for a more accurate correlation between the parameters of a pouring event and a volume of liquid that is poured from the container during a pouring event, the controller may be configured (e.g., via a dynamic table lookup) to adjust the calculated volume of a pouring event, as a succession of spaced pouring events occur, and the container is emptied.
Thus the instantaneous rate of flow from a fluid control valve supplied by a pressurized fluid containment vessel (such as a beer keg) is affected by factors additional to the physical position of the fluid control valve. Along with the position of the fluid control valve, the method used to determine the instantaneous rate of flow of the fluid from the valve takes into account how much fluid was dispensed during the previous pouring event and the time elapsed since that last pouring event. The maximum instantaneous flow rate calculated during the current pouring event is at its lowest, when the previous pouring event is large in volume and near in time. As the elapsed time between the previous pouring event and the current pouring event increases to a certain duration (determined by the volume of the previous pouring event and the volume of fluid remaining in the pressurized fluid containment vessel) the maximum instantaneous flow rate calculated reaches the maximum the particular vessel-control valve combination is capable of.
It has also been observed that the instantaneous flow rate from a fluid control valve supplied by a pressurized containment vessel varies during the duration of a single pouring event. The instantaneous flow rate is at its maximum (as determined by the factors described in the previous paragraph) at the beginning of the pour event and decreases, perhaps to a minimum determined by the physical aspects of the dispensing system described in paragraph 0007, over the course of the pouring event. As such, the duration of the current pour is also taken into consideration, when calculating the instantaneous flow rate that is used to determine the total volume of the current pouring event.
The following steps are used to determine the instantaneous flow rate during a pouring event:
The volume poured during each fluid control valve position sensing period is determined by multiplying the instantaneous flow rate at the time of the sample by the length of the sample period. The volume poured during a pouring event is determined by summing the volume poured during each sample period of the pouring event.
The positional flow sensor device is used to determine the position of a draft beer faucet handle. The sensor preferably comprises a multi-axis accelerometer coupled to a microcontroller, both preferably powered by on-board batteries. As the handle is opened or closed, the analog voltage outputs of the accelerometer increase or decrease, based upon the physical acceleration of the accelerometer and the change in the measured gravitational acceleration along the axes.
By focusing on the change in the measured acceleration of gravity, the position of the faucet handle relative to known closed and vertical positions can be determined (see sections below on calibration, filtering, and determining handle position for more detail).
Though the resulting ‘angular displacement’ values are more accurately calculated as though they are on the surface of a sphere (i.e., sin(−15°<θAngular Displacement<+15°)), the straight-line calculation of distance in a Cartesian plane utilized by the accelerometer results in a full-scale error of less than ±0.5% for θAngular Displacement<±15°. The benefit of the straight-line interpolation is the removal of all trigonometric functions from the software, saving hundreds of computation cycles.
Factory calibration is performed prior to installation of the accelerometer. The goals of factory calibration are to:
Because of the mechanical differences from faucet to faucet and electrical and mechanical differences from accelerometer to accelerometer, it is necessary to adjust each accelerometer to the particular faucet on which it is mounted.
The ‘Installation Calibration’ process is used to discover the mechanical attributes of the faucet, e.g. the faucet closed position as detected by the accelerometer installed on the faucet. The calibration process also allows for the compensation of differences in sensitivity between the X- and Y-axes of the accelerometer, using the axisEccentricity calculated during Factory Calibration. Finally, installation calibration provides offset and gain values for both axes that allow the accelerometer samples to be scaled into an optimal range.
The application of axisEccentricity to the Y factor compensates for differing sensitivities on the X- and Y-axes. The result is the distance from closed to vertical with the axes scaled to the same sensitivity.
The application of axisEccentricity in this calculation alters the calculated distance to reflect the differing sensitivities of the X- and Y-axes.
The application of axisEccentricity to the Y factor compensates for differing sensitivities on the X- and Y-axes. The result is the distance from closed to vertical with the axes scaled to the same sensitivity.
The application of axisEccentricity in this calculation alters the calculated distance to reflect the differing sensitivities of the X- and Y-axes.
where guardValue is an integer sufficiently large to guarantee that an actual sample will not fall outside the projected range, but not so large that offsetX and offsetY become negative.
As noted above, the goal of installation calibration is to tailor the values used to scale samples provided by a particular faucet-accelerometer pairing. This section illustrates how the values calculated during installation calibration are used to manipulate the raw X- and Y-axis samples so they fall within the range acceptable by the algorithms that analyze them.
The current algorithms require that the X- and Y-samples fall between 0 and 127 inclusive.
sampleX=Xraw−offsetX
sampleY=Yraw−offsetY
Before the position of the tap handle can be determined, the scaled values samplex and sampley need to be filtered.
The samples are filtered in two (2) independent streams, one for the X-axis and the other for the Y-axis. The filter used is a low-pass finite impulse response (FIR) with 16 coefficients optimized for a 25 Hz sample rate and a 4 Hz cut-off frequency.
Filtering serves two purposes. The first, and most obvious, is to remove noise from sample streams. The software algorithms that determine the position of the faucet handle would be adversely affected by random noise in the data streams, and thus this noise must be filtered from the streams. The second reason is counter-intuitive, but important nevertheless. By definition, accelerometers measure acceleration. As the tap handle is opened or closed, its acceleration is indicated by high-frequency spikes in the X- and Y-data streams. Since our device is solely interested in the position of the handle and not its movement, the high frequency components of linear acceleration must be removed from the data stream as well.
By removing noise and the linear acceleration the resulting Xfiltered and Yfiltered represent the acceleration due to gravity on the axes of the accelerometer. As the tap handle changes position, the angle between the axes of the accelerometer and the vector of gravitational acceleration change as well. The change in angle results in changes in Xfiltered and Yfiltered. The position of the tap handle in relation to the calibrated vertical position and the calibrated closed position can be determined based on these changes.
The distances from the calibrated vertical and closed positions are used to ascertain the current position of the tap handle. These distances are calculated every time a new set of X- and Y-axis samples is taken from the accelerometer (25 times per second).
The distance from the current position to the calibrated closed position indicates the “openness” of the faucet. As the handle is moved to the open position, distanceFromClosed increases. Conversely, distanceFromClosed decreases to zero, as the tap handle is moved from the open position to the closed position.
distanceFromClosed=√{square root over ((Xfiltered−Xclosed)2+(Yfiltered−Yclosed)2)}{square root over ((Xfiltered−Xclosed)2+(Yfiltered−Yclosed)2)}
As the tap handle is moved from the closed position to the open position, distanceFromVertical decreases to zero, until it reaches the calibrated vertical position. As the handle is moved beyond the vertical position, distanceFromVertical increases from zero, until the handle reaches the open position. It follows that, as the faucet handle is moved from the open position to the closed position, distanceFromVertical again decreases to zero, until the vertical position is reached, and increases as the handle moves beyond vertical to the calibrated closed position.
Considered alone, distanceFromVertical provides no information about the “openness” of the faucet; it only indicates how far from vertical the handle is located, which could be either in the closed direction or in the open direction. Considering distanceFromVertical and distanceFromClosed together, however, expresses the nature of the tap movement.
Since the accelerometer is installed by screwing it onto the threaded faucet lever, it is possible that rotational movement could be detected. When the accelerometer is being rotated (e.g., being screwed in or unscrewed, intentionally or unintentionally), distanceFromClosed increases or decreases, mimicking the opening or closing of the faucet. During rotational movement, however, distanceFromVertical remains constant. Thus, rotational motion can be described (and detected) as a change in distance from the closed position without a change in distance from the vertical position. “Open-Close” movement can be described (and detected) as a change in distance from the closed position with change in distance from the vertical position.
distanceFromVertical=√{square root over ((Xfiltered−Xvertical)2+(Yfiltered−Yvertical)2)}{square root over ((Xfiltered−Xvertical)2+(Yfiltered−Yvertical)2)}
If the current angle of rotation from a fixed datum can be continuously monitored and if the distanceFromVertical of the closed faucet position is known, the current position in the complete 360 degree arc of closedX and closedY pairs can be easily calculated with a polar to rectangular coordinate transformation engine. The angle can be determined by measuring the current linear displacement along the shared axis of the accelerometer and the screw that it is mounted on. As the accelerometer is rotated on the screw, this displacement changes in a fashion that is directly related to their angular displacement.
The linear displacement can be monitored by a device that measures the distance between the top of the screw and any fixed datum within the accelerometer. This device can be any device or method that converts a displacement to a corresponding voltage, such as, for example, a strain gauge, optical sensor, linear potentiometer, encoder, anisotropic magnetoresistance bridge, Hall effect sensor, etc.
The magnitude of the displacement is converted to a digital count. The number of counts per complete turn and the rotational fixed datum are determined in two separate calibration procedures. The current count is converted to angular displacement using scaling, offset and Modulo arithmetic. This angle, the closed distanceFromVertical and the rectangular coordinates of Vertical are used to calculate the current closedX and closedY coordinates.
A permanent magnet is placed on a spring-loaded rod (or any type of probe) that extends through a hole along the axis of the threaded accelerometer mount receiver. This probe rests on and responds to the top of the faucet screw. The magnet indicates linear position by moving in relation to an AMR (Anisotropic Magnetoresistance) displacement sensor (currently a Honeywell HMC1501). This sensor has an embedded Wheatstone bridge whose output is amplified by a differential amplifier. The output of the amplifier is connected to an A/D input on the embedded microprocessor or finite state machine.
Counts per turn (gainT) is determined at Factory Calibration and is currently done by stepping the screw through five turns and taking the average of the difference of counts between turns. The datum is determined at installation calibration. The accelerometer is installed on its faucet in an arbitrary rotational but closed position and a reading (closedX and closedY) is recorded as well as a corresponding reading on the turn sensor (closedT). The datum is calculated using the following math:
Prescale the X and Y readings and subtract the Vertical X and Y positions from them:
PS0ClsdX=PSclosedX−PSvertX
PS0ClsdY=PSclosedY−PSvertY
Dist_from_Vert=ROUND(SQRT((PS0ClsdX)̂2)+((PS0ClsdY)̂2)),0)
The center is now at the origin so we can find the angle that this pair determines:
Angle(radians)_from—0=
IF((ATAN(PS0ClsdY/PS0ClsdX)>0),(ATAN(PS0ClsdY/PS0ClsdX)),(ATAN (PS0ClsdY/PS0ClsdX)+(2*3.14159))) or
IF((PS0ClsdY>0),(ACOS(PS0ClsdX/Dist_from_Vert)),((2*3.14159)−ACOS(PS0ClsdX/Dist_from_Vert)))
Scale the result so its possible range is from 0-255:
Angle(MOD256)=ROUND(Angle(radians)_from—0*255/(2*3.14159),0)
This result leaves us with a number that is appropriate for use in a 256 element lookup table. The 0Datum_Count is a value where 0 degrees resides in the Modulo(gainT) environment:
0Datum_Count=closedT−ROUND((Angle(MOD256)/256)*gainT,0)
The current T is read and (using the Dist_from_Vert), converted into a new PSClosedX and PSClosedY that can be used with the current prescaled and filtered X,Y readings to calculate the new distanceFromClosed value. PSClosedX and PSClosedY are calculated using the following math:
Current_OffsetT=countT−0Datum_Count
Offset(MOD256)=LSB—OF(gainT*Current_OffsetT/256)
PS0ClsdX=Dist_from_Vert*Cosine [Offset(MOD256)]
PS0ClsdY=Dist_from_Vert*Sine [Offset(MOD256)]
PSClosedX=PS0clsdX+PSvertX
PSClosedY=PS0clsdY+PSvertY
If the mechanical position of the sensor can be prevented from rotating, the rotational compensation will not be required. This can be accomplished by extending the housing of the sensor so that it can not rotate, once placed on the faucet handle. This implementation is shown in
In order to not obfuscate the essential functional and operational characteristics of the embodiments of the present invention as illustrated, certain items have been omitted. For example, the inclusion of a power source, such as a (optionally rechargeable) battery and a power regulator, has been omitted in
It must further be understood that the architectural and operational embodiments described herein are exemplary of a plurality of possible arrangements to provide the same (or equivalent) general features, characteristics, and general system operation. Therefore, while there have been described the currently preferred embodiments of the present invention, those skilled in the art will recognize that other and further modifications may be made, without departing from the spirit of the present invention, and it is intended to claim all modifications and variations as fall within the scope of the appended claims.
Accordingly, it is to be understood that the embodiments of the invention herein described are merely illustrative of the application of the principles of the invention. Reference herein to details of the illustrated embodiments is not intended to limit the scope of the claims, which themselves recite those features regarded as essential to the invention.