Disclosure of Invention
The invention aims to provide a double-wire capacitive detection power-saving architecture and a power-saving method, which are used for solving the problems in the prior art.
In order to achieve the above purpose, the present invention provides the following technical solutions:
the power-saving structure comprises a capacitive touch point and a touch detection module, wherein a signal end, a voltage output end and a grounding end are arranged on the touch detection module, the signal end is connected with an external controller signal power supply, a voltage stabilizing capacitor is connected between the voltage output end and the grounding end, the grounding end is grounded, the touch detection module charges the voltage stabilizing capacitor with the external controller signal power supply received by a control signal end, and a capacitive touch point signal is detected in an active detection mode when the voltage of the voltage stabilizing capacitor reaches a working voltage.
More optimally, the touch detection module comprises a capacitive touch detection unit, a counter and count value comparison unit, an ALU arithmetic logic unit and a power supply control unit, wherein the capacitive touch detection unit is electrically connected with a capacitive touch point, the capacitive touch detection unit is used for detecting signals of the capacitive touch point, the counter and count value comparison unit counts the signals detected by the capacitive touch detection unit, when the count value exceeds a first limiting unit value, the count value is stored in the ALU arithmetic logic unit, the ALU arithmetic logic unit is used for comparing the count value with a count threshold, when a comparison result is that the capacitive touch point is pressed normally, a short circuit is formed between a control signal end and a grounding end, the power supply control unit receives an external controller signal power supply received by the control signal end as a power supply and controls the voltage stabilizing capacitor to charge, and the power supply control unit is also used for controlling the capacitive touch detection unit, the counter, the count value comparison unit and the power supply control unit.
More optimally, the touch detection module further comprises a first field effect tube and a second field effect tube, the power supply control unit is used for controlling whether the on-off control signal end of the first field effect tube charges the voltage stabilizing capacitor with the received external controller signal power supply or not, and the ALU arithmetic logic unit is used for controlling whether the on-off control signal end of the first field effect tube is in short circuit with the grounding end or not. The grid electrode of the first field effect tube is electrically connected with the power supply control unit, the source electrode of the first field effect tube is electrically connected with the voltage output end, the drain electrodes of the first field effect tube and the second field effect tube are both connected with the signal end, the grid electrode of the second field effect tube is electrically connected with the ALU arithmetic logic unit, and the source electrode of the second field effect tube is connected with the grounding end.
More optimally, the power saving architecture further comprises a touch sensitivity adjusting unit, wherein the touch sensitivity adjusting unit is electrically connected with the capacitive touch detection unit, and the touch sensitivity adjusting unit is used for adjusting the sensitivity of the capacitive touch detection unit when detecting the capacitive touch point signal.
More preferably, the count threshold is calculated by the ALU arithmetic logic unit repeatedly to obtain a group of stable count values.
More optimally, when the counting threshold value is kept unchanged and the time length of the counting threshold value which is kept unchanged is longer than the stable time length threshold value, the power supply control unit only supplies power to the capacitive touch detection unit and the counter and count value comparison unit, and the power supply control unit enters a power saving mode.
More preferably, when the count value of the counter and count value comparing unit exceeds the previous count value by a second limiting unit value, the power supply control unit supplies power to the capacitive touch detection unit, the counter and count value comparing unit and the ALU arithmetic logic unit, and the power supply control unit enters a normal working mode.
A two-wire capacitive sensing power saving method, the power saving method comprising the steps of:
converting an external signal power supply transmitted by an external controller into capacitor voltage stabilizing control;
the capacitive voltage stabilizing control provides power for capacitive touch detection action, counting and counting value comparison action, wherein the capacitive touch detection action is used for detecting signals of capacitive touch points, the counting and counting value comparison action is used for counting the detected signals of the capacitive touch points and comparing the counted values with the previous counted values;
when the count value and the previous count value exceed a first limiting unit value, the capacitor voltage stabilizing control provides power for an arithmetic logic action, wherein the arithmetic logic action is used for comparing the count value with a count threshold value, judging whether the capacitor voltage stabilizing control belongs to a normal pressing capacitor touch point according to a comparison result,
and the arithmetic logic action transmits a signal to an external controller when the comparison result belongs to the normal pressing capacitance touch point.
Compared with the prior art, the invention has the beneficial effects that: the invention greatly improves the detection mode of passive detection, but utilizes a capacitive detection active trigger architecture, when the touch detection has no change, the touch detection is in a standby mode, the touch detection is still continuously performed, the judgment is not performed, and the touch detection judgment is not performed until the touch detection changes; the invention can also be used for non-key switches, such as a water-free detection switch, a water level detection switch, a metal contact switch and the like, can be connected with a plurality of double-wire capacitive touch detection power-saving structures, and can simultaneously perform induction detection on a plurality of induction points, such as water level or water quantity detection induction points, when the water level and the water quantity increase or decrease, any group of double-wire capacitive touch detection power-saving structures act to actively send out signals.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1-2, in an embodiment of the present invention, a dual-wire capacitive detection power-saving architecture includes a capacitive touch point and a touch detection module, wherein the touch detection module is provided with a signal end, a voltage output end and a ground end, the signal end is connected with an external controller signal power supply, a voltage stabilizing capacitor is connected between the voltage output end and the ground end, the ground end is grounded, and the touch detection module charges the voltage stabilizing capacitor with an external controller signal power supply received by a control signal end, and detects a capacitive touch point signal in an active detection manner when the voltage of the voltage stabilizing capacitor reaches an operating voltage.
The touch detection module comprises a capacitive touch detection unit, a counter and count value comparison unit, an ALU arithmetic logic unit and a power supply control unit, wherein the capacitive touch detection unit is electrically connected with a capacitive touch point, the capacitive touch detection unit is used for detecting signals of the capacitive touch point, the counter and count value comparison unit counts the signals detected by the capacitive touch detection unit, when the count value exceeds or is smaller than a first limiting unit value, the count value is stored in the ALU arithmetic logic unit, the ALU arithmetic logic unit is used for comparing the count value with a count threshold, when the comparison result is that the capacitive touch point is pressed normally, a short circuit is controlled between a signal end and a grounding end, the power supply control unit receives an external controller signal power supply received by the control signal end as a power supply and controls to charge a voltage stabilizing capacitor, and the power supply control unit is also used for controlling the capacitive touch detection unit, the counter and the count value comparison unit and the ALU arithmetic logic unit to supply power to the voltage stabilizing capacitor.
The touch control detection module further comprises a first field effect tube and a second field effect tube, the power supply control unit is used for controlling whether the on-off control signal end of the first field effect tube charges the voltage stabilizing capacitor with the received external controller signal power supply or not, and the ALU arithmetic logic unit is used for controlling whether a short circuit exists between the on-off control signal end of the first field effect tube and the grounding end or not. The grid electrode of the first field effect tube is electrically connected with the power supply control unit, the source electrode of the first field effect tube is electrically connected with the voltage output end, the drain electrodes of the first field effect tube and the second field effect tube are both connected with the signal end, the grid electrode of the second field effect tube is electrically connected with the ALU arithmetic logic unit, and the source electrode of the second field effect tube is connected with the grounding end.
The power saving architecture further comprises a touch sensitivity adjusting unit, wherein the touch sensitivity adjusting unit is electrically connected with the capacitive touch detection unit, and the touch sensitivity adjusting unit is used for adjusting the sensitivity of the capacitive touch detection unit when detecting the capacitive touch point signal.
The counting threshold value is a group of stable counting values obtained by repeated computation of the ALU arithmetic logic unit.
When the counting threshold value is kept unchanged and the time length of the counting threshold value is longer than the stable time length threshold value, the power supply control unit only supplies power to the capacitive touch detection unit and the counter and count value comparison unit, and the power supply control unit enters a power saving mode.
When the count value of the counter and count value comparing unit exceeds the previous count value by a second limiting unit value, the power supply control unit supplies power to the capacitive touch detection unit, the counter and count value comparing unit and the ALU arithmetic logic unit, and the power supply control unit enters a normal working mode.
A two-wire capacitive sensing power saving method, the power saving method comprising the steps of:
converting an external signal power supply transmitted by an external controller into capacitor voltage stabilizing control;
the capacitive voltage stabilizing control provides power for capacitive touch detection action, counting and counting value comparison action, wherein the capacitive touch detection action is used for detecting signals of capacitive touch points, the counting and counting value comparison action is used for counting the detected signals of the capacitive touch points and comparing the counted values with the previous counted values;
when the count value and the previous count value exceed a first limiting unit value, the capacitor voltage stabilizing control supplies power for an arithmetic logic action, wherein the arithmetic logic action is used for comparing the count value with a count threshold value, judging whether the capacitor voltage stabilizing control belongs to a normal pressed capacitor touch point according to a comparison result,
and the arithmetic logic action transmits a signal to an external controller when the comparison result belongs to the normal pressing capacitance touch point.
The following description will be made by taking the application of the anhydrous detection switch of a large humidifier as an example:
in the present application, the capacitive touch detection unit is a conventional capacitive touch technology, and is applicable to both charge transfer and relaxation oscillation architecture, in a general capacitive sensing detection mode, capacitive sensing is performed, a counter and a counter value comparing unit are used to count values, and if the counter value exceeds the previous count value by more than 5 units, the counter value is further placed in an ALU arithmetic logic unit to perform continuous calculation for a period of time, and if the technical mean value of the continuous period of time counter is less than one third of a normal pressing set value during capacitive touch detection, an N-MOS transistor (i.e., a second field effect transistor) is turned on to short-circuit a signal pin Singal (i.e., a signal end) with a ground GND pin (i.e., a ground end), so as to simulate a normal pressing switch action of a user, and conduct the second field effect transistor sw_n2.
The power control unit controls the operation power and the power saving, when the signal pin Singal receives weak power and provides the power required by the power control unit, the power control can be started when the potential reaches about 1V. Firstly, the power control unit turns on the SW_P1 (i.e. the first field effect transistor is communicated), the signal pin Singal receives weak power and leads the signal pin Singal to the Vout (i.e. the voltage output end) to charge the voltage stabilizing capacitor, and when the potential reaches the normal working voltage, the detection is started.
At this time, the "capacitive touch detection unit" will start to perform capacitive sensing detection, and the "counter and count value comparison unit" will give the count value to the "ALU arithmetic logic unit" to obtain a set of stable count values through repeated computation, which we call the value as a threshold value. The threshold value is continuously adjusted along with the change of the temperature and the humidity of the environment, but the change of the environment is slower, so that the updating of the threshold value is also slower, and a group of stable technical values are obtained by repeated calculation. When the normal touch is performed, the average value of the touch counts is lower than a threshold value, and the normal touch is judged at the moment, and the updating of the threshold value is automatically stopped under the condition so as to ensure that the threshold value is changed when the normal touch is not performed; when the power supply is powered on, the finger is in a touch condition, at the moment, the threshold value can judge whether a touch condition exists for distinction, so that the touch can be judged to be an invalid touch, and after the finger leaves a touch point, the threshold value starts to be updated, and at the moment, the updating speed of the threshold value is higher. This threshold is an important value of the "counter and count value comparing unit" when the count value is compared. In this stage, repeated calculation is needed, so that the power consumption is high, when the voltage of Vout is lower than the set value, the power control unit performs touch detection in an intermittent manner according to the time parameter set by the timer, then automatically and slowly stretches the frequency of touch detection to reduce the detection touch frequency, and when the voltage of Vout and the power consumption of the chip reach balance, the stable touch detection frequency is obtained.
The calculation of the threshold value is an important basis for the progressive current situation, and therefore, the current situation of the calculated current environmental change is continuously calculated when the threshold value is not touched, and the calculated current environmental change is not included in the calculation when the data value of the counter and the count value comparing unit exceeds 5 units.
After the threshold is stable, the power saving mode is performed after a period of time has passed, the embodiment is described with 8 seconds, and after the power saving mode is entered, the power supply control unit turns off the unnecessary unit, and only the capacitive touch detection unit and the counter and count value comparison unit are left to achieve the power saving effect, and the current consumption is only 1.5uA.
At this time, the capacitive touch detection unit and the counter and count value comparison unit continuously detect the touch detection unit, until the counter and count value comparison unit detects and calculates the touch detection unit and the count value comparison unit when the comparison data value exceeds more than 5 units of count value, the power control unit starts all the closed units and enters a normal working mode.
In the normal operation mode, if the ALU arithmetic logic unit does not find any change after operation, it is determined that the false trigger signal will reenter the power saving mode. When the comparison count value exceeds 5 unit count values and the touch effective time operation average value is stable, the ALU arithmetic logic unit confirms that the key is triggered after operation, and when the ALU arithmetic logic unit confirms that the key is triggered after operation, an output signal is given to SW_N2 (namely a first field effect transistor), a signal pin Singal and a grounding GND pin are short-circuited, and normal operation is completed. After the signal pin Singal is shorted to the ground GND, the shorting time is related to the capacitance value outside the Vout pin, and after the signal pin Singal is shorted to the ground GND, the power supply provided on the signal pin Singal cannot be obtained, and only the capacitance outside the Vout pin can be used for discharging, so the time of the embodiment is about 0.5 seconds, and the external voltage stabilizing capacitance is 1uf.
In this embodiment, when the anhydrous detection switch is operated, the anhydrous detection switch is in a normal state when water is present, and the anhydrous detection switch is in an abnormal state when water is detected, so that the anhydrous detection switch is in an open circuit, and the anhydrous detection switch is in a short circuit when the ALU arithmetic logic unit confirms that no water is present after operation, the signal pin Singal and the ground GND pin are triggered to be in a short circuit, and the capacitor discharge outside the Vout pin is lower than the lowest working voltage, so that the system is reset and restarted continuously, and the reset is performed after the system is reset, the interval time is about 1 second, and at the moment, the signal pin Singal is opened for about 0.5 seconds and closed for about 0.5 seconds to continuously send a high-level signal and a low-level signal to the microcontroller of the humidifier system.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.