CN104811178A - Multi-path switching value collection device based on AD sampling circuit and collecting method thereof - Google Patents
Multi-path switching value collection device based on AD sampling circuit and collecting method thereof Download PDFInfo
- Publication number
- CN104811178A CN104811178A CN201510204999.6A CN201510204999A CN104811178A CN 104811178 A CN104811178 A CN 104811178A CN 201510204999 A CN201510204999 A CN 201510204999A CN 104811178 A CN104811178 A CN 104811178A
- Authority
- CN
- China
- Prior art keywords
- button
- resistance
- sample circuit
- way switching
- voltage
- 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
Links
Abstract
The invention discloses a multi-path switching value collection device based on an AD sampling circuit and a collecting method thereof, and relates to the multi-path switching value collection technology. The problem that the existing circuit for collecting multi-path switch must select CPU with multiple I/O ports or must be added with an I/O port expansion drive circuit, thus being too high in cost and poor in anti-jamming capability is solved. Each button of the device is connected with a resistor to form a button subcircuit, all button subcircuits are connected between the analog signal input end of the AD sampling circuit and the ground of a power supply in parallel, a resistor is connected between the analog signal input end and the anode of the power supply in series, and the resistance values of the resistors serially connected with the buttons S1 to SN are gradually reduced. The method comprises the steps of: obtaining the resistance values of the buttons according to the voltages collected by the AD sampling circuit, and determining the closed state of one or more buttons according to the resistance values of the buttons and button parallel circuit structures. The multi-path switching value collection device based on the AD sampling circuit and the collecting method thereof are applicable to the technical field of circuit design requiring collecting multi-path switching value, and also applicable to modifying the existing circuit requiring adding switching value collection quantity.
Description
Technical field
The present invention relates to multi-way switching values acquisition technique.
Background technology
The existing mode gathered the switching value of the switching value sample circuits such as button is all existing by the I/O cause for gossip of CPU mostly, that is: an existing collection to a switching value of I/O cause for gossip, such circuit structure is fairly simple, and on-off state picking rate is also than comparatively fast, and practicality is stronger.But, often because CPU has the I/O mouth of fixed qty, the quantity of the switching value that can gather is caused to be restricted, in time needing the number ratio of the switching value gathered more, if the I/O quantity of CPU not, when not having to expand space, need a plug-in CPU or change the CPU of more I/O mouths or increase the drive circuit of I/O mouth dilatation, those methods not only add cost, and increase area required for circuit board, increase the design difficulty of pcb board, also signal can be caused mutually to produce interference.
Summary of the invention
The present invention must select the CPU of many I/O mouth or increase I/O mouth dilatation drive circuit to cause the problem of high cost, poor anti jamming capability to solve at the circuit of existing collection variable connector, proposes a kind of multi-way switching values harvester based on AD sample circuit and acquisition method thereof.
Multi-way switching values harvester based on AD sample circuit comprises AD sample circuit, power supply VCC and N number of resistance, N > 1, each button resistance of all connecting forms a button branch road, all button branch roads are all connected in parallel between the input end of analog signal of AD sample circuit and the ground of power supply VCC, a resistance of connecting between the input end of analog signal of described AD sample circuit and the positive pole of power supply VCC is the resistance of R, button S
1to button S
nthe resistance value of the resistance of series connection is successively decreased gradually, button S
ithe button branch road at place is R in the resistance of button closure state
i, 0 < i≤N.
The multi-way switching values acquisition method of the above-mentioned multi-way switching values harvester based on AD sample circuit comprises:
The voltage acquisition step of its input end of analog signal voltage is gathered by AD sample circuit;
According to the resistance calculations step of the voltage acquisition button resistance value that voltage sampling circuit obtains;
The button resistance value obtained according to resistance calculations step and button parallel circuit structure judge to obtain the key-press status determination step of the state that some buttons or multiple button close.
Beneficial effect: the present invention is when solution increases contactor amount collecting quantity, existing intrinsic mentality of designing is not adopted to remove the CPU considering to select more I/O mouths, or start with from the thinking changing digital circuit structure, that is: the present invention has abandoned the thinking of existing solution same problems completely, but the AD sample circuit of employing collection analog signal realizes the collection to multi-way switching values.Described AD sample circuit is technology very ripe at present, that is: hardware circuit is stable and reliable for performance, corresponding data processing technique is also very ripe technology, that is: also very ripe to the treatment technology gathering the voltage signal obtained, therefore adopt AD sample circuit to realize the apparatus and method of the collection of multi-way switching values reliable and stable.
General principle of the present invention is: each switching value and a resistant series are formed switching branches, then after all switching branches in parallel and a resistant series between the both positive and negative polarity of power supply, then to be sampled by AD the voltage of this parallel circuits, the overall resistance of parallel circuits just can be obtained according to this voltage, then be closed according to those several branch roads in this resistance determination parallel circuits, and then reach and determine that several switch corresponding is closure state, finally realize the collection of switch amount state.Main points of the present invention are the selection of the resistance of each branch road in parallel circuits, and then reach any one or multiple switch is pressed time, whole parallel circuits resistance be different, this needs the resolution according to AD sample circuit, then carries out calculating fully and can realizing.
Installation cost of the present invention is low, and expandable type is good, and if device of the present invention increases the collection of a switching value, only need to increase a series resistance on circuit, hardware changes seldom, coordinates and changes computational methods.
Accompanying drawing explanation
Fig. 1 is the circuit theory schematic diagram of a kind of multi-way switching values harvester based on AD sample circuit of the present invention.
Embodiment
The multi-way switching values harvester based on AD sample circuit described in embodiment one, this embodiment comprises AD sample circuit, power supply VCC and N number of resistance, N > 1, each button resistance of all connecting forms a button branch road, all button branch roads are all connected in parallel between the input end of analog signal of AD sample circuit and the ground of power supply VCC, a resistance of connecting between the input end of analog signal of described AD sample circuit and the positive pole of power supply VCC is the resistance of R, button S
1to button S
nthe resistance value of the resistance of series connection is successively decreased gradually, button S
ithe button branch road at place is R in the resistance of button closure state
i, 0 < i≤N.
In present embodiment, the node voltage obtained by the multiple key-press status of AD sample circuit to multiple key combination is sampled, according to the resolution of AD sample circuit, by button S
1to button S
nthe resistance value of the resistance of series connection is set to successively decreases gradually, and ensure, the resistance in parallel that any one button is pressed, any number of button is pressed simultaneously obtains is all not identical, gather its input end of analog signal voltage by AD sample circuit and obtain button resistance value, and judge to obtain according to button resistance value and button parallel circuit structure that resistance calculations step obtains the state that some buttons or multiple button close, thus realize multi-way switching values collection.
Multi-way switching values harvester described in present embodiment can realize gathering multi-way switching values, and the cost of AD sample circuit is lower, and computational process is also the conventional computational methods of circuit, and more traditional switch acquisition device has more practicality.
The difference of the multi-way switching values harvester based on AD sample circuit described in embodiment two, this embodiment and embodiment one is, after described N number of switch is all pressed, the voltage of the analog voltage signal input input of AD sample circuit is greater than the minimum resolution voltage of AD sample circuit.
The difference of the multi-way switching values harvester based on AD sample circuit described in embodiment three, this embodiment and embodiment one is, time i-th button is pressed separately, the voltage of the input end of analog signal input of AD sample circuit is Vi, then have: the difference of Vi and Vi+1 is greater than the minimum resolution voltage of AD sample circuit.
Embodiment two is mainly arranged the resistance value in circuit for the minimum resolution voltage of AD sample circuit with the scheme described in embodiment three, so as AD sample circuit can collect any button close situation under magnitude of voltage.
Embodiment four, composition graphs 1 illustrate this embodiment, and this embodiment is with the difference of the multi-way switching values harvester based on AD sample circuit described in embodiment one, described each button electric capacity all in parallel.
Add electric capacity in present embodiment, can reduce at button the electric arc formed between two contacts of button shutoff when turning off, also can prevent the contact noise of key contacts, the magnitude of voltage that AD sampling circuit samples is obtained is more accurate simultaneously.
Be the multi-way switching values acquisition method of the multi-way switching values harvester based on AD sample circuit described in embodiment one described in embodiment five, this embodiment, described method comprises:
The voltage acquisition step of its input end of analog signal voltage is gathered by AD sample circuit;
According to the resistance calculations step of the voltage acquisition button resistance value that voltage sampling circuit obtains;
The button resistance value obtained according to resistance calculations step and button parallel circuit structure judge to obtain the key-press status determination step of the state that some buttons or multiple button close.
In present embodiment, gather its input end of analog signal voltage by AD sample circuit and obtain button resistance value, and judge to obtain according to button resistance value and button parallel circuit structure that resistance calculations step obtains the state that some buttons or multiple button close, thus realize multi-way switching values collection, computational process is the conventional computational methods of circuit, and more traditional switch acquisition device has more practicality.
The difference of the multi-way switching values acquisition method of the multi-way switching values harvester based on AD sample circuit described in embodiment six, this embodiment and embodiment five is, described resistance calculations step is according to formula
realize, in formula, U is the magnitude of voltage of power supply VCC, and U' is the magnitude of voltage that voltage acquisition step collects, and R' is button resistance value.
Present embodiment show in particular formula used in resistance calculations step, can find out, this formula is the most conventional in circuit counting is also computing formula the most basic, therefore, in the calculating process carrying out multi-way switching values collection, simplify computational process, improve picking rate and efficiency.
The difference of the multi-way switching values acquisition method of the multi-way switching values harvester based on AD sample circuit described in embodiment seven, this embodiment and embodiment six is, described key-press status determination step comprises further:
Judge the step that any one button branch road is closed: as the resistance R of button resistance value and some switching branches
iquite, then the button S of this switching branches is judged
iclosed;
Judge the step that any number of button branch road closes simultaneously: when the resistor coupled in parallel resistance of button resistance value and multiple button branch road is suitable, then judge that the button on the plurality of button branch road is pressed simultaneously.
Owing to can export different magnitudes of voltage when different key is pressed, AD sample circuit calculates button resistance value after gathering its magnitude of voltage, then by the resistance R of button resistance value and some switching branches
ior the resistor coupled in parallel resistance of multiple button branch road compares and can judge which or which button is pressed, whole calculating and deterministic process fast and convenient, effectively improve picking rate and efficiency.
In present embodiment, the parallel circuits that can be formed according to all switching branches first calculate obtain the resistance that a button is pressed, and form the resistance data form corresponding with on off state, then adopt look-up table to determine which or multiple button are pressed according to button resistance.Look-up table is existing conventional Data Comparison method, convenient and swift.
The difference of the multi-way switching values acquisition method of the multi-way switching values harvester based on AD sample circuit described in embodiment eight, this embodiment and embodiment seven is, judge in the step that any one button branch road is closed, described button resistance value and resistance R
iquite, refer to that button resistance value is close to resistance R
i.
Because the contact of button can change along with the use of button, therefore, the resistance value that AD sampling is obtained and the resistance value of this button place branch road have certain difference, therefore, when contrast, according to actual conditions, theoretic branch resistance or parallel resistance are become a scope, then judge whether button resistance drops within the scope of this.Such as, button resistance value and resistance R can be set
iquite refer to button resistance value and resistance R
idifference be less than 0.05%R
i.
The difference of the multi-way switching values acquisition method of the multi-way switching values harvester based on AD sample circuit described in embodiment nine, this embodiment and embodiment seven is, judge in the step that any number of button branch road closes simultaneously, the resistor coupled in parallel resistance of button resistance value and multiple button branch road is suitable, refers to that button resistance is close to parallel resistance.
Such as: according to actual conditions, can determine that the resistor coupled in parallel resistance of button resistance value and multiple button branch road is suitable, refer to that the difference of the two is less than 0.05% of resistance in parallel.
Claims (9)
1. based on the multi-way switching values harvester of AD sample circuit, it is characterized in that, it comprises AD sample circuit, power supply VCC and N number of resistance, N > 1, each button resistance of all connecting forms a button branch road, all button branch roads are all connected in parallel between the input end of analog signal of AD sample circuit and the ground of power supply VCC, and a resistance of connecting between the input end of analog signal of described AD sample circuit and the positive pole of power supply VCC is the resistance of R, button S
1to button S
nthe resistance value of the resistance of series connection is successively decreased gradually, button S
ithe button branch road at place is R in the resistance of button closure state
i, 0 < i≤N.
2. the multi-way switching values harvester based on AD sample circuit according to claim 1, it is characterized in that, after described N number of switch is all pressed, the voltage of the analog voltage signal input input of AD sample circuit is greater than the minimum resolution voltage of AD sample circuit.
3. the multi-way switching values harvester based on AD sample circuit according to claim 1, it is characterized in that, time i-th button is pressed separately, the voltage of the input end of analog signal input of AD sample circuit is Vi, then have: the difference of Vi and Vi+1 is greater than the minimum resolution voltage of AD sample circuit.
4. the multi-way switching values harvester based on AD sample circuit according to claim 1, is characterized in that, described each button electric capacity all in parallel.
5. the multi-way switching values acquisition method of the multi-way switching values harvester based on AD sample circuit according to claim 1, it is characterized in that, described method comprises:
The voltage acquisition step of its input end of analog signal voltage is gathered by AD sample circuit;
According to the resistance calculations step of the voltage acquisition button resistance value that voltage sampling circuit obtains;
The button resistance value obtained according to resistance calculations step and button parallel circuit structure judge to obtain the key-press status determination step of the state that some buttons or multiple button close.
6. the multi-way switching values acquisition method of the multi-way switching values harvester based on AD sample circuit according to claim 5, is characterized in that, described resistance calculations step is according to formula
realize, in formula, U is the magnitude of voltage of power supply VCC, and U' is the magnitude of voltage that voltage acquisition step collects, and R' is button resistance value.
7. the multi-way switching values acquisition method of the multi-way switching values harvester based on AD sample circuit according to claim 6, is characterized in that, described key-press status determination step comprises further:
Judge the step that any one button branch road is closed: as the resistance R of button resistance value and some switching branches
iquite, then the button S of this switching branches is judged
iclosed;
Judge the step that any number of button branch road closes simultaneously: when the resistor coupled in parallel resistance of button resistance value and multiple button branch road is suitable, then judge that the button on the plurality of button branch road is pressed simultaneously.
8. the multi-way switching values acquisition method of the multi-way switching values harvester based on AD sample circuit according to claim 7, is characterized in that, judges in the step that any one button branch road is closed, button resistance value and resistance R
ibetween error be 0.05%.
9. the multi-way switching values acquisition method of the multi-way switching values harvester based on AD sample circuit according to claim 7, it is characterized in that, judge that in the step that any number of button branch road closes simultaneously, the error between the resistor coupled in parallel resistance of button resistance value and multiple button branch road is 0.05%.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510204999.6A CN104811178A (en) | 2015-04-27 | 2015-04-27 | Multi-path switching value collection device based on AD sampling circuit and collecting method thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510204999.6A CN104811178A (en) | 2015-04-27 | 2015-04-27 | Multi-path switching value collection device based on AD sampling circuit and collecting method thereof |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104811178A true CN104811178A (en) | 2015-07-29 |
Family
ID=53695732
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510204999.6A Pending CN104811178A (en) | 2015-04-27 | 2015-04-27 | Multi-path switching value collection device based on AD sampling circuit and collecting method thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104811178A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105511362A (en) * | 2016-01-12 | 2016-04-20 | 广东芬尼克兹节能设备有限公司 | Analog quantity and switching quantity shared detection device and method |
CN105813352A (en) * | 2016-05-09 | 2016-07-27 | 项小东 | Novel intelligent light control module |
CN106952463A (en) * | 2016-01-06 | 2017-07-14 | 珠海优特电力科技股份有限公司 | Second power equipment state acquisition system and method |
CN108931720A (en) * | 2018-07-12 | 2018-12-04 | 四川虹美智能科技有限公司 | A kind of switch signal detection circuit and detection method |
CN111064460A (en) * | 2019-12-30 | 2020-04-24 | 广州视源电子科技股份有限公司 | Switch circuit, switch identification method, storage medium, and terminal |
CN112702047A (en) * | 2021-01-04 | 2021-04-23 | 长江存储科技有限责任公司 | Switching device, integrated circuit, and electronic apparatus |
CN114625684A (en) * | 2021-12-28 | 2022-06-14 | 昆明能讯科技有限责任公司 | Multi-device access identification method based on ADC sampling |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102385331A (en) * | 2011-09-21 | 2012-03-21 | 淮南万泰电子股份有限公司 | Signal collection voice power amplification module of electric cabinet |
CN203287708U (en) * | 2013-06-05 | 2013-11-13 | 中联重科股份有限公司 | Controller input point expanding device and engineering mechanical equipment |
CN204652336U (en) * | 2015-04-27 | 2015-09-16 | 航天科技控股集团股份有限公司 | Based on the multi-way switching values harvester of AD sample circuit |
-
2015
- 2015-04-27 CN CN201510204999.6A patent/CN104811178A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102385331A (en) * | 2011-09-21 | 2012-03-21 | 淮南万泰电子股份有限公司 | Signal collection voice power amplification module of electric cabinet |
CN203287708U (en) * | 2013-06-05 | 2013-11-13 | 中联重科股份有限公司 | Controller input point expanding device and engineering mechanical equipment |
CN204652336U (en) * | 2015-04-27 | 2015-09-16 | 航天科技控股集团股份有限公司 | Based on the multi-way switching values harvester of AD sample circuit |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106952463A (en) * | 2016-01-06 | 2017-07-14 | 珠海优特电力科技股份有限公司 | Second power equipment state acquisition system and method |
CN106952463B (en) * | 2016-01-06 | 2023-05-12 | 珠海优特电力科技股份有限公司 | State acquisition system and method for electric power secondary equipment |
CN105511362A (en) * | 2016-01-12 | 2016-04-20 | 广东芬尼克兹节能设备有限公司 | Analog quantity and switching quantity shared detection device and method |
CN105511362B (en) * | 2016-01-12 | 2018-12-11 | 广东芬尼克兹节能设备有限公司 | The common detection device and method of analog quantity and switching value |
CN105813352A (en) * | 2016-05-09 | 2016-07-27 | 项小东 | Novel intelligent light control module |
CN108931720A (en) * | 2018-07-12 | 2018-12-04 | 四川虹美智能科技有限公司 | A kind of switch signal detection circuit and detection method |
CN111064460A (en) * | 2019-12-30 | 2020-04-24 | 广州视源电子科技股份有限公司 | Switch circuit, switch identification method, storage medium, and terminal |
CN112702047A (en) * | 2021-01-04 | 2021-04-23 | 长江存储科技有限责任公司 | Switching device, integrated circuit, and electronic apparatus |
CN114625684A (en) * | 2021-12-28 | 2022-06-14 | 昆明能讯科技有限责任公司 | Multi-device access identification method based on ADC sampling |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104811178A (en) | Multi-path switching value collection device based on AD sampling circuit and collecting method thereof | |
CN103412168B (en) | A kind of high-precision current sampling circuit of intelligent electric meter | |
CN108918932B (en) | Adaptive filtering method for power signal in load decomposition | |
CN102507034A (en) | Temperature sampling circuit and method of air conditioner | |
CN104880673A (en) | Method for measuring battery electric quantity and mobile terminal | |
CN204652336U (en) | Based on the multi-way switching values harvester of AD sample circuit | |
CN102879722A (en) | Volt-ampere performance testing device and method for solar array | |
WO2014144279A1 (en) | Cell balancing through a switched capacitor level shifter | |
CN203445592U (en) | High-side output circuit with short-circuit protection | |
CN213780273U (en) | Battery insulation detection circuit and electric automobile | |
CN208140793U (en) | A kind of super low-power consumption battery voltage sampling circuit | |
CN108475982A (en) | A kind of switching power circuit and switch power supply current detection method | |
CN103364627A (en) | Leakage current detection circuit of automatic reclosing lock disconnector | |
CN203587634U (en) | Wide-range metering electric energy meter sampling in compound manner | |
CN111585542A (en) | Method and filter for filtering power signal impulse noise | |
CN207601331U (en) | A kind of high-precision centralization geoelectric survey instrument | |
CN105634057A (en) | Battery, mobile terminal and battery control method | |
CN106058796A (en) | Program-controlled over-current protection circuit and realization method thereof | |
CN206077072U (en) | A kind of electric energy control system based on ADE7755 | |
CN2834022Y (en) | DC electronic switch for AC signal control | |
CN204836131U (en) | Effective switch input signal acquisition circuit of high level | |
CN105510670A (en) | Detection circuit for detecting battery voltage in battery pack, and battery pack | |
CN202586873U (en) | Frequency multiplier circuit and Bluetooth three dimensional glasses phase tester | |
CN204331350U (en) | The switch arrays circuit of changeable access diverse location battery | |
CN203243034U (en) | Camera with electrostatic protection function |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
EXSB | Decision made by sipo to initiate substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20150729 |
|
WD01 | Invention patent application deemed withdrawn after publication |