CN102394624B - Touch type key and detection method therefor - Google Patents

Touch type key and detection method therefor Download PDF

Info

Publication number
CN102394624B
CN102394624B CN 201110317511 CN201110317511A CN102394624B CN 102394624 B CN102394624 B CN 102394624B CN 201110317511 CN201110317511 CN 201110317511 CN 201110317511 A CN201110317511 A CN 201110317511A CN 102394624 B CN102394624 B CN 102394624B
Authority
CN
China
Prior art keywords
end points
module
touch
potential drop
dividing potential
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN 201110317511
Other languages
Chinese (zh)
Other versions
CN102394624A (en
Inventor
陆舟
于华章
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Feitian Technologies Co Ltd
Original Assignee
Feitian Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Feitian Technologies Co Ltd filed Critical Feitian Technologies Co Ltd
Priority to CN 201110317511 priority Critical patent/CN102394624B/en
Publication of CN102394624A publication Critical patent/CN102394624A/en
Application granted granted Critical
Publication of CN102394624B publication Critical patent/CN102394624B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Input From Keyboards Or The Like (AREA)

Abstract

The invention provides a touch type key and a detection method therefor. The touch type key comprises a touch key module, a partial pressure transmission module, and a processing module, wherein the partial pressure transmission module comprises three end nodes including an end node 1, an end node 2 and an end node 3; the processing module comprises three end nodes including an end node P1, an end node P2, and a grounding end node; the end node P1 and the end node P2 of the processing module are connected with the end node 1 and the end node 2 of the partial pressure transmission module respectively, and the grounding end node of the processing module is grounded; and the touch key module has one end node 4 connected with the end node 3 of the partial pressure transmission module. The touch type key provided by the invention is realized through a most basic component, and has the advantages of low cost, strong anti-interference ability, simple peripheral circuit, good use easiness, simplicity in operation, and long service cycle.

Description

A kind of touch-key and detection method thereof
Technical field
The present invention relates to a kind of touch-key and detection method thereof, belong to the electronic product field.
Background technology
The mechanical key used in a lot of equipment at present takies that volume is large, the life-span is short, not easy to operate, cost is high.
Development along with control technology, touch key-press has replaced mechanical key gradually, adopt the product of touch key-press usually have more convenient to operate, fashion is attractive in appearance, reliability and durability more, no-spark is disturbed for outward appearance, move on machinery-free, simple in structure, many merits can totally enclosedly be installed etc.
Touch key-press can be by some difference in functionalitys components and parts realize detecting button in conjunction with the programming of MCU and whether press; But existing touch type key structure is comparatively complicated, implements cost also higher.
Summary of the invention
The present invention is based on the deficiencies in the prior art, the invention provides a kind of touch key-press and detection method thereof;
A kind of touch-key, comprise dividing potential drop transport module, processing module and touch key-press module, the first end points of described dividing potential drop transport module is connected with the second end points of described processing module, the second end points of described dividing potential drop transport module is connected with the first end points of described processing module, the 3rd end points of described dividing potential drop transport module is connected with described touch key-press module, the ground termination points ground connection of described processing module;
Wherein, described dividing potential drop transport module, the signal of exporting for the first end points that receives described processing module by described dividing potential drop transport module the second end points, receive by described dividing potential drop transport module the 3rd end points the touch signal that described touch key-press module is transmitted, signal to described dividing potential drop transport module the second end points and the reception of the 3rd end points carries out voltage division processing, and the signal obtained after voltage division processing is exported to the second end points of described processing module by the first end points of described dividing potential drop transport module;
Described processing module, the variation of the signal of exporting for the first end points of controlling described processing module, detect described dividing potential drop transport module and export to the double-pointed signal condition of described processing module;
Described touch key-press module, for receiving the touch signal of human body, and by described touch signal the 3rd endpoint transfers by described dividing potential drop transport module to give the first end points of the described processing module of described dividing potential drop transport module be output port, the second end points of described processing module is input port.
Described dividing potential drop transport module comprises the first electric capacity, the second electric capacity and the first resistance;
Wherein, described the first electric capacity is connected with described the second electric capacity, described the first resistance, the other end of described the first electric capacity is connected with the first end points of described processing module, the other end of described the second electric capacity is connected with the second end points of described processing module, and the other end of described the first resistance is connected with the conductive electrode in described touch key-press module.
Described dividing potential drop transport module comprises the first resistance, the second resistance and the first electric capacity;
Wherein, described the first resistance is connected with described the second resistance, described the first electric capacity, the other end of described the first resistance is connected with the first end points of described processing module, the other end of described the second resistance is connected with the second end points of described processing module, and the other end of described the first electric capacity is connected with the conductive electrode in described touch key-press module.
Described processing module is MCU;
Wherein, the first end points of described MCU is connected with the first electric capacity of described dividing potential drop transport module, and the second end points of described MCU is connected with the second electric capacity of described dividing potential drop transport module.
Described processing module is MCU;
Wherein, the first end points of described MCU is connected with the first resistance of described dividing potential drop transport module, and the second end points of described MCU is connected with the second resistance of described dividing potential drop transport module.
Described touch key-press module comprises described conductive electrode;
Wherein, described conductive electrode is connected with the first resistance in described dividing potential drop transport module.
Described touch key-press module comprises described conductive electrode;
Wherein, described conductive electrode is connected with the first electric capacity in described dividing potential drop transport module.
Described touch-key, also comprise the antistatic module, the first end points of described antistatic module is connected with the 4th end points of described dividing potential drop transport module, and the second end points of described antistatic module is connected with the 3rd end points of described processing module, the 3rd end points ground connection of described antistatic module;
Wherein, described antistatic module, the interference signal produced for by the described touch key-press module of human body touch the time is exported to the 3rd end points of described processing module by the second end points of described antistatic module.
Described antistatic module comprises the first diode and the second diode;
Wherein, described the first diode and the series connection of the second diode, the negative pole of described the first diode is connected with the 3rd end points of described processing module, the plus earth of described the second diode, the tie point of described the first diode and the second diode is connected with the first electric capacity, the second electric capacity and the first resistance in described dividing potential drop transport module;
The 3rd end points of described processing module connects power supply.
Described antistatic module comprises the first diode and the second diode;
Wherein, described the first diode and the series connection of the second diode, the negative pole of described the first diode is connected with the 3rd end points of described MCU, the plus earth of described the second diode, the connection end point of described the first diode and the second diode is connected with the first resistance, the second resistance and the first electric capacity in described dividing potential drop transport module;
The 3rd end points of described MCU connects power supply.
Described dividing potential drop transport module comprises described the first electric capacity, described the second electric capacity and described the first resistance;
Wherein, described the first electric capacity is connected with described the second electric capacity, described the first resistance, the other end of described the first electric capacity is connected with the first end points of MCU in described processing module, the other end of described the second electric capacity is connected with the second end points of described MCU, the other end of described the first resistance is connected with the conductive electrode in described touch key-press module, and the connection end point of described the first electric capacity, described the second electric capacity and described the first resistance is connected with the connection end point of the second diode with the first diode in described antistatic module.
Described dividing potential drop transport module comprises described the first resistance, described the second resistance and described the first electric capacity;
Wherein, described the first resistance and described the second resistance, described the first electric capacity link, the other end of described the first resistance is connected with the first end points of described MCU, the other end of described the second resistance is connected with the second end points of described MCU, the other end of described the first electric capacity is connected with the conductive electrode in described touch key-press module, and the connection end point of described the first resistance, described the second resistance and described the first electric capacity is connected with the connection end point of the second diode with the first diode in described antistatic module.
Described processing module is described MCU;
Wherein, the first end points of described MCU is connected with the first electric capacity of described dividing potential drop transport module, the second end points of described MCU is connected with the second electric capacity of described dividing potential drop transport module, and the 3rd end points of described MCU is connected with the negative pole of the first diode in described antistatic module.
Described processing module is described MCU;
Wherein, the first end points of described MCU is connected with the first resistance of described dividing potential drop transport module, the second end points of described MCU is connected with the second resistance of described dividing potential drop transport module, and the 3rd end points of described MCU is connected with the negative pole of the first diode in described antistatic module.
Described touch key-press module comprises described conductive electrode;
Wherein, described conductive electrode is connected with the first resistance of described dividing potential drop transport module.
Described touch key-press module comprises described conductive electrode;
Wherein, described conductive electrode is connected with the first electric capacity of described dividing potential drop transport module.
A kind of detection method of touch-key comprises:
A. initialization input mouth and output port;
B. to described output port output high level time delay a period of time, then to described output port output low level;
C. receive the input signal of described input port;
Whether D. detect touch key-press touches;
If so, return to the state that button touched and exit operation;
If not, carry out E;
E. judgement is consecutively detected duration or the number of times that button do not touch and whether has reached default detection time or default detection number of times scope;
If so, return to time-out information and exit operation;
If not, return to B.
Whether described detection touch key-press touches and comprises:
When the state of described output port is low level, the state that records the described input port of current time becomes the needed delay time of high level by low level;
Judge whether described needed delay time is less than default delay time;
If so, return to the state that button touched and exit operation;
If not, the number of times check added up not touched to button adds 1; Or, do not touch the used time from adding this detection button on the duration do not touched at the check button added up; Carry out E.
Whether described detection touch key-press touches and comprises:
When the state of described output port is low level, the state that records the described input port of current time becomes the needed scanning times of high level by low level;
Judge whether described needed scanning times is less than default scanning times;
If so, return to the state that button touched and exit operation;
If not, the number of times check added up not touched to button adds 1; Or, add this detection button on the duration do not touched at the check button added up and do not touch the used time; Carry out E.
Whether described detection touch key-press touches and comprises:
When the state of described output port is low level, judge whether the voltage status of the described input port of current time is high level;
If so, return to the state that button touched and exit operation;
If not, the number of times check added up not touched to button adds 1; Or, do not touch the used time from adding this detection button on the duration do not touched at the check button added up, carry out E.
In described E, judgement is consecutively detected duration or the number of times that button do not touch and whether has reached default detection time or default detection number of times scope, comprising:
Add up being consecutively detected number of times or the duration that button do not touch, judge whether to exceed default number of times or the scope of default detection time of detecting;
If exceed default number of times or the scope of default detection time of detecting, return to time-out information and exit;
If do not exceed default number of times or the scope of default detection time of detecting, return to B.
If default also do not comprise after detecting number of times or the scope of default detection time in described exceeding:
One section Preset Time of time delay, return to B.
The present invention compared with prior art, has the following advantages:
Touch key-press in the present invention is realized by the most basic components and parts, and the whole system cost is low, antijamming capability is strong, peripheral circuit is simple, ease for use is better, simple to operate, life cycle is long.Its basic principle is a suitable electric capacity in parallel with ground when the human body touch metal key-press, changes capacitor value, can judge whether button is pressed, and simplifies the operation course and reaches same technique effect.
The accompanying drawing explanation
The frame structure schematic diagram of a kind of touch-key that Fig. 1 provides for the embodiment of the present invention 1;
The frame structure schematic diagram of the another kind of touch-key that Fig. 2 provides for the embodiment of the present invention 1;
The concrete block diagram of the processing module in the touch-key that Fig. 3 provides for the embodiment of the present invention 1
The electrical block diagram of the first touch-key that Fig. 4 provides for the embodiment of the present invention 2;
Waveform schematic diagram before and after the first button that Fig. 5 provides for the embodiment of the present invention 2 touches;
The electrical block diagram of the second touch-key that Fig. 6 provides for the embodiment of the present invention 2;
Waveform schematic diagram before and after the second button that Fig. 7 provides for the embodiment of the present invention 2 touches;
The electrical block diagram of the third touch-key that Fig. 8 provides for the embodiment of the present invention 2;
Waveform schematic diagram before and after the third button that Fig. 9 provides for the embodiment of the present invention 2 touches;
The detection method flow chart of the first touch-key that Figure 10 provides for the embodiment of the present invention 3;
The second that Figure 11 provides for the embodiment of the present invention 4 detects the detection method flow chart of touch-key.
Embodiment
This enforcement provides a kind of touch-key and detection method thereof, below in conjunction with accompanying drawing, preferred embodiment is elaborated, and should be emphasized that, it is only exemplary the following describes, and does not limit the scope of the invention and apply.
Embodiment 1
Referring to Fig. 1, the frame structure schematic diagram of a kind of touch-key provided for the embodiment of the present invention 1;
The present embodiment provides a kind of touch-key, as shown in Figure 1, comprises touch key-press module, dividing potential drop transport module and processing module;
The touch key-press module; For receiving the touch signal of human body, and the end points 3 by the dividing potential drop transport module passes to the dividing potential drop transport module by touch signal; After human body touches the touch key-press module, the touch key-press module is equivalent to produce over the ground certain impedance;
Dividing potential drop transport module: for the signal of the end points P1 output of end points 2 receiving processing modules by the dividing potential drop transport module, end points 3 by the dividing potential drop transport module receives the touch signal that the touch key-press module is transmitted, the dividing potential drop transport module carries out voltage division processing to the end points 2 of dividing potential drop transport module and the signal of end points 3 receptions, and the signal obtained after voltage division processing is exported to the end points P2 of processing module by the end points 1 of dividing potential drop transport module;
Processing module: the variation of the signal of exporting for the end points P1 that controls processing module, detect the signal condition that the dividing potential drop transport module is exported to the end points P2 of processing module;
The dividing potential drop transport module comprises three end points, end points 1 end points 2 and end points 3, processing module comprises three end points P1, end points P2 and ground termination points P3, and the end points P1 of processing module and end points P2 are connected respectively end points 2 and the end points 1 of dividing potential drop transport module, the ground termination points P3 ground connection of processing module; The touch key-press module has an end points 4, with the end points 3 of dividing potential drop transport module, is connected;
The signal output port of end points P1 of processing module, the signal input port of end points P2, the signal input endpoint of end points 2 of dividing potential drop transport module, the signal exit point of end points 1; The signal that the end points P1 output of processing module produces, the input endpoint 2 of dividing potential drop transport module receives the signal of end points P1 output, and the dividing potential drop transport module is exported from exit point 1 after signal is processed, and inputs to processing module by the end points P2 of processing module.
A kind of touch-key that the present embodiment provides can also comprise the antistatic module, as shown in Figure 2;
The antistatic module: for when the touch key-press module is pressed, the electric current that human body is produced flows into the power supply end points P4 of processing module by the end points 8 of antistatic module;
The dividing potential drop transport module comprises four end points, end points 1, end points 2, end points 3 and end points 5, and processing module comprises four end points P1, end points P2, power supply end points P4 and ground termination points P3; The end points P1 of processing module and end points P2 are connected respectively end points 2 and the end points 1 of dividing potential drop transport module; The touch key-press module has an end points 4, with the end points 3 of dividing potential drop transport module, is connected; The antistatic module comprises three end points, end points 7, end points 8 and ground termination points 9, and end points 7 connects the end points 5 of dividing potential drop transport module, and end points 8 connects the power supply end points P4 of processing module, the equal ground connection of ground termination points 9 of the ground termination points P3 of processing module and antistatic module;
The signal output port of end points P1 of processing module, the signal input port of end points P2, the signal input endpoint of end points 2 of dividing potential drop transport module, the signal exit point of end points 1; The signal that the end points P1 output of processing module produces, the input endpoint 2 of dividing potential drop transport module receives the signal of P1 output, and the dividing potential drop transport module is exported from end points 1 after signal is processed, and inputs to processing module by the end points P2 of processing module; When the touch key-press module is pressed, the electric current that the antistatic module produces human body flows into the power supply end points P4 of processing module by end points 8.
Referring to Fig. 3, the concrete block diagram of processing module in the circuit of the touch-key provided for the present embodiment;
Processing module specifically comprises: initialization unit 31, setting unit 32, receiving element 33, record cell 34, the first judging unit 35, return to unit 36, exit unit 37 and the second judging unit 38;
Initialization unit 31: for the initialization input and output port;
Setting unit 32: for to output port, exporting high level time delay a period of time, then to the output port output low level;
Also when when the second judging unit 38, the determination result is NO, time delay a period of time;
Receiving element 33: for receiving the output signal from the dividing potential drop transport module;
Record cell 34: for the state that records current input port, by low level, become the needed delay time T0 of high level;
Or: become the inferior numerical value k of the required scanning of high level by low level for the state that records current input port;
The first judging unit 35: for judging delay time T0, whether be less than default delay time T ';
Or; For judging whether time numerical value k is less than default inferior numerical value n;
Or; For judging whether the voltage status of current time input port is high level;
Return to unit 36: for when judgment result is that of the first judging unit 35 is, the button touch modules being returned to the state that button has touched;
Or; For when the second judging unit 38, when the determination result is NO, returning to time-out information;
Exit unit 37: for when returning to unit 36, returning to the state backed off after random operation that button has touched;
Or; For when returning to unit 36 and receive time-out information, exit operation;
The second judging unit 38; Whether reach preset value for when the judgement of the first judging unit 35 being result while being no, judging to be consecutively detected number of times or the duration that button do not touch.
Embodiment 2
Referring to Fig. 4, the electrical block diagram of the first touch-key provided for the present embodiment 2;
Processing module is MCU, and the dividing potential drop transport module comprises capacitor C 1, C2 and resistance R, and touch key-press comprises Touch Key; Wherein, the end points P1 of MCU is connected with C2 with capacitor C 1 respectively with end points P2, the ground termination points ground connection of MCU; End points P1 and end points P2 are respectively two I/O ports in MCU; The other end of capacitor C 1 and C2 all is connected with an end of resistance R, and button is touched in the contact of the resistance R other end.
Referring to Fig. 5, it is the waveform schematic diagram before and after the first button touch of Fig. 4 in embodiment 2; Fig. 5 detects and obtains on the touch-key shown in Fig. 4, the waveform of input waveform for recording at the P1 of MCU port; The waveform that output waveform 1 records at the P2 of MCU port while not touching for touch-key; The waveform that output waveform 2 records at the P2 of MCU port when rear for touch-key touches.
Capacitor C 1 in above-mentioned touch-key, C2 may instead be resistance R 1, R2, and resistance R may instead be capacitor C 1; Wherein, the end points P1 of MCU is connected with resistance R 2 with resistance R 1 respectively with end points P2, ground termination points P3 ground connection; End points P1 and end points P2 are respectively two I/O ports in MCU; The other end of resistance R 1 and R2 all is connected with an end of capacitor C 1, and button is touched in capacitor C 1 other end contact.
Referring to Fig. 6, the electrical block diagram of the second touch-key provided for the present embodiment 2;
Touch-key comprises antistatic module, processing module MCU, dividing potential drop transport module and touch key-press module; Wherein, the dividing potential drop transport module comprises capacitor C 1, C2 and resistance R, and the antistatic module is in series by two diode D1 and D2, the positive terminal ground connection of D1, the power supply end points P4 of the negative pole termination MCU of D2; Diode D1 in the antistatic module and the tie point of D2 are connected with an end of capacitor C 1, C2, resistance R simultaneously; Capacitor C 1, C2 are connected with end points P2 with the end points P1 of MCU respectively, and end points P1 and end points P2 are respectively the I/O port in MCU, and the power supply end points P4 of MCU is connected with power supply, the ground termination points P3 ground connection of MCU; Key-press module is touched in the contact of the resistance R other end.
Referring to Fig. 7, be the waveform schematic diagram of the touch-key of the second shown in Fig. 4 before and after touching; Wherein, the waveform that the P1 port that in Fig. 7, the input waveform is MCU records; The waveform that output waveform 3 records at the P2 of MCU port while not touching for touch-key; The waveform that output waveform 4 records at the P2 of MCU port after touching for touch-key.
Referring to Fig. 8, the electrical block diagram of the third Novel touch-type button provided for the present embodiment 2;
Touch-key comprises antistatic module, processing module MCU, dividing potential drop transport module and touch key-press module; Wherein, the dividing potential drop transport module is comprised of a capacitor C 0, two resistance R 1 and R2; The antistatic module is in series by two diode D1 and D2, the positive terminal ground connection of D1, the power supply end points P4 of the negative pole termination MCU of D2; In the antistatic module, the tie point of diode D1 and D2 is connected with an end of resistance R 1, R2 and capacitor C 0 simultaneously; The other end of capacitor C 0 connects the Touch Key of touch key-press module; Resistance R 1, R2 are connected with P2 with end points P1 respectively, and end points P1 and end points P2 are respectively two I/O ports in MCU, and the power end of MCU is connected with power supply, the ground termination points ground connection of MCU.
Referring to Fig. 9, the waveform schematic diagram before and after the third touch-key provided for the present embodiment 2 touches; Wherein, the waveform that the P1 port that the input waveform in Fig. 9 is MCU records; The waveform that output waveform 5 records at the P2 of MCU port while not touching for touch-key; The waveform that output waveform 6 records at the P2 of MCU port after touching for touch-key.
Embodiment 3
Referring to Figure 10, the detection method flow chart based on the touch-key of the first shown in Fig. 4 provided for the present embodiment; Specifically comprise as follows:
S11: power on, initialization input mouth and output port;
S12: to output port output high level time delay a period of time, then to the output port output low level;
Preferably, in the present embodiment, high level is designated as to 1, low level is designated as to 0, S12 can also is: write 1 and time delay a period of time to output port, then output port is write to 0;
Preferably, delay time can be 5ms;
S13: the input signal that receives input port;
S14: the state that records current input port becomes the needed delay time T0 of high level by low level;
When the state of output port is low level, processing module starts timing, and starts to detect the state of input port, until the voltage status of input port detected, is high level, stop timing, processing module will start timing and be designated as T0 to the delay time that stops timing;
The state that processing module detects input port is that the voltage status by continuous circular test input port realizes.
Preferably, in the present embodiment, high level is designated as to 1, low level is designated as to 0; This step can be specially: when processing module starts timing, the voltage status of continuous circular test input port, when the voltage of input port is equal to or higher than high-level threshold voltage A, it is 1 that input port is read voltage status now, when the voltage of input port during lower than high-level threshold voltage A, it is 0 that input port will voltage status be now read; Be 1 o'clock until processing module detects the voltage status of input port, stop timing, processing module will start timing and be designated as T0 to the delay time that stops timing;
S15: judge whether delay time T0 is less than default delay time T ';
To carry out S16;
No, carry out S17;
When above-mentioned situation while being no, processing module does not touch the check added up number of times to button add 1 or time of not touching at the check button of accumulative total on add this time and detect button and do not touch the used time;
The method of calculating default delay time T ' comprises: in the situation that button does not touch, when the state of output port is low level, processing module starts timing, and every a time interval s, the voltage status of the check output port repeated, be high level until the voltage status of input port detected, stops timing, processing module will start timing and be designated as T ' to the delay time that stops timing, and record delay time T ' as default delay time;
Preferably, in the present embodiment, high level is designated as to 1, low level is designated as to 0, the method of the default delay time T ' of above-mentioned calculating is specially: in the situation that button does not touch, when state output terminal is 0, processing module starts timing, and every a time interval s, the voltage status of the check output port repeated, until the voltage status of input port is 1, stop timing, processing module will start timing and be designated as T ' to the delay time that stops timing, and record delay time T ' as default delay time;
Preferably, in the present embodiment, delay time T ' can also be carried out in certain scope to time fine tuning, and the T ' after finely tuning is as default delay time; Default delay time obtained before touch key-press is detected.
S16: return to the state that button has touched, exit;
S17: judgement is consecutively detected number of times or the duration that button do not touch and whether reaches preset value;
Return to time-out information and exit;
No, continue to carry out S12;
Preferably, in above-mentioned S17, judgement is consecutively detected number of times that button do not touch or duration while not reaching preset value, and processing module can also continue to carry out S12 again after time delay a period of time;
In the present embodiment S17, to being consecutively detected the number of times that button do not touch, add up, when exceeding pre-determined number, be considered as overtimely, no longer whether button is touched and detected;
Or
At S17, the duration that button detected and do not touch is added up, be considered as overtimely when exceeding the scheduled time, no longer whether button is touched and detected, exit.
Above-mentioned S14, S15 can also replace with S14 ', S15 ';
S14 ': the state that records current input port is become the inferior numerical value k of the required scanning of high level by low level;
When the state of output port is low level, processing module starts metering, and start to detect the state of input port, until the voltage status of input port detected, it is high level, stop metering, the number of times recorded in the process that processing module becomes high level by the state of input port by low level is k;
The state that processing module detects input port is that the voltage status of the check input port that repeats by per interval t realizes.
Preferably, in the present embodiment, high level is designated as to 1, low level is designated as to 0; This step can be specially: when processing module starts metering, the voltage status of the check input port that per interval t repeats, when the voltage of input port is equal to or higher than high-level threshold voltage A, it is 1 that input port is read voltage status now, during lower than high-level threshold voltage A, it is 0 that input port is read voltage status now; Be 1 o'clock until processing module detects the voltage status of input port, stop counting, and the number of times that the state of input port is recorded in 0 process that becomes 1 be k; Be considered as high level when magnitude of voltage surpasses a critical value, during lower than this critical value, be considered as low level, this critical value is called high-level threshold voltage.
S15 ': whether judgement time numerical value k is less than default inferior numerical value n;
To carry out S16;
No, carry out S17; When above-mentioned situation while being no, processing module does not touch the check added up number of times to button add 1 or time of not touching at the check button of accumulative total on add this time and detect button and do not touch the used time, then return and carry out S12;
The method of calculating default inferior numerical value n comprises: in the situation that button does not touch, when the state of output port is low level, processing module starts metering, and the voltage status of the check input port of per interval t repetition, until the voltage status of input port detected, it is high level, stop metering, the number of times recorded in the process that processing module becomes high level by the state of input port by low level is n, and record time numerical value n is as default inferior numerical value;
In the present embodiment, high level is designated as to 1, low level is designated as to 0, the method of the inferior numerical value n that above-mentioned calculating is preset is specially: in the situation that button does not touch, when the output port state is 0, processing module starts metering, and the voltage status of the check input port of per interval t repetition, be 1 until the voltage status of input port detected, stop metering, the number of times that processing module records the state of input port in 0 process that becomes 1 is that n is as default inferior numerical value; Preferably, in the present embodiment, the inferior numerical value n preset can also be carried out to the number of times fine setting in certain scope, and the frequency n after finely tuning is as default inferior numerical value; Default inferior numerical value obtained before touch key-press is detected.
Embodiment 4
Referring to Figure 11, the detection method flow chart of the second touch-key based on Fig. 6 provided for the present embodiment; Specifically comprise the steps:
S21: power on, initialization input mouth and output port;
S22: to output port output high level time delay a period of time, then to the output port output low level;
Preferably, in the present embodiment, high level is designated as to 1, low level is designated as to 0, S22 can also is: write 1 and time delay a period of time to output port, then output port is write to 0;
Preferably, delay time can be 5ms;
S23: the input signal that receives input port;
S24: whether the voltage status that judges the current time input port is high level;
Preferably, in the present embodiment, high level is designated as to 1, low level is designated as to 0, S24 can be: whether the voltage status that judges the current time input port is 1;
If so, carry out S25;
If not, carry out S26;
When above-mentioned situation while being no, processing module does not touch the check added up number of times to button add 1 or time of not touching at the check button of accumulative total on add this time and detect button and do not touch the used time;
When the voltage status of output port becomes low level by high level, processing module starts to detect this moment input port by the voltage status value after the high level saltus step, if the voltage status after the saltus step detected still, for high level, represents that touch key-press has touched; If the voltage status after the saltus step detected is low level, represent that touch key-press does not touch;
Preferably, in the present embodiment, high level is designated as to 1, low level is designated as to 0; This step can be specially: when the voltage status of output port becomes 0 by 1, processing module starts to detect this moment input port by the voltage status value after 1 saltus step, when the voltage of input port is equal to or higher than high-level threshold voltage A, it is 1 that input port is read voltage status now, when the voltage of input port during lower than high-level threshold voltage A, it is 0 that input port will voltage status be now read; If the voltage status after the saltus step that processing module detects is still 1, represent that touch key-press touches; If the voltage status after the saltus step detected is 0, represent that touch key-press does not touch; Be considered as high level when magnitude of voltage surpasses a critical value, during lower than this critical value, be considered as low level, this critical value is called high-level threshold voltage.
S25: return to the state that button has touched, exit;
S26: judgement is consecutively detected number of times or the duration that button do not touch and whether reaches preset value;
Return to time-out information and exit;
No, continue to carry out S22;
Preferably, in above-mentioned S26, judgement is consecutively detected number of times that button do not touch or duration while not reaching preset value, and processing module can also continue to carry out S22 again after time delay a period of time;
In the present embodiment S26, detect after button do not touch, to the number of times that button do not touch being detected, add up, when exceeding pre-determined number, be considered as overtimely, no longer whether button is touched and detected;
Or
Detect after button do not touch at S26, add up the duration that button do not touch being detected, be considered as overtimely when exceeding the scheduled time, no longer whether button is touched and detected.
Embodiment 5
The detection method flow process of the third touch-key based on Fig. 8 that the present embodiment provides, the method flow process is consistent with the step in embodiment 4, at this, does not repeat one by one.
In above-described embodiment 3, embodiment 4 and the described method of embodiment 5, in the time that the output signal of mainly take is one-period, input signal is checked, if learn that by detection touch key-press touches, once success of check, return to the state that button touched and exit operation; If learn that by check touch key-press does not touch, the number of times that judgement check button does not touch or be consecutively detected the time that button do not touch and whether exceed preset value, when not exceeding preset value, continue to detect key-press status, when exceeding preset value, return to time-out information and exit operation.
The above; be only the present invention's embodiment preferably, but protection scope of the present invention is not limited to this, anyly is familiar with in technical scope that those skilled in the art disclose in the present invention; the variation that can expect easily or replacement, within all should being encompassed in protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of claim.

Claims (18)

1. a touch-key, it is characterized in that, by dividing potential drop transport module, processing module and touch key-press module, formed, the first end points of described dividing potential drop transport module is connected with the second end points of described processing module, the second end points of described dividing potential drop transport module is connected with the first end points of described processing module, the 3rd end points of described dividing potential drop transport module is connected with described touch key-press module, the ground termination points ground connection of described processing module;
Wherein, described dividing potential drop transport module, the signal of exporting for the first end points that receives described processing module by described dividing potential drop transport module the second end points, receive by described dividing potential drop transport module the 3rd end points the touch signal that described touch key-press module is transmitted, signal to described dividing potential drop transport module the second end points and the reception of the 3rd end points carries out voltage division processing, and the signal obtained after voltage division processing is exported to the second end points of described processing module by the first end points of described dividing potential drop transport module;
Described processing module, the variation of the signal of exporting for the first end points of controlling described processing module, detect described dividing potential drop transport module and export to the double-pointed signal condition of described processing module; Described processing module is MCU;
Described touch key-press module, for receiving the touch signal of human body, and give described dividing potential drop transport module by described touch signal by the 3rd endpoint transfers of described dividing potential drop transport module, and the first end points of described processing module is output port, the second end points of described processing module is input port;
Described dividing potential drop transport module is comprised of the first electric capacity, the second electric capacity and the first resistance;
Wherein, described the first electric capacity is connected with described the second electric capacity, described the first resistance, the other end of described the first electric capacity is connected with the first end points of described processing module, the other end of described the second electric capacity is connected with the second end points of described processing module, and the other end of described the first resistance is connected with the conductive electrode in described touch key-press module;
Perhaps described dividing potential drop transport module is comprised of the first resistance, the second resistance and the first electric capacity;
Wherein, described the first resistance is connected with described the second resistance, described the first electric capacity, the other end of described the first resistance is connected with the first end points of described processing module, the other end of described the second resistance is connected with the second end points of described processing module, and the other end of described the first electric capacity is connected with the conductive electrode in described touch key-press module.
2. touch-key according to claim 1, it is characterized in that, when described dividing potential drop transport module is comprised of the first electric capacity, the second electric capacity and the first resistance, wherein, the first end points of described MCU is connected with the first electric capacity of described dividing potential drop transport module, and the second end points of described MCU is connected with the second electric capacity of described dividing potential drop transport module.
3. touch-key according to claim 1, it is characterized in that, when described dividing potential drop transport module is comprised of the first resistance, the second resistance and the first electric capacity, wherein, the first end points of described MCU is connected with the first resistance of described dividing potential drop transport module, and the second end points of described MCU is connected with the second resistance of described dividing potential drop transport module.
4. touch-key according to claim 2, is characterized in that, described touch key-press module comprises described conductive electrode;
Wherein, described conductive electrode is connected with the first resistance in described dividing potential drop transport module.
5. touch-key according to claim 3, is characterized in that, described touch key-press module comprises described conductive electrode;
Wherein, described conductive electrode is connected with the first electric capacity in described dividing potential drop transport module.
6. touch-key according to claim 1, it is characterized in that, also comprise the antistatic module, the first end points of described antistatic module is connected with the 4th end points of described dividing potential drop transport module, the second end points of described antistatic module is connected with the 3rd end points of described processing module, the 3rd end points ground connection of described antistatic module;
Wherein, described antistatic module, the interference signal produced for by the described touch key-press module of human body touch the time is exported to the 3rd end points of described processing module by the second end points of described antistatic module.
7. touch-key according to claim 6, is characterized in that, described antistatic module comprises the first diode and the second diode;
When described dividing potential drop transport module is comprised of the first electric capacity, the second electric capacity and the first resistance, wherein, described the first diode and the series connection of the second diode, the negative pole of described the first diode is connected with the 3rd end points of described processing module, the plus earth of described the second diode, the tie point of described the first diode and the second diode is connected with the first electric capacity, the second electric capacity and the first resistance in described dividing potential drop transport module;
The 3rd end points of described processing module connects power supply.
8. touch-key according to claim 6, is characterized in that, described antistatic module comprises the first diode and the second diode;
When described dividing potential drop transport module is comprised of the first resistance, the second resistance and the first electric capacity, wherein, described the first diode and the series connection of the second diode, the negative pole of described the first diode is connected with the 3rd end points of described MCU, the plus earth of described the second diode, the connection end point of described the first diode and the second diode is connected with the first resistance, the second resistance and the first electric capacity in described dividing potential drop transport module;
The 3rd end points of described MCU connects power supply.
9. touch-key according to claim 7, is characterized in that,
The first end points of described MCU is connected with the first electric capacity of described dividing potential drop transport module, and the second end points of described MCU is connected with the second electric capacity of described dividing potential drop transport module, and the 3rd end points of described MCU is connected with the negative pole of the first diode in described antistatic module.
10. touch-key according to claim 8, is characterized in that,
The first end points of described MCU is connected with the first resistance of described dividing potential drop transport module, and the second end points of described MCU is connected with the second resistance of described dividing potential drop transport module, and the 3rd end points of described MCU is connected with the negative pole of the first diode in described antistatic module.
11. touch-key according to claim 9, is characterized in that, described touch key-press module comprises described conductive electrode;
Wherein, described conductive electrode is connected with the first resistance of described dividing potential drop transport module.
12. touch-key according to claim 10, is characterized in that, described touch key-press module comprises described conductive electrode;
Wherein, described conductive electrode is connected with the first electric capacity of described dividing potential drop transport module.
13. the detection method based on the described a kind of touch-key of claim 1-12 is characterized in that comprising:
A. the input port of initialization process module and output port;
B. export high level time delay a period of time to the described output port of processing module, then to described output port output low level;
C. the first end points that receives the dividing potential drop transport module is exported to the input signal of the described input port of processing module;
D. according to the state-detection touch key-press of the described input port of processing module, whether touch;
If so, return to the state that button touched and exit operation;
If not, carry out E;
E. judgement is consecutively detected duration or the number of times that button do not touch and whether has reached default detection time or default detection number of times scope;
If so, return to time-out information and exit operation;
If not, return to B.
14. method according to claim 13, is characterized in that, whether described detection touch key-press touches and comprises:
When the state of described output port is low level, the state that records the described input port of current time becomes the needed delay time of high level by low level;
Judge whether described needed delay time is less than default delay time;
If so, return to the state that button touched and exit operation;
If not, the number of times check added up not touched to button adds 1; Or, do not touch the used time from adding this detection button on the duration do not touched at the check button added up; Carry out E.
15. method according to claim 13, is characterized in that, whether described detection touch key-press touches and comprises:
When the state of described output port is low level, the state that records the described input port of current time becomes the needed scanning times of high level by low level;
Judge whether described needed scanning times is less than default scanning times;
If so, return to the state that button touched and exit operation;
If not, the number of times check added up not touched to button adds 1; Or, add this detection button on the duration do not touched at the check button added up and do not touch the used time; Carry out E.
16. method according to claim 13, is characterized in that, whether described detection touch key-press touches and comprises:
When the state of described output port is low level, judge whether the voltage status of the described input port of current time is high level;
If so, return to the state that button touched and exit operation;
If not, the number of times check added up not touched to button adds 1; Or, do not touch the used time from adding this detection button on the duration do not touched at the check button added up, carry out E.
17. method according to claim 13, is characterized in that, in described E, judgement is consecutively detected duration or the number of times that button do not touch and whether has reached default detection time or default detection number of times scope, comprising:
Add up being consecutively detected number of times or the duration that button do not touch, judge whether to exceed default number of times or the scope of default detection time of detecting;
If exceed default number of times or the scope of default detection time of detecting, return to time-out information and exit;
If do not exceed default number of times or the scope of default detection time of detecting, return to B.
18. method according to claim 13, is characterized in that, if default also do not comprise after detecting number of times or the scope of default detection time in described exceeding:
One section Preset Time of time delay, return to B.
CN 201110317511 2011-10-18 2011-10-18 Touch type key and detection method therefor Expired - Fee Related CN102394624B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201110317511 CN102394624B (en) 2011-10-18 2011-10-18 Touch type key and detection method therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201110317511 CN102394624B (en) 2011-10-18 2011-10-18 Touch type key and detection method therefor

Publications (2)

Publication Number Publication Date
CN102394624A CN102394624A (en) 2012-03-28
CN102394624B true CN102394624B (en) 2013-12-25

Family

ID=45861837

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201110317511 Expired - Fee Related CN102394624B (en) 2011-10-18 2011-10-18 Touch type key and detection method therefor

Country Status (1)

Country Link
CN (1) CN102394624B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111162768B (en) * 2018-11-07 2023-01-31 台达电子工业股份有限公司 Control device and method
CN111103488A (en) * 2019-12-25 2020-05-05 心核心科技(北京)有限公司 Touch detection circuit, touch sensor and ring receiver
CN112311071B (en) * 2020-01-17 2023-01-03 长城汽车股份有限公司 Method and device for protecting battery pack of hybrid vehicle
CN111600589A (en) * 2020-05-09 2020-08-28 深圳市火乐科技发展有限公司 Antistatic circuit and electronic device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2938638Y (en) * 2006-08-09 2007-08-22 海信集团有限公司 Anti-static circuit and TV. set with the anti-static circuit
CN101499794A (en) * 2008-01-31 2009-08-05 杭州利尔达科技有限公司 Capacitor induction type touch press-key and measuring method for touch press-key capacitor
CN201577081U (en) * 2009-12-18 2010-09-08 宁波舜韵电子有限公司 Capacitive touch induction key circuit
CN201846330U (en) * 2010-11-02 2011-05-25 惠州市德赛工业发展有限公司 Touch key control circuit

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2451352A (en) * 2007-07-26 2009-01-28 Qrg Ltd Proximity sensor with an automatic switch-off function

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2938638Y (en) * 2006-08-09 2007-08-22 海信集团有限公司 Anti-static circuit and TV. set with the anti-static circuit
CN101499794A (en) * 2008-01-31 2009-08-05 杭州利尔达科技有限公司 Capacitor induction type touch press-key and measuring method for touch press-key capacitor
CN201577081U (en) * 2009-12-18 2010-09-08 宁波舜韵电子有限公司 Capacitive touch induction key circuit
CN201846330U (en) * 2010-11-02 2011-05-25 惠州市德赛工业发展有限公司 Touch key control circuit

Also Published As

Publication number Publication date
CN102394624A (en) 2012-03-28

Similar Documents

Publication Publication Date Title
CN103713784B (en) Capacitance touch testing circuit, device and anti-spot thereof cause knows method for distinguishing by mistake
CN103049159B (en) Method for preventing water drop false triggering of capacitive touch screen
CN102394624B (en) Touch type key and detection method therefor
CN102522975B (en) Adaptive-environmental touch key circuit and key touch detection method
CN102902393B (en) Detecting electrode Array Control Circuit, control method and touch detection system thereof
CN104794433A (en) Fingerprint recognition system and fingerprint recognition method
CN105531654A (en) Injected touch noise analysis
CN102681677B (en) For time writer and the pressure sensitivity control method thereof of electronic whiteboard
CN101685364B (en) Device and method for sensing touch panel
CN100550634C (en) A kind of control board transducer and display device
CN101799734A (en) Key detection method of capacitive touch screen
CN101963865B (en) Touch identification method, touch key structure and touch device
CN101598986B (en) Touch detection device capable of saving power source consumption
CN104156088A (en) Active capacitance pen and touch control device
US20060294523A1 (en) Touch wake for electronic devices
CN103543344B (en) A kind of method solving capacitance plate inefficacy and capacitance plate abnormity detecting circuit
CN103984422A (en) Capacitance pen, capacitance touch panel and touch device
CN102185604A (en) Differential detection circuit for capacitive touch
CN101626246A (en) Touch-control method and touch-control device
CN102346607B (en) Touch control sensing circuit and method
CN105306038A (en) Capacitive sensing touch control key and key judging method thereof
CN204697033U (en) System reset circuit and electronic equipment
CN101106367A (en) Double frequency generator
CN102147689A (en) Method for detecting resistive touch panel
CN209330091U (en) A kind of detected device of anti-stop signal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20131225

CF01 Termination of patent right due to non-payment of annual fee