CN207304526U - A kind of single I/O port detects the control circuit of three buttons - Google Patents
A kind of single I/O port detects the control circuit of three buttons Download PDFInfo
- Publication number
- CN207304526U CN207304526U CN201721386410.XU CN201721386410U CN207304526U CN 207304526 U CN207304526 U CN 207304526U CN 201721386410 U CN201721386410 U CN 201721386410U CN 207304526 U CN207304526 U CN 207304526U
- Authority
- CN
- China
- Prior art keywords
- resistance
- port
- button
- buttons
- control circuit
- 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.)
- Active
Links
Landscapes
- Push-Button Switches (AREA)
Abstract
The utility model provides the control circuit that a kind of single I/O port detects three buttons, including resistance R1, resistance R2, resistance R3, resistance R4, button S1, button S2, button S3 and I/O port.Single I/O port provided by the utility model detects the control circuit of three buttons, by using the I/O port with A/D conversion functions, 4 resistance are connected in series between power supply and ground wire, and three buttons are connected to different positions, when the different buttons is pressed, the voltage value that I/O port collects is different, and then can interpolate that it is which button is pressed.The single I/O port provided using the utility model embodiment detects the control circuit of three buttons, is the detection that three buttons can be achieved using an I/O port, has saved the use of I/O port, reduced the production cost of small household electrical appliance.
Description
Technical field
Electronic technology field is the utility model is related to, more particularly to a kind of single I/O port detects the control electricity of three buttons
Road.
Background technology
The single I/O port of existing small household appliances detects the control circuit of three buttons, a button directly with microcontroller one
A I/O port connects (i.e. man-to-man connection mode), and the control circuit that this single I/O port detects three buttons is simply direct,
But since a button needs an I/O port of exclusive microcontroller, when button is more, it is necessary to it is more to take microcontroller
I/O port, as shown in Figure 1, KEY1, KEY2, KEY3 connect an I/O port of microcontroller respectively, and IO will open internal pull-up function.
Due to microcontroller design when port number be often designed it is extremely limited so that these I/O ports few in number are being used for
After the functions such as collection of simulant signal, signal output, it is difficult to remaining sufficient amount of I/O port, to realize button detection input
Function;And replace the microcontroller of bigger encapsulation, then it can increase the cost of product.
Utility model content
To solve the above-mentioned deficiency mentioned in the prior art, the utility model provides a kind of single I/O port detection three and presses
The control circuit of key, including resistance R1, resistance R2, resistance R3, resistance R4, button S1, button S2, button S3 and I/O port;
The resistance R1, resistance R2 and resistance R3 are sequentially connected in series;One end connection+5V direct currents of the resistance R1
Source, the other end of the resistance R1 connect the resistance R2;The common port of the resistance R1 and resistance R2 pass through the button S1
Connect the I0 ports;One end of the resistance R3 passes through the button S3 connections I/O port;The resistance R3's is another
End connects the resistance R2;The resistance R2 connects the I/O port with the common port of resistance R3 by button S2;The IO ends
Mouth passes through the resistance R4 connections ground wire;The resistance R1, resistance R2, the resistance value of resistance R3 and resistance R4 are identical;It is described
I/O port is the microcontroller I/O port with A/D conversion functions.
Further, the resistance value of the resistance R1, resistance R2, resistance R3 and resistance R4 are 510 Ω.
Further, the button S1, button S2 and button S3 are touch key.
Further, resistance R5 and capacitance C1 are further included;The resistance R5 and capacitance C1 connects institute after being connected in parallel
I/O port is stated to ground wire.
Further, the capacitance of the capacitance C1 is 0.1 μ F;The resistance value of the resistance R5 is 2M Ω.
Single I/O port provided by the utility model detects the control circuit of three buttons, is changed by using with A/D
The I/O port of function, is connected in series 4 resistance between power supply and ground wire, and three buttons are connected to different positions, make difference
Button when being pressed, the voltage value that I/O port collects is different, and then can interpolate that it is which button is pressed.Using this
The single I/O port that utility model embodiment provides detects the control circuit of three buttons, and three are can be achieved using an I/O port
The detection of a button, has saved the use of I/O port, reduces the production cost of small household electrical appliance.
Brief description of the drawings
In order to illustrate the embodiment of the utility model or the technical proposal in the existing technology more clearly, below will be to embodiment
Or attached drawing needed to be used in the description of the prior art is briefly described, it should be apparent that, drawings in the following description are
Some embodiments of the utility model, for those of ordinary skill in the art, in the premise of not making the creative labor property
Under, other attached drawings can also be obtained according to these attached drawings.
Fig. 1 is the schematic diagram of existing key scanning circuit;
Fig. 2 is the schematic diagram for the control circuit that single I/O port provided by the utility model detects three buttons;
Fig. 3 provides the schematic diagram of another embodiment for the utility model.
Reference numeral:
The 3rd node of 10 first node, 20 section point 30
Embodiment
It is new below in conjunction with this practicality to make the purpose, technical scheme and advantage of the utility model embodiment clearer
Attached drawing in type embodiment, the technical scheme in the utility model embodiment is clearly and completely described, it is clear that is retouched
The embodiment stated is the utility model part of the embodiment, instead of all the embodiments.Based on the implementation in the utility model
Example, those of ordinary skill in the art's all other embodiments obtained without creative efforts, belongs to
The scope of the utility model protection.
, it is necessary to which explanation, term as used herein are only for description particular implementation in the description of the utility model
The purpose of mode, is not intended to limit Example embodiments.As used herein, singulative is also intended to including plural form, is removed
Non- context otherwise clearly shows that.It will also be understood that when used herein, described in term "comprising", " comprising " expression
Feature, entirety, step, operation, the presence of element and/or component, and be not excluded for one or more of the other feature, entirety, step,
Operation, element, component and/or its presence or addition for organizing.Similar word and the non-limiting and physics such as " connection " or " connected "
Or the connection of machinery, but electrical connection can be included, it is either directly or indirect.
Fig. 2 is the principle that a kind of single I/O port that the utility model embodiment provides detects the control circuit of three buttons
Figure;As shown in Fig. 2, single I/O port detect three buttons control circuit include resistance R1, resistance R2, resistance R3, resistance R4,
Button S1, button S2, button S3 and I/O port;
The resistance R1, resistance R2 and resistance R3 are sequentially connected in series;One end connection+5V direct currents of the resistance R1
Source, the other end of the resistance R1 connect the resistance R2;The common port of the resistance R1 and resistance R2 pass through the button S1
Connect the I/O port;One end of the resistance R3 passes through the button S3 connections I/O port;The resistance R3's is another
End connects the resistance R2;The resistance R2 connects the I/O port with the common port of resistance R3 by button S2;The IO ends
Mouth passes through the resistance R4 connections ground wire;The resistance R1, resistance R2, the resistance value of resistance R3 and resistance R4 are identical;It is described
I/O port is the microcontroller I/O port with A/D conversion functions.
When it is implemented, as shown in Fig. 2, the single I/O port that the utility model embodiment provides detects the control of three buttons
Resistance R1, resistance R2 and resistance R3 are sequentially connected in series in circuit processed, and resistance R1, resistance R2 are identical with the resistance value of resistance R3;
The common port of one end connection+5V DC power supplies of resistance R1, resistance R1 and resistance R2 are first node, resistance R2 and resistance R3's
Common port is section point, and the other end of resistance R3 is the 3rd node, and button S1 connection first nodes to I/O port, button S2 connect
Section point to I/O port, the 3rd node of button S3 connections to I/O port, I/O port is connect by resistance R4 with ground wire to be connected.
When pushing button S1 ,+5V DC power supplies connect ground wire by resistance R1 with resistance R4, at this time at first node
Magnitude of voltage+5/2V, for I/O port by button S1 connection first nodes, the magnitude of voltage that I/O port detects is+5/2V;When press by
During key S2 ,+5V DC power supplies are by resistance R1, resistance R2 and resistance R4 connection ground wires, the magnitude of voltage at section point at this time
For+5/3V, I/O port is by button S2 connection section points, the magnitude of voltage+5/3V that I/O port detects;When pushing button S3
When ,+5V DC power supplies are by resistance R1, resistance R2, resistance R3 and resistance R4 connection ground wires, the voltage at the 3rd node at this time
It is worth for+5/4V, I/O port is by the 3rd node of button S3 connections, the magnitude of voltage+5/4V that I/O port detects;I/O port be with
The microcontroller I/O port of A/D conversion functions, the magnitude of voltage for the different numerical value that microcontroller is detected according to I/O port, you can judgement is pressed
Which of key S1, button S2 or button S3 are pressed.
The single I/O port that the utility model embodiment provides detects the control circuit of three buttons, by using with A/
The I/O port of D conversion functions, is connected in series 4 resistance between power supply and ground wire, and three buttons are connected to different positions
Put, when the different buttons is pressed, the voltage value that I/O port collects is different, and then can interpolate that be which button by by
Under.The single I/O port provided using the utility model embodiment detects the control circuit of three buttons, uses an I/O port
The detection of three buttons can be achieved, saved the use of I/O port, reduced the production cost of small household electrical appliance.
Preferably, the resistance value of the resistance R1, resistance R2, resistance R3 and resistance R4 are 510 Ω.Specific implementation
When, resistance R1, resistance R2, resistance R3 and resistance R4 use resistance value as 510 Ω, the resistance of model 0805, reduce resistance
The space of circuit board is taken, further reduces production cost.
Preferably, the button S1, button S2 and button S3 are touch key.
Preferably, resistance R5 and capacitance C1 are further included;After the resistance R5 and capacitance C1 is connected in parallel described in connection
I/O port is to ground wire.
Preferably, the capacitance of the capacitance C1 is 0.1 μ F;The resistance value of the resistance R5 is 2M Ω.
When it is implemented, as shown in figure 3, capacitance C1 is also associated between I/O port and ground wire, at capacitance C1 both ends also
It is connected in parallel to resistance R5;The capacitance of capacitance C1 is 0.1 μ F;The resistance value of resistance R5 is 2M Ω, by the charging of capacitance and
The function of electric discharge, can effectively reduce the voltage dithering as caused by key pressing, and then improve accuracy when button judges.
Although more herein used the terms such as resistance, capacitance, button, I/O port, node, it is not precluded from
Use the possibility of other terms.The use of these items is only for more easily describe and explain the sheet of the utility model
Matter;It is contrary to the spirit of the present invention to interpret them as any one of the additional limitations.
Finally it should be noted that:Various embodiments above is only to illustrate the technical solution of the utility model, rather than it is limited
System;Although the utility model is described in detail with reference to foregoing embodiments, those of ordinary skill in the art should
Understand:It can still modify the technical solution described in foregoing embodiments, either to which part or whole
Technical characteristic carries out equivalent substitution;And these modifications or replacement, the essence of appropriate technical solution is departed from this practicality newly
The scope of each embodiment technical solution of type.
Claims (5)
1. a kind of single I/O port detects the control circuit of three buttons, it is characterised in that:Including resistance R1, resistance R2, resistance
R3, resistance R4, button S1, button S2, button S3 and I/O port;
The resistance R1, resistance R2 and resistance R3 are sequentially connected in series;One end connection+5V DC power supplies of the resistance R1, institute
The other end for stating resistance R1 connects the resistance R2;The resistance R1 connects institute with the common port of resistance R2 by the button S1
State I/O port;One end of the resistance R3 passes through the button S3 connections I/O port;The other end connection of the resistance R3
The resistance R2;The resistance R2 connects the I/O port with the common port of resistance R3 by button S2;The I/O port passes through
The resistance R4 connections ground wire;The resistance R1, resistance R2, the resistance value of resistance R3 and resistance R4 are identical;The I/O port
For the microcontroller I/O port with A/D conversion functions.
2. single I/O port detects the control circuit of three buttons according to claim 1, it is characterised in that:The resistance
R1, resistance R2, the resistance value of resistance R3 and resistance R4 are 510 Ω.
3. single I/O port detects the control circuit of three buttons according to claim 1, it is characterised in that:The button
S1, button S2 and button S3 are touch key.
4. single I/O port detects the control circuit of three buttons according to claim 1, it is characterised in that:Further include resistance
R5 and capacitance C1;The resistance R5 and capacitance C1 connects the I/O port to ground wire after being connected in parallel.
5. single I/O port detects the control circuit of three buttons according to claim 4, it is characterised in that:The capacitance C1
Capacitance be 0.1 μ F;The resistance value of the resistance R5 is 2M Ω.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201721386410.XU CN207304526U (en) | 2017-10-25 | 2017-10-25 | A kind of single I/O port detects the control circuit of three buttons |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201721386410.XU CN207304526U (en) | 2017-10-25 | 2017-10-25 | A kind of single I/O port detects the control circuit of three buttons |
Publications (1)
Publication Number | Publication Date |
---|---|
CN207304526U true CN207304526U (en) | 2018-05-01 |
Family
ID=62272402
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201721386410.XU Active CN207304526U (en) | 2017-10-25 | 2017-10-25 | A kind of single I/O port detects the control circuit of three buttons |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN207304526U (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109901062A (en) * | 2019-02-22 | 2019-06-18 | 山东欧德利电气设备有限公司 | A kind of circuit for realizing key detection by MCU controller |
CN111817707A (en) * | 2020-07-28 | 2020-10-23 | 深圳大趋智能科技有限公司 | Method and device for realizing multiple key functions by using single IO |
-
2017
- 2017-10-25 CN CN201721386410.XU patent/CN207304526U/en active Active
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109901062A (en) * | 2019-02-22 | 2019-06-18 | 山东欧德利电气设备有限公司 | A kind of circuit for realizing key detection by MCU controller |
CN111817707A (en) * | 2020-07-28 | 2020-10-23 | 深圳大趋智能科技有限公司 | Method and device for realizing multiple key functions by using single IO |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN207304526U (en) | A kind of single I/O port detects the control circuit of three buttons | |
CN101465599A (en) | Step-down circuit and method for charge pump | |
CN201584957U (en) | Touch key circuit, touch control device, touch screen and electronic equipment | |
CN103823598A (en) | Touch sensing circuit and touch sensing method | |
CN102857231B (en) | A kind of key press detecting circuit | |
CN107525602A (en) | Upper battery bag temperature sensing circuit in battery bag concatermer | |
CN202889317U (en) | Capacitance type touch key circuit | |
CN105183097B (en) | A kind of confirmation method of key system input | |
CN104753514B (en) | A kind of contact witch controls circuit | |
CN206422761U (en) | A kind of switching signal detects circuit | |
CN205725671U (en) | Operational amplifier unit module | |
CN206542389U (en) | A kind of capacitance touch button detects circuit | |
CN105227188B (en) | A kind of more key press detecting circuits | |
CN209151132U (en) | A kind of clock signal missing detecting circuit | |
CN209016955U (en) | A kind of DC brushless motor positive and negative rotation circuit | |
CN102651646A (en) | Capacitance type touch press key circuits | |
CN109813964B (en) | Capacitance detection circuit and method | |
CN206099902U (en) | Transistor oscillator | |
CN107874319A (en) | Electronic cigarette and its power supply architecture | |
CN203011996U (en) | Limit peak value current detection circuit of switch power supply | |
CN207248954U (en) | Single-phase intelligent electric energy meter | |
CN103607190B (en) | One-key type button switch circuit | |
CN206117508U (en) | Voltage output circuit | |
CN207164124U (en) | Detecting voltage by three phase circuit and air conditioner | |
CN206532281U (en) | Can a key enter reforestation practices E-book reader |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
GR01 | Patent grant | ||
GR01 | Patent grant |