Patent attributes
A soap dispenser includes a spout; a controller; a barcode scanner electrically connected to the controller; a power supply electrically connected to the controller; and a soap reservoir including a label having a barcode containing information including a set count of dispensing times of the soap reservoir and a current count of dispensing times of the soap reservoir. The spout includes an electromagnetic switch, an infrared sensor, and a pump in fluid communication with the soap reservoir and electrically connected to the electromagnetic switch respectively. The barcode scanner scans the barcode and sends same to the controller for storage. The controller compares the set count of dispensing times of the soap reservoir with the current count of dispensing times of the soap reservoir prior to activating the pump. After the pumping, the controller increases the current count of dispensing times of the soap reservoir by one.