Valve current error detection for fluid mixture dispensing device
Ingredient dispensing systems and methods are disclosed. A disclosed system includes an ingredient reservoir and an electromechanical valve configured so that, when the electromechanical valve is activated, an ingredient is dispensed from the ingredient reservoir. The disclosed system also includes a current sensor configured to measure a current draw of the electromechanical valve. The disclosed system also includes a controller programmed to sample the current draw from the current sensor and to detect a dispense error of the electromechanical valve based on the sampled current draw.
1. An ingredient dispensing system comprising:
an ingredient reservoir;
an electromechanical valve configured so that, when the electromechanical valve is actuated, an ingredient is dispensed from the ingredient reservoir;
a current sensor configured to measure a current draw of the electromechanical valve;
a pressure sensor configured to measure a volume in the ingredient reservoir; and
a controller configured to:
sample the current draw from the current sensor and detect a dispense error of the electromechanical valve based on the sampled current draw;
determine changes in the measured volume based on measurements of the pressure sensor; and
determine a discrepancy between an expected volume based on the measured current draw and the volume measured by the pressure sensor.
2. The ingredient dispensing system of claim 1 , wherein the electromechanical valve is a solenoid valve.
3. The ingredient dispensing system of claim 1 , wherein the dispense error includes at least one of: a stuck plunger in the electromechanical valve; a broken coil in the electromechanical valve; a presence of a contaminant in the electromechanical valve; and overheating of the electromechanical valve.
4. The ingredient dispensing system of claim 1 , wherein the controller is further configured to:
determine, using the current draw measured by the current sensor, a time that the electromechanical valve is held open; and
determine, based on the time, a volume of the ingredient that is dispensed by the electromechanical valve.
5. The ingredient dispensing system of claim 4 , wherein:
the ingredient is dispensed via an orifice of the ingredient reservoir; and
the volume of the ingredient dispensed from the ingredient reservoir also depends on a diameter of the orifice.
6. The ingredient dispensing system of claim 1 , wherein:
the ingredient reservoir is pressurized with a pressure;
the electromechanical valve, when actuated, is open for a period of time; and
a volume of the ingredient dispensed from the ingredient reservoir depends on both the pressure and the period of time.
7. The ingredient dispensing system of claim 1 , further comprising:
a memory accessible to the controller storing a set of reference current values;
wherein the controller detects the dispense error by comparing the sampled current draw with at least one of the reference current values in the set of reference current values stored in the memory.
8. The ingredient dispensing system of claim 7 , wherein:
the set of reference current values are in a reference curve;
the sampled current draw defines a point on a sampled current curve; and
the dispense error is detected by determining deviation of the sampled current curve from the reference curve.
9. The ingredient dispensing system of claim 7 , wherein:
the controller detects the dispense error based on the sampled current draw by:
detecting a difference between the sampled current draw and a reference value.
10. The ingredient dispensing system of claim 9 , wherein:
the controller is configured to perform a corrective action to compensate for the dispense error.
11. The ingredient dispensing system of claim 10 , wherein the corrective action includes adjusting a dispensing mode by at least one of: changing a pressure of the ingredient reservoir and changing a time that the electromechanical valve is held open.
12. The ingredient dispensing system of claim 7 , wherein:
the set of reference current values are in a reference curve;
the sampled current draw defines a point on a sampled current curve; and
the controller detects the dispense error by comparing a slope of the reference curve and a slope of the sampled current curve.
13. A method, conducted by an ingredient dispensing system, the method comprising:
dispensing, by an electromechanical valve, an ingredient from an ingredient reservoir;
measuring, using a current sensor, a current draw of the electromechanical valve;
sampling, by a controller, the current draw from the current sensor; and
detecting, by the controller, a dispense error of the electromechanical valve based on the sampled current draw;
wherein:
the controller detects the dispense error based on the sampled current draw by detecting a difference between the sampled current draw and a reference value;
the controller is configured to perform a corrective action to compensate for the dispense error; and
the corrective action includes adjusting a dispensing mode by at least one of: (i) changing a pressure of the ingredient reservoir; and (ii) changing a time that the electromechanical valve is held open.
14. The method of claim 13 , wherein the electromechanical valve is a solenoid valve.
15. The method of claim 13 , wherein the dispense error includes at least one of: a stuck plunger in the electromechanical valve; a broken coil in the electromechanical valve; a presence of a contaminant in the electromechanical valve; and overheating of the electromechanical valve.
16. The method of claim 13 , further comprising:
measuring, using a sensor, a volume in the ingredient reservoir; and
determining, by the controller, a discrepancy between an expected volume based on the measured current draw and the measured volume from the sensor.
17. The method of claim 16 , wherein:
the sensor is a pressure sensor; and
the controller is further configured to determine changes in the measured volume based on measurements of the pressure sensor.
18. The method of claim 17 , further comprising:
remediating the dispense error according to one or more of the measured current draw and the changes in the measured volume.
19. The method of claim 13 , further comprising:
determining, using the current draw measured by the current sensor, a time that the electromechanical valve is held open; and
determining, based on the time, a volume of the ingredient that is dispensed by the electromechanical valve.
20. The method of claim 13 , wherein:
the ingredient reservoir is pressurized with a pressure;
the electromechanical valve, when actuated, is open for a period of time; and
a volume of the ingredient dispensed from the ingredient reservoir depends on both the pressure and the period of time.
21. The method of claim 20 , wherein:
the electromechanical valve dispenses the ingredient via an orifice of the ingredient reservoir; and
the volume of the ingredient dispensed from the ingredient reservoir also depends on a diameter of the orifice.
22. The method of claim 13 , further comprising:
storing, in a memory accessible to the controller, a set of reference current values; and
detecting the dispense error by comparing the sampled current draw with at least one of the reference current values in the set of reference current values stored in the memory.
23. The method of claim 22 , wherein:
the set of reference current values are in a reference curve;
the sampled current draw defines a point on a sampled current curve; and
the dispense error is detected by detecting deviation of the sampled current curve from the reference curve.
24. The method of claim 22 , wherein:
the set of reference current values are in a reference curve;
the sampled current draw defines a point on a sampled current curve; and
detecting the dispense error includes comparing a slope of the reference curve and a slope of the sampled current curve.
25. The ingredient dispensing system of claim 24 , wherein:
the ingredient reservoir is pressurized with a pressure;
the electromechanical valve, when actuated, is open for a period of time; and
a volume of the ingredient dispensed from the ingredient reservoir depends on both the pressure and the period of time.
26. An ingredient dispensing system comprising:
an ingredient reservoir;
an electromechanical valve for the ingredient reservoir;
a current sensor configured to measure a current draw of the electromechanical valve;
a pressure sensor configured to measure a volume in the ingredient reservoir; and
a controller, wherein the controller is programmed to:
actuate the electromechanical valve to dispense an ingredient from the ingredient reservoir;
sample the current draw from the current sensor;
detect a dispense error of the electromechanical valve based on the sampled current draw; determine changes in the measured volume based on measurements of the pressure sensor; and
determine a discrepancy between an expected volume based on the measured current draw and the volume measured by the pressure sensor.
27. The ingredient dispensing system of claim 26 , wherein:
the ingredient is dispensed via an orifice of the ingredient reservoir; and
the volume of the ingredient dispensed from the ingredient reservoir also depends on a diameter of the orifice.
28. An ingredient dispensing system comprising:
an ingredient reservoir;
an electromechanical valve configured so that, when the electromechanical valve is actuated, an ingredient is dispensed from the ingredient reservoir;
a current sensor configured to measure a current draw of the electromechanical valve; and
a controller configured to:
sample the current draw from the current sensor and detect a dispense error of the electromechanical valve based on the sampled current draw;
determine, using the current draw measured by the current sensor, a time that the electromechanical valve is held open; and
determine, based on the time, a volume of the ingredient that is dispensed by the electromechanical valve.
29. The ingredient dispensing system of claim 28 , further comprising:
a sensor configured to measure a volume in the ingredient reservoir;
wherein the controller is further configured to determine a discrepancy between an expected volume based on the measured current draw and the volume measured by the sensor.
30. The ingredient dispensing system of claim 29 , wherein:
the sensor is a pressure sensor; and
the controller is further configured to determine changes in the measured volume based on measurements of the pressure sensor.
31. The ingredient dispensing system of claim 30 , wherein the controller is further configured to:
remediate the dispense error according to one or more of the measured current draw and the changes in the measured volume.
32. An ingredient dispensing system comprising:
an ingredient reservoir;
an electromechanical valve configured so that, when the electromechanical valve is actuated, an ingredient is dispensed from the ingredient reservoir;
a current sensor configured to measure a current draw of the electromechanical valve; and
a controller configured to:
sample the current draw from the current sensor and detect a dispense error of the electromechanical valve based on the sampled current draw;
wherein:
the controller detects the dispense error based on the sampled current draw by detecting a difference between the sampled current draw and a reference value;
the controller is configured to perform a corrective action to compensate for the dispense error; and
the corrective action includes adjusting a dispensing mode by at least one of: (i) changing a pressure of the ingredient reservoir; and (ii) changing a time that the electromechanical valve is held open.