CN107579733A - A kind of key circuit and key device - Google Patents

A kind of key circuit and key device Download PDF

Info

Publication number
CN107579733A
CN107579733A CN201710698716.7A CN201710698716A CN107579733A CN 107579733 A CN107579733 A CN 107579733A CN 201710698716 A CN201710698716 A CN 201710698716A CN 107579733 A CN107579733 A CN 107579733A
Authority
CN
China
Prior art keywords
key
module
input
push
button
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.)
Pending
Application number
CN201710698716.7A
Other languages
Chinese (zh)
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.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology 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 Beijing Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201710698716.7A priority Critical patent/CN107579733A/en
Publication of CN107579733A publication Critical patent/CN107579733A/en
Pending legal-status Critical Current

Links

Landscapes

  • Input From Keyboards Or The Like (AREA)

Abstract

The embodiments of the invention provide a kind of key circuit and key device, wherein described key circuit includes power module, key-press module, ADC and signal control module, key-press module includes input and earth terminal, the input of key-press module is connected with the input of power module and ADC, earth terminal is connected to ground, the output end of ADC is connected with the input port of signal control module, and key-press module includes at least one push-button unit;When at least one push-button unit is triggered, the input of ADC reads the voltage of the input of key-press module, and is converted to push button signalling and exports to signal control module, and signal control module is according to push button signalling output control signal.Because key-press module includes at least one push-button unit, and ADC is connected a port for only taking up signal control module with signal control module, functions of multiple keys can be realized by a port, the port for saving signal control module uses, circuit design is simplified, reduces cost.

Description

A kind of key circuit and key device
Technical field
The present invention relates to button technical field, more particularly to a kind of key circuit and key device.
Background technology
With the development of electronic technology, the button on electronic equipment is used to operate electronic equipment operation, as people and electronics One of interface of equipment interaction has vital effect.
In LINUX and ROTS systems, typically one by one GPIO port of key connection to realize by bond energy, to realize , it is necessary to carry out row and column scanning using multiple GPIO ports to identify the button being triggered in multiple buttons during functions of multiple keys, And need to increase the signal that extended chip identifies multiple GPIO, so need multiple GPIO ports, add the complexity of circuit The design area of degree and PCB, while cause LINUX and the increase of ROTS development costs.
The content of the invention
In view of the above problems, it is proposed that the present invention so as to provide one kind overcome above mentioned problem or at least in part solve on State a kind of key circuit and key device of problem.
The invention provides a kind of key circuit, including power module, key-press module, ADC and signal control module, The key-press module includes input and earth terminal, and the input of the key-press module is connected with the power module, described to connect Ground terminal is connected to ground, and the input of the ADC is connected with the input of the key-press module, the output of the ADC End is connected with the input port of the signal control module, wherein, the key-press module includes at least one push-button unit;
When at least one push-button unit is triggered, the input of the ADC reads the defeated of the key-press module Enter the voltage at end, and be converted to push button signalling and export to the signal control module, the signal control module and pressed according to Key signals output control signal.
Alternatively, at least one push-button unit is parallel to the input of the key-press module and the key-press module Earth terminal.
Alternatively, at least one push-button unit includes the button resistance and key switch of a series connection.
Alternatively, the button resistance of each push-button unit is connected with the input of the key-press module, each button The key switch of unit is connected with the earth terminal of the key-press module, or, the button resistance of each push-button unit and institute The earth terminal connection of key-press module is stated, the key switch of each push-button unit is connected with the input of the key-press module.
Alternatively, the first divider resistance is provided between the input of the power module and the key-press module.
Alternatively, the second divider resistance is provided between the output end of the ADC and the key-press module.
Alternatively, the key circuit also includes circuit protection module, described circuit protection module one end and the ADC moulds The input port connection of block, the other end are connected with the earth terminal of the key-press module.
Alternatively, the circuit protection module includes diode and electric capacity in parallel.
Alternatively, the signal control module is GPIO or the chip comprising GPIO.
The invention provides a kind of key device, the key device includes key circuit provided in an embodiment of the present invention.
The key circuit of the embodiment of the present invention, including power module, key-press module, ADC and signal control module, are pressed Key module includes input and earth terminal, and the input of key-press module is connected with the input of power module and ADC, ground connection End is connected to ground, and the output end of ADC is connected with the input port of signal control module, wherein, key-press module is included at least One push-button unit;When at least one push-button unit is triggered, the input of ADC reads the electricity of the input of key-press module Pressure, and be converted to push button signalling and export to signal control module, signal control module is according to push button signalling output control signal.By Include at least one push-button unit in key-press module, and ADC is connected with signal control module and only takes up signal control module A port, functions of multiple keys can be realized by a port, save signal control module port use, simplify Circuit design, reduce cost.
Brief description of the drawings
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below by institute in the description to the embodiment of the present invention The accompanying drawing needed to use is briefly described, it should be apparent that, drawings in the following description are only some implementations of the present invention Example, for those of ordinary skill in the art, without having to pay creative labor, can also be according to these accompanying drawings Obtain other accompanying drawings.
Fig. 1 shows a kind of module diagram of key circuit of the embodiment of the present invention;
Fig. 2 shows the circuit theory diagrams of key-press module in a kind of key circuit of the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is part of the embodiment of the present invention, rather than whole embodiments.Based on this hair Embodiment in bright, the every other implementation that those of ordinary skill in the art are obtained under the premise of creative work is not made Example, belongs to the scope of protection of the invention.
Fig. 1 is a kind of module diagram of key circuit of the embodiment of the present invention.
As shown in figure 1, a kind of key circuit of the embodiment of the present invention, including power module 1, key-press module 2, ADC 3 With signal control module 4.
Power module 1 can provide stable operating voltage for whole key circuit, common, and its voltage provided is straight Flow voltage.The voltage that power module 1 provides can be 3.3V, naturally it is also possible to it is the voltage of other specifications, the embodiment of the present invention It is without limitation.
Key-press module 2 can be provided with the circuit of at least one push-button unit, when the push-button unit quilt in key-press module 2 During triggering, key-press module 2 produces pressure drop in the voltage for the input being connected with power module 1, i.e., different push-button units is touched Hair, the pressure drop of the input of key-press module 2 are different.
ADC 3 can export different digital signal according to the size of input voltage value.
Signal control module 4, according to default program, can generate different control letters according to the data signal of input Number, with the operation of control system, for example, when data-signal indicates to shut down, signal control module 4 can generate disconnection system electricity The signal in source is with the system closedown of control electronics.
In the embodiment of the present invention, key-press module 2 includes input and earth terminal, input and the power supply mould of key-press module 2 Block 1 connects, and to obtain stable operating voltage from power module 1, the input of key-press module 2 connects with the input of ADC 3 Connect, the earth terminal of key-press module 2 is connected to ground, and the output end of ADC 3 is connected with the input port of signal control module 4.
Wherein, key-press module 2 includes at least one push-button unit, when the push-button unit in key-press module 2 is triggered, by It is grounded in the earth terminal of key-press module 2, produces pressure drop in the input of key-press module 2, be connected with the input of key-press module 2 ADC gathers the magnitude of voltage of the input, and ADC 3 is converted to push button signalling and exported to signal according to the magnitude of voltage of input Control module 4, signal control module 4 is according to the operation of the output control signal control system of push button signalling 4.
In the embodiment of the present invention, signal control module 4 can be GPIO (General Purpose Input Output, Universal input/output) or chip comprising GPIO.When microcontroller or chipset do not have enough I/O ports, or work as system When needing using distal end serial communication or control, GPIO can provide extra control and function for monitoring port, specific to this hair In bright embodiment, ADC 3 can connect the GPIO of signal control module 4 a port, will be different in key-press module 2 Signal caused by push-button unit is inputted into chip by a GPIO port, and press is realized by a GPIO port to realize more Key function.
Fig. 2 be the embodiment of the present invention a kind of key circuit in key-press module circuit theory diagrams.
As shown in Fig. 2 key-press module 2 comprises at least a push-button unit 21, push-button unit is parallel to the defeated of key-press module 2 Enter to hold between A and the earth terminal B of key-press module 2.
In actual applications, the quantity of push-button unit 21 can be set according to actual conditions, such as according to power supply mould Performance of operating voltage, the precision of the collection voltages value of ADC and signal control module that block 1 provides etc. determines.
As shown in Fig. 2 push-button unit 21 can include the button resistance and key switch of a series connection, push-button unit 21 is pressed Key resistance is connected with the input A of key-press module 2, and the key switch of push-button unit 21 is connected with the earth terminal of key-press module 2.
It is of course also possible to be that the button resistance of push-button unit 21 is connected with the earth terminal B of key-press module 2, push-button unit 21 Key switch be connected with the input A of key-press module 2.
In Fig. 2, key-press module 2 can include four push-button units 21, three button lists in four push-button units 21 Member respectively can be by button resistance R59 and key switch S4, button resistance R58 and key switch S3, button resistance R16 and button S2 compositions are switched, another push-button unit 21 directly can be made up of key switch S1.
In embodiments of the present invention, the resistance value of the button resistance of each push-button unit 21 can differ, and be Precision resister, such as the error range of resistance value can be 1%.
In actual applications, key switch (S1, S2, S3 and S4) can be corner key switch, corner key switch ratio Common key-press switch is more sane and durable.
In order to avoid key switch contact due to electric current it is excessive, connect moment cause ablation, power module 1 and button The first divider resistance 6 is provided between the input A of module 2.
As shown in Fig. 2 in order to avoid excessive by the electric current of the push-button unit 21 in key-press module 2, key-press module 2 it is defeated Enter to hold the voltage request between A and earth terminal B smaller, first partial pressure can be connected between input A and power module 1 Resistance 6, if the resistance R62 in Fig. 2 is the first divider resistance, resistance R62 resistance value is generally bigger, for example, can be by 1-3 times of button resistance in key unit 21, it is preferable that the first divider resistance 6 is precision resister, such as the error model of resistance value Enclosing can be 1%.
Alternatively, it is excessive in order to avoid inputting the voltage of ADC 3, between ADC 3 and the input of key-press module The second divider resistance 7 is provided with, input is reduced to the voltage of ADC 3 with further.
Preferably, the key circuit of the embodiment of the present invention can also include circuit protection module 5, circuit protection module 5 One end is connected with the input port of ADC 3, and the other end is connected with the earth terminal B of key-press module 2.
As shown in Fig. 2 the circuit protection module 5 of the embodiment of the present invention includes diode and electric capacity in parallel, diode ESD8, the second divider resistance 7 and electric capacity C6 are used for protection circuit structure, and electric capacity C6 is additionally operable to filter out Alternating Component.Second partial pressure Resistance 7 and electric capacity C6 value those skilled in the art choose as needed, and general second divider resistance 7 can be chosen for 1K Ω, electric capacity C6 are chosen for 220pF, naturally it is also possible to select other specifications, the embodiment of the present invention is without limitation.
For the clearer explanation embodiment of the present invention, illustrated below by way of an example combination Fig. 2:
As illustrated in fig. 2, it is assumed that:
The operating voltage that power module 1 provides is 3.3V;
The resistance R62=165K Ω of first divider resistance 6;
The button resistance R16=29.4K Ω being connected with key switch S2;
The button resistance R58=71.5K Ω being connected with key switch S3;
The button resistance R59=137K Ω being connected with key switch S4.
When key switch S1 is pressed, because key switch S1 does not connect button resistance, then input A directly with ground connection End connection, input A voltage is 0V;
When key switch S2 is pressed, input A voltage is:
3.3V × R16/ (R16+R62)=3.3 × 29.4/ (29.4+165)=0.5V;
Similarly, when key switch S3 is pressed, input A voltage is:
3.3V × R58/ (R58+R62)=3.3 × 29.4/ (71.5+165)=1.0V;
When key switch S4 is pressed, input A voltage is:
3.3V × R59/ (R59+R62)=3.3 × 137/ (137+165)=1.5V.
It is as shown in the table, it is input A voltage range corresponding to each button and actual test result in Fig. 2:
Button Voltage range (V) The test values of Sample 1 (V) The test values of Sample 2 (V)
S1 0.0±0.2 0.00 0.00
S2 0.5±0.2 0.54 0.54
S3 1.0±0.2 1.06 1.05
S4 1.5±0.2 1.55 1.56
Input A voltage range when being triggered in upper table there is provided the key switch of each push-button unit, and pass through two Individual sample is tested, and as a result shows that magnitude of voltage that ADC 3 collects close to theoretical calculation magnitude of voltage, can be used as steady Fixed push button signalling is inputted to GPIO port or in the chip including GPIO port, is realized with realizing by a GPIO port The function of four buttons, without multiple GPIO ports, system port is saved, simplifies circuit design, reduces system cost.
In the embodiment of the present invention, key-press module includes at least one push-button unit;When at least one push-button unit is triggered, The input of ADC reads the voltage of the input of key-press module, and is converted to push button signalling and exports to signal control module, Signal control module is according to push button signalling output control signal.Because key-press module includes at least one push-button unit, and ADC moulds Block is connected a port for only taking up signal control module with signal control module, and more button work(can be realized by a port Can, the port for saving signal control module uses, and simplifies circuit design, reduces cost.
The embodiment of the present invention additionally provides a kind of key device, and the key device includes provided in an embodiment of the present invention press Key circuit.
Although having been described for the preferred embodiment of the embodiment of the present invention, those skilled in the art once know base This creative concept, then other change and modification can be made to these embodiments.So appended claims are intended to be construed to Including preferred embodiment and fall into having altered and changing for range of embodiment of the invention.
Finally, it is to be noted that, herein, term " comprising ", "comprising" or its any other variant are intended to Cover including for nonexcludability, so that process, method, article or terminal device including a series of elements not only include Those key elements, but also the other element including being not expressly set out, or also include for this process, method, article or The intrinsic key element of person's terminal device.In the absence of more restrictions, the key element limited by sentence "including a ...", It is not precluded from other identical element in the process including the key element, method, article or terminal device being also present.
The foregoing is only a specific embodiment of the invention, but protection scope of the present invention is not limited thereto, any Those familiar with the art the invention discloses technical scope in, change or replacement can be readily occurred in, should all be contained Cover within protection scope of the present invention.Therefore, protection scope of the present invention should be defined by scope of the claims.

Claims (10)

1. a kind of key circuit, it is characterised in that including power module, key-press module, ADC and signal control module, institute Stating key-press module includes input and earth terminal, and the input of the key-press module is connected with the power module, the ground connection End is connected to ground, and the input of the ADC is connected with the input of the key-press module, the output end of the ADC It is connected with the input port of the signal control module, wherein, the key-press module includes at least one push-button unit;
When at least one push-button unit is triggered, the input of the ADC reads the input of the key-press module Voltage, and be converted to push button signalling and export to the signal control module, the signal control module and believed according to the button Number output control signal.
2. key circuit according to claim 1, it is characterised in that at least one push-button unit be parallel to it is described by The earth terminal of the input of key module and the key-press module.
3. key circuit according to claim 1 or 2, it is characterised in that at least one push-button unit includes a string The button resistance and key switch of connection.
4. key circuit according to claim 3, it is characterised in that the button resistance of each push-button unit and the button The input connection of module, the key switch of each push-button unit are connected with the earth terminal of the key-press module, or, institute The button resistance for stating each push-button unit is connected with the earth terminal of the key-press module, the key switch of each push-button unit It is connected with the input of the key-press module.
5. according to the key circuit described in claim 1 or 2 or 4 or 4, it is characterised in that the power module and the button The first divider resistance is provided between the input of module.
6. key circuit according to claim 5, it is characterised in that the output of the ADC and the key-press module The second divider resistance is provided between end.
7. key circuit according to claim 6, it is characterised in that also including circuit protection module, the circuit protection Module one end is connected with the input port of the ADC, and the other end is connected with the earth terminal of the key-press module.
8. key circuit according to claim 7, it is characterised in that the circuit protection module includes diode in parallel And electric capacity.
9. according to the key circuit described in claim 1 or 2 or 4 or 6 or 7 or 8, it is characterised in that the signal control module Chip for GPIO or comprising GPIO.
10. a kind of key device, it is characterised in that the key device includes the button electricity as described in claim 1 to 9 is any Road.
CN201710698716.7A 2017-08-15 2017-08-15 A kind of key circuit and key device Pending CN107579733A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710698716.7A CN107579733A (en) 2017-08-15 2017-08-15 A kind of key circuit and key device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710698716.7A CN107579733A (en) 2017-08-15 2017-08-15 A kind of key circuit and key device

Publications (1)

Publication Number Publication Date
CN107579733A true CN107579733A (en) 2018-01-12

Family

ID=61034502

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710698716.7A Pending CN107579733A (en) 2017-08-15 2017-08-15 A kind of key circuit and key device

Country Status (1)

Country Link
CN (1) CN107579733A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201859203U (en) * 2010-11-03 2011-06-08 中航华东光电有限公司 Key detection circuit of a singlechip or microprocessor with an analog-digital converter
CN203457140U (en) * 2013-07-30 2014-02-26 宁波大学 A circuit structure using a single IO port to expand a plurality of buttons
CN103686010A (en) * 2013-11-22 2014-03-26 乐视致新电子科技(天津)有限公司 ADC port simulation multi-IO-port key input device, television-system and method
CN103795423A (en) * 2012-10-29 2014-05-14 苏州工业园区新宏博通讯科技有限公司 Circuit with multiple buttons controlled by single-I/O-port
CN203984397U (en) * 2014-07-04 2014-12-03 深圳市普兰电子技术有限公司 A kind of calibration circuit of new A DC key scanning circuit

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201859203U (en) * 2010-11-03 2011-06-08 中航华东光电有限公司 Key detection circuit of a singlechip or microprocessor with an analog-digital converter
CN103795423A (en) * 2012-10-29 2014-05-14 苏州工业园区新宏博通讯科技有限公司 Circuit with multiple buttons controlled by single-I/O-port
CN203457140U (en) * 2013-07-30 2014-02-26 宁波大学 A circuit structure using a single IO port to expand a plurality of buttons
CN103686010A (en) * 2013-11-22 2014-03-26 乐视致新电子科技(天津)有限公司 ADC port simulation multi-IO-port key input device, television-system and method
CN203984397U (en) * 2014-07-04 2014-12-03 深圳市普兰电子技术有限公司 A kind of calibration circuit of new A DC key scanning circuit

Similar Documents

Publication Publication Date Title
CN105510763A (en) Integrated circuit pin testing device
CN102981688B (en) A kind of five line resistance screen control circuits
CN102594362A (en) Key circuit based on analog-digital conversion
CN109726059A (en) A kind of server test system
CN106685007A (en) Power supply control circuit for peripheral equipment, power supply method and mobile terminal
CN103684407A (en) Otg device
CN107168452B (en) A kind of key-press input processing circuit
US20130275632A1 (en) Key detection circuit
CN107579733A (en) A kind of key circuit and key device
CN205910520U (en) Power control chip and be provided with electronic equipment of this chip
CN103095308B (en) I/O interface circuit and comprise key scan device and the scan method of this circuit
CN102857231B (en) A kind of key press detecting circuit
CN209215905U (en) Zero-power-consumption standby wake-up circuit and electrical equipment
CN109814437A (en) Zero-power-consumption standby wake-up circuit and electrical equipment
CN215526397U (en) Wake-up circuit of controller and electronic equipment
CN206595773U (en) A kind of isolation switch position remote monitoring device
CN206237186U (en) Electronic cigarette and its power supply architecture
CN104125173A (en) Data communication route switching circuit, vehicle-mounted router and automobile
CN204442329U (en) A kind of mechanical switch remote-control module and intelligent switch
CN208805695U (en) Terminal start control circuit and data collection station
CN101241396A (en) Keyboard capable of locking key
CN209731211U (en) More level converters and converting system
CN102745562A (en) Elevator calling and registering system and elevator
CN111725893A (en) Embedded power health detection and management system
CN201051243Y (en) Key control circuit

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20180112

RJ01 Rejection of invention patent application after publication