CN106130558A - DA change-over circuit based on PWM and capacitor charge and discharge principle - Google Patents
DA change-over circuit based on PWM and capacitor charge and discharge principle Download PDFInfo
- Publication number
- CN106130558A CN106130558A CN201610524571.4A CN201610524571A CN106130558A CN 106130558 A CN106130558 A CN 106130558A CN 201610524571 A CN201610524571 A CN 201610524571A CN 106130558 A CN106130558 A CN 106130558A
- Authority
- CN
- China
- Prior art keywords
- circuit
- resistance
- pwm
- charge
- change
- 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
Classifications
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03M—CODING; DECODING; CODE CONVERSION IN GENERAL
- H03M1/00—Analogue/digital conversion; Digital/analogue conversion
- H03M1/66—Digital/analogue converters
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03M—CODING; DECODING; CODE CONVERSION IN GENERAL
- H03M1/00—Analogue/digital conversion; Digital/analogue conversion
- H03M1/06—Continuously compensating for, or preventing, undesired influence of physical parameters
- H03M1/0617—Continuously compensating for, or preventing, undesired influence of physical parameters characterised by the use of methods or means not specific to a particular type of detrimental influence
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Electronic Switches (AREA)
Abstract
The embodiment of the invention discloses DA change-over circuit based on PWM and capacitor charge and discharge principle, for solving the problem that existing D/A converting circuit cannot be accomplished to reduce circuit cost while ensureing high conversion accuracy.The method comprise the steps that PWM on-off circuit, RC charge-discharge circuit and the resistor voltage divider circuit for analog quantity sampling;Connect and be connected to analogue signal end power supply, other end ground connection after the first resistance in described RC charge-discharge circuit one end;Described RC charge-discharge circuit is in parallel with the switch terminals of described PWM on-off circuit, and described PWM on-off circuit is connected with the digital quantity I/O port of single-chip microcomputer and is turned on or off described switch terminals according to the output of described digital quantity I/O port;Described resistor voltage divider circuit includes the 3rd resistance and the 4th resistance being connected to the charging capacitor two ends of described RC charge-discharge circuit;Described 3rd resistance and the 4th resistance are precision resister, and the end that connects between described 3rd resistance and the 4th resistance is connected with the analog quantity I/O port of described single-chip microcomputer.
Description
Technical field
The present invention relates to digital-to-analogue conversion field, particularly relate to DA change-over circuit based on PWM and capacitor charge and discharge principle.
Background technology
Realize digital quantity at present and can use analog-digital chip (DA) to analog quantity, it is also possible to take with split circuit
Build.Using analog-digital chip (DA) to carry out digital-to-analogue conversion, conversion accuracy is high, but cost is the highest simultaneously;And now with separating electricity
Road typically uses and single-phase digital quantity is converted into analog quantity, and conversion accuracy is affected by factors such as device error, environment, and error is relatively
Greatly.Therefore find a kind of conversion accuracy the most lower-cost high DA change-over circuit and become the important research of those skilled in the art
Problem.
Summary of the invention
The embodiment of the invention discloses DA change-over circuit based on PWM and capacitor charge and discharge principle, be used for solving existing number
The problem that analog conversion circuit cannot be accomplished to reduce circuit cost while ensureing high conversion accuracy.
A kind of based on PWM and capacitor charge and discharge principle the DA change-over circuit that the embodiment of the present invention provides, including: PWM opens
Close circuit, RC charge-discharge circuit and the resistor voltage divider circuit for analog quantity sampling;
Connect and be connected to analogue signal end power supply, other end ground connection after the first resistance in described RC charge-discharge circuit one end;Institute
State RC charge-discharge circuit in parallel with the switch terminals of described PWM on-off circuit, described PWM on-off circuit and the digital quantity IO of single-chip microcomputer
Mouthful connect and be turned on or off described switch terminals according to the output of described digital quantity I/O port;
Described resistor voltage divider circuit include being connected to the charging capacitor two ends of described RC charge-discharge circuit the 3rd resistance and
4th resistance;
Described 3rd resistance and the 4th resistance are precision resister, the connection between described 3rd resistance and the 4th resistance
End is connected with the analog quantity I/O port of described single-chip microcomputer.
Alternatively, connecting between end and the analog quantity I/O port of described single-chip microcomputer between described 3rd resistance and the 4th resistance
It is further connected with the 5th resistance.
Alternatively, described RC charge-discharge circuit includes the second resistance and described charging capacitor.
Alternatively, described PWM on-off circuit includes switch triode and current-limiting resistance;
Two ends of described RC charge-discharge circuit are connected between the collector and emitter of described switch triode;
After current-limiting resistance described in the base series of described switch triode, the digital quantity I/O port with described single-chip microcomputer is connected.
Alternatively, described PWM on-off circuit includes phototriode, light emitting diode and current-limiting resistance;
Two ends of described RC charge-discharge circuit are connected between the collector and emitter of described phototriode;
Described light emitting diode is correspondingly arranged with described phototriode, the described current limliting of described light emitting diode one end series connection
After resistance, the digital quantity I/O port with described single-chip microcomputer is connected, and the other end is connected to single-chip microcomputer end power supply or ground connection.
Alternatively, described charging capacitor two ends are also associated with high tension protection circuit.
Alternatively, described high tension protection circuit includes a TVS pipe.
As can be seen from the above technical solutions, the embodiment of the present invention has the advantage that
In the embodiment of the present invention, first described DA change-over circuit is converted into analog quantity, the most again from mould digital quantity (PWM)
Analog quantity up-samples, and can be judged analog quantity and the error of target simulation amount of reality output by analog digital conversion, then finely tune numeral
Amount (PWM), it is ensured that high-precision analog amount exports.Meanwhile, this circuit structure is simple, reduces the cost of DA circuit.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
In having technology to describe, the required accompanying drawing used is briefly described, it should be apparent that, the accompanying drawing in describing below is only this
Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, also may be used
To obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is an embodiment electricity of DA change-over circuit based on PWM and capacitor charge and discharge principle in the embodiment of the present invention
Lu Tu;
Fig. 2 is another embodiment of DA change-over circuit based on PWM and capacitor charge and discharge principle in the embodiment of the present invention
Circuit diagram.
Detailed description of the invention
The embodiment of the invention discloses DA change-over circuit based on PWM and capacitor charge and discharge principle, it is possible to solve existing number
The problem that analog conversion circuit cannot be accomplished to reduce circuit cost while ensureing high conversion accuracy.
A kind of DA change-over circuit based on PWM and capacitor charge and discharge principle in the embodiment of the present invention, including: PWM switchs electricity
Road, RC charge-discharge circuit and the resistor voltage divider circuit for analog quantity sampling.Described RC charge-discharge circuit one end series connection the first electricity
It is connected to analogue signal end power vd D, other end ground connection after resistance R1;Described RC charge-discharge circuit and described PWM on-off circuit
Switch terminals is in parallel, and described PWM on-off circuit is connected with the digital quantity I/O port of single-chip microcomputer and according to the output of described digital quantity I/O port
Be turned on or off described switch terminals.Described resistor voltage divider circuit includes the charging capacitor C1 two being connected to described RC charge-discharge circuit
3rd resistance R3 and the 4th resistance R4, described 3rd resistance R3 and the 4th resistance R4 of end are precision resister, and the described 3rd
The end that connects between resistance R3 and the 4th resistance R4 is connected with the analog quantity I/O port of described single-chip microcomputer.
In order to protect the analog quantity I/O port of single-chip microcomputer, the connection end between described 3rd resistance R3 and the 4th resistance R4 and institute
State and can also be connected to the 5th resistance R5 between the analog quantity I/O port of single-chip microcomputer.
As it is shown in figure 1, in the present embodiment, described RC charge-discharge circuit can include the second resistance R2 and described charged electrical
Hold C1.Described PWM on-off circuit includes that switch triode Q5 and current-limiting resistance R0, two ends of described RC charge-discharge circuit are connected to institute
State between the collector and emitter of switch triode Q5, after current-limiting resistance R0 described in the base series of described switch triode Q5
It is connected with the digital quantity I/O port of described single-chip microcomputer.Wherein, described charging capacitor C1 two ends are also associated with a TVS pipe as high pressure
Protection circuit, in case the instantaneous pressure between charging capacitor C1 burns whole circuit.
Circuit in Fig. 1 and Fig. 2 is described as follows: PWM connects the digital quantity I/O port of single-chip microcomputer, is used for exporting PWM count word letter
Number;VCC is single-chip microcomputer end power supply;VDD is the power supply of analogue signal end;GND is system reference ground;DA is the output of analog quantity
End;AD connects the analog quantity I/O port of single-chip microcomputer, in order to detect whether analog quantity reaches predetermined value, provides foundation for PWM regulation;
DA change-over circuit as shown in Figure 1, its operation principle is for being described as follows:
1, when PWM end output low level, the collector and emitter of switch triode Q5 separated, power vd D passes through
First resistance R1, the second resistance R2 charge to charging capacitor C1;
2, exporting high level when PWM end, turn between the collector and emitter of switch triode Q5, charging capacitor C1 leads to
Cross the second resistance R2 electric discharge;
3, according to the principle of capacitor charge and discharge, when the output of PWM end reaches certain frequency, and just there is phase at charging capacitor C1 two ends
The voltage answered, the dutycycle of regulation PWM frequency or PWM just can adjust the voltage at charging capacitor C1 two ends;
4, by high-precision 3rd resistance R3 and high-precision 3rd resistance R4 sampled voltage, the number of single-chip microcomputer is fed back to
Touching conversion port AD, single-chip microcomputer calculates the analog voltage of reality, then by regulation PWM frequency or the dutycycle school of PWM
Quasi-analog voltage realizes high-precision analog output, and last high-precision analog quantity exports from DA end.
As in figure 2 it is shown, in another embodiment, described PWM on-off circuit can include phototriode, luminescence two
Pole pipe and current-limiting resistance.Two ends of described RC charge-discharge circuit are connected between the collector and emitter of described phototriode;
Described light emitting diode is correspondingly arranged with described phototriode, described light emitting diode one end connect after described current-limiting resistance with
The digital quantity I/O port of described single-chip microcomputer connects, and the other end is connected to single-chip microcomputer end power supply or ground connection.Wherein, described charging capacitor
C1 two ends can also connect has a TVS pipe as high tension protection circuit, in case the instantaneous pressure between charging capacitor C1 burns
Whole circuit.It should be noted that other high tension protection circuit can also be used to protect.
DA change-over circuit as shown in Figure 2, its operation principle is for being described as follows:
1, exporting high level when PWM end, light emitting diode G5 ends, between the collector and emitter of phototriode Q6
Disconnecting, power vd D is charged to charging capacitor C1 by the first resistance R1, the second resistance R2;
2, when PWM end output low level, light emitting diode G5 turns on, between the collector and emitter of phototriode Q6
Conducting, charging capacitor C1 is discharged by the second resistance R2;
3, according to the principle of capacitor charge and discharge, when the output of PWM end reaches certain frequency, and just there is phase at charging capacitor C1 two ends
The voltage answered, the dutycycle of regulation PWM frequency or PWM just can adjust the voltage at charging capacitor C1 two ends;
4, by high-precision 3rd resistance R3 and high-precision 3rd resistance R4 sampled voltage, the number of single-chip microcomputer is fed back to
Touching conversion port AD, single-chip microcomputer calculates the analog voltage of reality, then by regulation PWM frequency or the dutycycle school of PWM
Quasi-analog voltage realizes high-precision analog output, and last high-precision analog quantity exports from DA end.
In the embodiment of the present invention, first described DA change-over circuit is converted into analog quantity, the most again from mould digital quantity (PWM)
Analog quantity up-samples, and is judged analog quantity and the error of target simulation amount of reality output by analog digital conversion, then finely tunes digital quantity
(PWM), it is achieved high-precision analog amount exports.Number is touched conversion and is formed a complete ring by the present invention, and existing number touches conversion output,
Also there is analog digital conversion input monitoring to calibrate, while achieving high conversion accuracy, reduce the cost of DA change-over circuit.
Above DA change-over circuit based on PWM and capacitor charge and discharge principle provided by the present invention is carried out detailed Jie
Continue, for one of ordinary skill in the art, according to the thought of the embodiment of the present invention, in specific embodiments and applications
All will change, in sum, this specification content should not be construed as limitation of the present invention.
Claims (7)
1. a DA change-over circuit based on PWM and capacitor charge and discharge principle, it is characterised in that including: PWM on-off circuit, RC
Charge-discharge circuit and the resistor voltage divider circuit for analog quantity sampling;
Connect and be connected to analogue signal end power supply, other end ground connection after the first resistance in described RC charge-discharge circuit one end;Described RC
Charge-discharge circuit is in parallel with the switch terminals of described PWM on-off circuit, and described PWM on-off circuit connects with the digital quantity I/O port of single-chip microcomputer
Connect and be turned on or off described switch terminals according to the output of described digital quantity I/O port;
Described resistor voltage divider circuit includes the 3rd resistance and the 4th being connected to the charging capacitor two ends of described RC charge-discharge circuit
Resistance;
Described 3rd resistance and the 4th resistance are precision resister, the connection end between described 3rd resistance and the 4th resistance with
The analog quantity I/O port of described single-chip microcomputer connects.
DA change-over circuit the most according to claim 1, it is characterised in that the company between described 3rd resistance and the 4th resistance
Connect and be further connected with the 5th resistance between end and the analog quantity I/O port of described single-chip microcomputer.
DA change-over circuit the most according to claim 1, it is characterised in that described RC charge-discharge circuit include the second resistance and
Described charging capacitor.
DA change-over circuit the most according to claim 1, it is characterised in that described PWM on-off circuit includes switch triode
And current-limiting resistance;
Two ends of described RC charge-discharge circuit are connected between the collector and emitter of described switch triode;
After current-limiting resistance described in the base series of described switch triode, the digital quantity I/O port with described single-chip microcomputer is connected.
DA change-over circuit the most according to claim 1, it is characterised in that described PWM on-off circuit include phototriode,
Light emitting diode and current-limiting resistance;
Two ends of described RC charge-discharge circuit are connected between the collector and emitter of described phototriode;
Described light emitting diode is correspondingly arranged with described phototriode, the described current-limiting resistance of described light emitting diode one end series connection
Being connected with the digital quantity I/O port of described single-chip microcomputer afterwards, the other end is connected to single-chip microcomputer end power supply or ground connection.
DA change-over circuit the most according to any one of claim 1 to 5, it is characterised in that described charging capacitor two ends are also
Connect and have high tension protection circuit.
DA change-over circuit the most according to claim 6, it is characterised in that described high tension protection circuit includes a TVS pipe.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610524571.4A CN106130558A (en) | 2016-07-04 | 2016-07-04 | DA change-over circuit based on PWM and capacitor charge and discharge principle |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610524571.4A CN106130558A (en) | 2016-07-04 | 2016-07-04 | DA change-over circuit based on PWM and capacitor charge and discharge principle |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106130558A true CN106130558A (en) | 2016-11-16 |
Family
ID=57469496
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610524571.4A Pending CN106130558A (en) | 2016-07-04 | 2016-07-04 | DA change-over circuit based on PWM and capacitor charge and discharge principle |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106130558A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110161888A (en) * | 2018-02-12 | 2019-08-23 | 深圳市云海物联科技有限公司 | A kind of D conversion method, system, device and single-chip microcontroller |
CN112601331A (en) * | 2020-11-02 | 2021-04-02 | 光华临港工程应用技术研发(上海)有限公司 | Lighting adjusting device and lighting apparatus based on thing networking |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101751036A (en) * | 2008-12-12 | 2010-06-23 | 中国科学院沈阳自动化研究所 | Motor control device of miniature underwater robot and control method |
CN203340054U (en) * | 2013-01-29 | 2013-12-11 | 湖北融通三立科技有限公司 | DA switching circuit based on a PWM manner and optical coupling |
CN104808736A (en) * | 2015-04-24 | 2015-07-29 | 深圳市振邦智能科技有限公司 | Method for compensating PWM (Pulse-Width Modulation) control voltage |
-
2016
- 2016-07-04 CN CN201610524571.4A patent/CN106130558A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101751036A (en) * | 2008-12-12 | 2010-06-23 | 中国科学院沈阳自动化研究所 | Motor control device of miniature underwater robot and control method |
CN203340054U (en) * | 2013-01-29 | 2013-12-11 | 湖北融通三立科技有限公司 | DA switching circuit based on a PWM manner and optical coupling |
CN104808736A (en) * | 2015-04-24 | 2015-07-29 | 深圳市振邦智能科技有限公司 | Method for compensating PWM (Pulse-Width Modulation) control voltage |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110161888A (en) * | 2018-02-12 | 2019-08-23 | 深圳市云海物联科技有限公司 | A kind of D conversion method, system, device and single-chip microcontroller |
CN112601331A (en) * | 2020-11-02 | 2021-04-02 | 光华临港工程应用技术研发(上海)有限公司 | Lighting adjusting device and lighting apparatus based on thing networking |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20160181913A1 (en) | Negative Charge Pump Feedback Circuit | |
CN103439662A (en) | Low-cost battery electricity quantity detection circuit | |
US20130241500A1 (en) | Charge control circuit | |
CN106130558A (en) | DA change-over circuit based on PWM and capacitor charge and discharge principle | |
CN203365653U (en) | Low-cost battery electric quantity detection circuit | |
CN103364627B (en) | Autoreclose breaker leakage current detection circuit | |
CN204258272U (en) | A kind of converter high accuracy thermal-shutdown circuit | |
CN105553453A (en) | Electric control and temperature control switch circuit | |
CN102611426B (en) | Automatic digital-to-analog range switching circuit | |
CN203365537U (en) | Autoreclose circuit breaker leakage current detection circuit | |
CN210222220U (en) | High-precision constant-current numerical control electronic load | |
CN103869146A (en) | Battery voltage detection circuit | |
CN208479168U (en) | A kind of under-voltage protecting circuit | |
CN103532371A (en) | Negative voltage generating circuit | |
CN207732622U (en) | Output voltage constant-voltage control circuit | |
CN204595159U (en) | A kind of digital display type capacitance discharger | |
CN101754539A (en) | Sampling circuit, LED drive circuit and method for detecting electric quantity of battery | |
CN207612254U (en) | Level switching circuit based on digital signal clamp | |
CN207689957U (en) | A kind of detection circuit and switch power supply system of switching voltage output current | |
CN104836316A (en) | Current-adjustable constant current charging circuit | |
CN105021973A (en) | Digital display type capacitor discharger and detection method | |
CN201285411Y (en) | Graded DC signal tri-terminal isolation measurement apparatus for remote measuring system | |
CN106959719A (en) | A kind of high-precision constant flow source circuit | |
CN204836660U (en) | Multichannel differential pressure sampling circuit | |
CN203340054U (en) | DA switching circuit based on a PWM manner and optical coupling |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20161116 |