To guarantee a higher reliability of operation, the capacity of a battery to reliably open and close a water valve and to operate a microprocessor is continuously checked. To do so, a plurality of reference voltages are formed. The current voltage of the battery is compared with these reference voltages, and the state of the battery is indicated on the basis of this comparison with, e.g., an LED.

FIELD OF THE INVENTION 
     The present invention pertains to a process and device for monitoring the power available to a valve in a plumbing unit, and in particular the present invention relates to a process and device where operation of a plumbing unit is adapted to the available power. 
     BACKGROUND OF THE INVENTION 
     Processes and devices for the contactess electronic control of the flow of water in washing units have been known from, e.g., CH-A-651 143, CH-A-646 766 and DE-A 39 20 581. If these devices are operated from a battery, the battery in time must be replaced upon reaching a certain residual capacity. To indicate that a battery change is due, it was previously determined whether the battery voltage exceeded a predetermined voltage value. An insufficient voltage was indicated by means of an LED. 
     SUMMARY AND OBJECTS OF THE INVENTION 
     The object of the present invention is to provide a process and a device of the class described, which guarantee a higher reliability of operation and more efficient operation. 
     The present invention has an electrically operated valve and a control circuit means for opening and closing the valve in response to sensory inputs. A power supply, usually a battery, is used to energize the control circuit and the valve. The minimum power required to open and close the valve, as well as the minimum power needed to operate the control circuit means is determined. Since the power supply is usually a battery, the power reserve of the battery can be determined by the voltage of the battery. The power requirements of the valve and control circuit can also be equated with a voltage level of the battery. 
     When the voltage level of the battery is below the minimum voltage required to open the valve plus a safety factor of usually 10%, with respect to the minimum opening voltage, the present invention indicates a low battery state. The voltage of the battery is checked at substantially regular intervals, and also when the control means is opening or closing the valve. The voltage when the valve is opening and closing, is known as the loaded voltage, and the battery voltage measured otherwise is known as the unloaded voltage. 
     In particular, the present invention prevents the water valve from being able to be actuated and opened without being able to be closed any more at an insufficient battery or power supply voltage. The microprocessor or control means can also be prevented from assuming an uncontrolled state. 
     Another advantage is considered to be the fact that the battery capacity can be used up to a guaranteed minimum valve-closing voltage. The useful life of a battery is thus extended, without the risk of an increased number of malfunctions. 
     The various features of novelty which characterize the invention are pointed out with particularity in the claims annexed to and forming a part of this disclosure. For a better understanding of the invention, its operating advantages and specific objects attained by its uses, reference is made to the accompanying drawings and descriptive matter in which preferred embodiments of the invention are illustrated. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     In the drawings: 
     FIG. 1 is a cross-sectional view of a water flow device with contactless electronic control. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
     The contactless electronic control is arranged, e.g., on a water outlet of a wash basin 12. For example, an infrared light scanner and receiver 3 is used to control the water valve 5. When, e.g., a hand is introduced into the area scanned by the infrared light scanner, the latter responds and sends a signal, which is amplified and causes the water valve to open or close. A microprocessor 7 is provided for the control, and a battery 6 is provided for power supply. An indicator 27 visible from the outside, e.g., an LED, which indicates the state of the battery 6, is provided as well. 
     The water valve 5 used is preferably a pulse servo valve, in which certain minimum limit values of the battery or power supply voltage can be set for reliable opening and closing. It should be borne in mind that, as a consequence of the unavoidable internal resistance of the battery, these limit values must be present and measured in the loaded state of the battery, i.e., at the end of the control pulse. The minimum closing voltage should be lower than the minimum opening voltage, so that it will always be possible after opening the valve to close the valve again with the same battery voltage. 
     To evaluate the state of the battery 6 or its ability to reliably open and close the valve and to reliably operate the microprocessor, three reference voltages are formed in the microprocessor. 
     The first reference voltage V(1) corresponds to a battery voltage which corresponds to a capacity reserve or safety factor of still approx. 10% relative to the guaranteed minimum valve-opening voltage. The second reference voltage V(0) corresponds to the guaranteed minimum valve-closing voltage. The third reference voltage V(P) corresponds to the minimum battery voltage at which the microprocessor is still able to operate. V(P) is lower than V(0), and V(0) is, in turn, lower than V(1). 
     The residual capacity of a lithium battery 2CR5 can be approximately determined from its discharge curve, namely, the declining curve describing the battery voltage over the discharge time. This means that, e.g., a certain residual battery capacity can be associated with a residual capacity of 10% or complete discharge. 
     By comparing the current battery voltage in the loaded state or in the valve-loaded state with the above-mentioned reference voltages, the electronic unit assigns the current state of the battery to one of the following states: 
     
         ______________________________________Test new battery     InitializationBattery O.K.         State B0Battery reserve 10%, under load                State B1Battery reserve 10%, not loaded                State B2Battery reserve 0%, under load                State B3Minimal voltage for microprocessor                Shut-off of system B4______________________________________ 
    
     The different states are displayed by the indicator, e.g., as follows: 
     
         ______________________________________Initialization     LED flashingBattery state 0    LED offBattery state 1    LED flashingBattery state 2    LED flashingBattery state 3    LED on continuouslySystem shut off    LED on continuously.______________________________________ 
    
     The circumstances under which the different states can be entered and left are described in the following description of the function. 
     After inserting fie battery, the battery is tested to determined whether the no-load battery voltage is higher or lower than V(1). 
     If it is higher, initialization is started. The LED indicator flashes during the initialization. 
     If the no-load battery voltage is lower than V(1), an attempt was made to insert an already used battery. Starting the initialization is refused in this case, i.e., the LED indicator shows continuous light (if the battery is still able to energize the LED indicator). 
     State B0 
     This state means that the battery is OK. The LED indicator remains off. 
     The no-load battery voltage is measured at short time intervals, i.e., every second If it is determined that the battery voltage is higher than V(1), state B0 is set; otherwise, B2 (no load) is set. 
     The battery voltage under load is measured each time the valve is opened (measurement of the battery voltage at the end of the switch-on pulse!). If it is determined that the battery voltage is higher than V(1), state B0 is set; otherwise, B1 (load) is set. 
     State B1 
     This state means that the battery voltage under load corresponds to a battery reserve of less than 10% with respect to the minimum voltage necessary to switch on the valve. The battery should be replaced within the next 2 to 3 weeks. 
     This battery change, which has become necessary, is continuously indicated by an LED indicator flashing at a frequency of, e.g., 1 Hz. 
     The battery voltage under load is measured each time the valve is switched on, and it is compared with V(0). If this comparison shows a value lower than V(0), a switchover to stage B3 is performed. 
     If the battery is not replaced within the 2 to 3 weeks mentioned, it may happen that the system remains in state B1 even longer and continues to function. However, the valve must be expected to cease opening beginning from a certain point in time, even though the electronic unit is still energized! 
     Reason: The voltage may drop below the minimum switch-on voltage applicable to the valve in question before the minimum closing voltage V(0) guaranteed for all valves is reached. 
     The advantage of this method is that the battery capacity can be utilized up to the guaranteed minimum valve-closing voltage. 
     State B2 
     In an electronic wash basin not used for a relatively long lime, the battery might be discharged to the extent that valve actuation is no longer ensured. To cover this case, the no-load battery voltage is also measured at least once per second. If a value lower than V(1) is determined, a switchover to this state B2 is performed. 
     State B2 differs from state B1 only in that a closing pulse is sent to the valve before the valve is switched on next. The battery voltage under load, which is determined during the closing pulse and compared with V(1) and V(0), determines whether the valve may be switched on and changed over into the state B0 or B1, or whether a changeover directly into state B3 must be performed. 
     State B3 
     This state means that the battery voltage under load is no longer sufficient with certainty for closing the valve. The system therefore refuses to switch on the valve in this state, and this refusal is made visible to the user with continuous lighting of the LED indicator. 
     Yet, each time the wash basin is "used," a check is performed with a closing pulse on the valve to determine whether the available battery voltage under load might still be sufficient for switching the valve off. Blocking of the system, which might otherwise be brought about by an incorrect measurement, is thus reliably avoided. 
     State B4 
     The correct function of the microprocessor is guaranteed by the manufacturer only above a minimum operating voltage. If this instruction is ignored, the microprocessor may send any erratic output signal (e.g., a command to switch on the valve!). To avoid this, the microprocessor is switched off under this operating voltage limit value V(P). 
     The LED indicator is then further maintained in the state of continuous light by the hardware of the electronic module until the battery is exhausted. 
     While specific embodiments of the invention have been shown and described in detail to illustrate the application of the principles of the invention, it will be understood that the invention may be embodied otherwise without departing from such principles.