Water dispenser electric control child lock based on single chip microcomputer
By using a microcontroller-based electronically controlled child lock, combined with button triggering and faucet status detection, the safety hazards of accidental operation of water dispensers are solved, achieving a low-cost, highly compatible, and low-power intelligent anti-accidental touch function.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- FOSHAN CHANCHENG CENT HOSPITAL CO LTD
- Filing Date
- 2025-06-10
- Publication Date
- 2026-04-17
AI Technical Summary
In hospitals and other crowded places, the existing water dispensers pose a risk of scalding to children if they operate them without supervision, and are also easily affected by external factors.
The child lock is based on a microcontroller and features triple protection through button triggering, timed operation, and status detection. It combines a reed switch magnetic switch to detect the faucet status and uses a transistor to drive a relay and a solenoid valve to control the water circuit, thus achieving intelligent anti-accidental touch.
It achieves low-cost retrofitting, with a false touch probability of less than 0.1%, strong compatibility, quick installation, low power consumption operation, and meets energy-saving requirements.
Smart Images

Figure CN224137642U_ABST
Abstract
Description
Technical Field
[0001] This utility model relates to the field of smart home technology, and in particular to a microcontroller-based electronically controlled child lock for water dispensers. Background Technology
[0002] With the continuous development of information technology and the deepening of modern industrial transformation, technologies that rely on and are developed around fixed machines are gradually becoming a trend. The role of microcontrollers in micro-control systems is becoming increasingly prominent; electronically controlled child locks are one example.
[0003] Water dispensers recover heat energy through a water-electricity linkage valve, which can meet the drinking water needs of general places. However, hospitals are places with high population density, and there is a safety hazard of children operating them without supervision, which could cause burns. In addition, they are easily affected by many external physical factors. Utility Model Content
[0004] In order to overcome the shortcomings of the prior art, this application proposes a microcontroller-based electronically controlled child lock for water dispensers to solve the problems existing in the prior art.
[0005] To solve the above-mentioned technical problems, this utility model provides the following technical solution:
[0006] A microcontroller-based child lock for a water dispenser includes a power interface P1, a diode D1, voltage regulators VR1 and VR2, a microcontroller U1, transistors Q1-Q6, a relay KM1, a rotary magnetic switch for the water dispenser, and a child lock button TS. The power interface P1 is connected to the anode of diode D1, and the cathode of diode D1 is connected to the input terminal of voltage regulator VR1 and capacitor C1. The output terminal of voltage regulator VR1 is connected to capacitor C2 and the input terminal of voltage regulator VR2, outputting a 12V voltage. The output terminal of voltage regulator VR2 is connected to pin 1 of microcontroller U1, capacitors C3 and C4, outputting a 5V voltage. Pin 1 of microcontroller U1 is connected to a 5V power supply. The power source is pin 8, which is grounded. The child lock input module connects to a touch button with an indicator light via the P2 interface. Pins 6 and 7 are connected to the button switch, and pins 1, 2, and 3 are connected to the red / green indicator lights. The indicator light status is controlled by pins 6 and 7 of the microcontroller U1, and pin 4 detects the button trigger signal. The faucet detection module connects the reed switch SLT to pin 2 of the microcontroller U1 via the P3 interface to detect the faucet rotation status. In the output control module, pin 5 of the microcontroller U1 drives relay KM1 via transistor Q5 to control the original water inlet valve, and pin 3 drives the solenoid valve via transistor Q6 to control the hot water pipeline. At the same time, pins 6 and 7 directly output level signals to drive the indicator lights to display the status.
[0007] As a further technical solution of this utility model: the microcontroller U1 is model PIC12F629.
[0008] As a further technical solution of this utility model: the voltage regulator VR1 is model number 7812.
[0009] As a further technical solution of this utility model: the voltage regulator VR2 is model number 7805.
[0010] As a further technical solution of this utility model: the relay KM1 is a normally open contact relay.
[0011] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages:
[0012] 1. Low-cost retrofit: The retrofit cost per unit is approximately 100 yuan, saving 97% of the cost compared to replacing the entire unit;
[0013] 2. Intelligent anti-accidental touch: Combining button triggering, time-limited operation, and status detection for triple protection, the probability of accidental touch is <0.1%;
[0014] 3. High compatibility: Compatible with multiple brands of water dispensers, no need to modify the original main structure, installation cycle <30 minutes;
[0015] 4. Low power consumption operation: Standby power consumption <0.5W, the solenoid valve and indicator light are only activated when triggered, which meets energy saving requirements. Attached Figure Description
[0016] Figure 1 This is a circuit diagram of a child lock for a water dispenser based on a microcontroller. Detailed Implementation
[0017] The technical solutions in the embodiments of this utility model will be clearly and completely described below. Obviously, the described embodiments are only some embodiments of this utility model, and not all embodiments. Based on the embodiments of this utility model, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of this utility model.
[0018] Example 1, such as Figure 1As shown, a microcontroller-based child lock for a water dispenser includes a power interface P1, a diode D1, voltage regulators VR1 and VR2, a microcontroller U1, transistors Q1-Q6, a relay KM1, a rotary magnetic switch for the water dispenser, and a child lock button TS. The power interface P1 is connected to the anode of diode D1, and the cathode of diode D1 is connected to the input terminal of voltage regulator VR1 and capacitor C1. The output terminal of voltage regulator VR1 is connected to capacitor C2 and the input terminal of voltage regulator VR2, outputting a 12V voltage. The output terminal of voltage regulator VR2 is connected to pin 1 of microcontroller U1, capacitors C3 and C4, outputting a 5V voltage. Pin 1 of microcontroller U1 is connected to the 5V... The power supply is grounded at pin 8. The child lock input module connects to a tactile button with an indicator light via the P2 interface. Pins 6 and 7 are connected to the button switch, and pins 1, 2, and 3 are connected to the red / green indicator lights. The indicator light status is controlled by pins 6 and 7 of the microcontroller U1, and pin 4 detects the button trigger signal. The faucet detection module connects the reed switch SLT to pin 2 of the microcontroller U1 via the P3 interface to detect the faucet rotation status. In the output control module, pin 5 of the microcontroller U1 drives relay KM1 via transistor Q5 to control the original water inlet valve, and pin 3 drives the solenoid valve via transistor Q6 to control the hot water pipeline. At the same time, pins 6 and 7 directly output level signals to drive the indicator lights to display the status.
[0019] The working principle is as follows:
[0020] Input: Taken from the original water dispenser's 24V DC power supply (P1 interface), with a reverse polarity protection diode D1 (5819, 1A / 40V) connected in series to prevent the power supply polarity from being reversed and burning out the circuit.
[0021] Step-down filtering: The 24V voltage is stepped down to 12V using a 7812 voltage regulator (VR1) to power the microcontroller (PIC12F629) and relay (KM1). Parallel capacitors C1 (50V / 220mF) and C3 (25V / 220uF) filter out ripple and ensure voltage stability (ripple ≤50mV).
[0022] Microcontroller power supply: 12V is isolated by diode D2 (5819), then filtered twice by C4 (25V / 220uF) to output 5V to the microcontroller's ① pin (VCC), and ⑧ pin is grounded (GND).
[0023] Upon power-up, capacitor C1 charges to 24V, the 7812 starts regulating the voltage, and the output stabilizes at 12V after about 100ms. The reverse polarity protection diode D1 has a forward voltage drop of 0.7V and is reverse-biased, protecting subsequent circuits from damage caused by reverse power connection. A dual-capacitor filter combination (electrolytic capacitor + ceramic capacitor) suppresses high-frequency noise, ensuring stable operation of the microcontroller in strong electromagnetic environments (such as solenoid valve operation).
[0024] 1. Child lock button (TSKEY, GP3 pin):
[0025] Hardware: A tactile switch with red / green indicator lights (P2 interface pins 6 and 7), with built-in LEDs (R / G) directly driven by the microcontroller pins 6 and 7 (high level lights up the green light, low level lights up the red light).
[0026] Logic: Under normal conditions, GP3 is at a high level through an internal weak pull-up (WPU=0X28). When the button is pressed, it is grounded, and GP3 detects a low level (trigger threshold < 0.8V).
[0027] Anti-shake: Software delay of 20ms (delay function) to avoid accidental triggering due to button mechanical bounce.
[0028] 2. Faucet switch (SLTKEY, GP5 pin):
[0029] Hardware: Reed switch magnetic control switch (P3 interface), installed on the hot water faucet knob. When rotated, the magnet approaches the reed switch to close it, and the GP5 pin changes from a weak pull-up high level (5V) to a low level (0V).
[0030] Status detection: The microcontroller polls the status of the GP5 pin to determine whether the faucet is closed (closed → 0V, open → 5V).
[0031] Accidental touch protection: If the child lock is pressed and SLTKEY=0 is detected (faucet is open), the green light will flash (LEDG inverted, 200ms cycle), and hot water will be refused to be turned on.
[0032] It will be apparent to those skilled in the art that this invention is not limited to the details of the exemplary embodiments described above, and that it can be implemented in other specific forms without departing from the spirit or essential characteristics of this invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of this invention is defined by the appended claims rather than the foregoing description. Thus, it is intended that all variations falling within the meaning and scope of equivalents of the claims be included within this invention.
[0033] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This way of describing the specification is only for clarity. Those skilled in the art should regard the specification as a whole, and the technical solutions in each embodiment have been appropriately combined to form other embodiments that are easy for those skilled in the art to understand.
Claims
1. A single-chip microcomputer-based electric control child lock for a water dispenser, comprising a power interface P1, a diode D1, a voltage stabilizer VR1, a voltage stabilizer VR2, a single-chip microcomputer U1, triodes Q1-Q6, a relay KM1, a water dispenser knob magnetic control switch, and a child lock button TS; characterized in that, The power interface P1 is connected to the positive terminal of diode D1. The negative terminal of diode D1 is connected to the input terminal of voltage regulator VR1 and capacitor C1. The output terminal of voltage regulator VR1 is connected to capacitor C2 and the input terminal of voltage regulator VR2, outputting a 12V voltage. The output terminal of voltage regulator VR2 is connected to pin 1 of microcontroller U1, capacitors C3 and C4, outputting a 5V voltage. Pin 1 of microcontroller U1 is connected to a 5V power supply, and pin 8 is grounded. The child lock input module is connected to a tactile button with an indicator light via interface P2, where pins 6 and 7 are connected to the button's on / off state. The system is as follows: pins 1, 2, and 3 are connected to red and green indicator lights, and the light status is controlled by pins 6 and 7 of the microcontroller U1. Pin 4 detects the button trigger signal. The faucet detection module connects the reed switch SLT to pin 2 of the microcontroller U1 via the P3 interface to detect the faucet's rotation status. In the output control module, pin 5 of the microcontroller U1 drives relay KM1 via transistor Q5 to control the original water inlet valve, and pin 3 drives the solenoid valve via transistor Q6 to control the hot water pipeline. At the same time, pins 6 and 7 directly output level signals to drive the indicator lights to display the status.
2. The electric control child lock of the water dispenser based on the single-chip microcomputer according to claim 1, characterized in that, The microcontroller U1 is model PIC12F629.
3. The electric control child lock of the water dispenser based on the single-chip microcomputer according to claim 1, characterized in that, The voltage regulator VR1 is model number 7812.
4. The electric control child lock of water dispenser based on single-chip microcomputer according to claim 1, characterized in that, The voltage regulator VR2 is model number 7805.
5. The electric control child lock of water dispenser based on single-chip microcomputer according to claim 1, characterized in that, The relay KM1 is a normally open contact relay.