Summary of the invention
For above defect or the Improvement requirement of prior art, the invention provides a kind of chopped mode direct current detection method and circuit, its object is to, elimination low-frequency noise and offset voltage, on the impact of testing result, solve the technical matters of distorted signals in existing direct current detection technology.
For achieving the above object, according to one aspect of the present invention, provide a kind of chopped mode direct current detection method, by forward voltage and the reverse voltage at acquisition time shunt resistance two ends, and the mode by being averaging after subtracting each other this forward voltage and reverse voltage, obtain DC voltage detection value, specific as follows:
(1) in the upper half period of the n-th chopping cycle, the forward voltage V at shunt resistance two ends is gathered
out1; Wherein, V
out1=V
sig+ V
os, n gets positive integer;
(2) in the lower half period of the n-th chopping cycle, the reverse voltage V at shunt resistance two ends is gathered
out2; Wherein, V
out2=-V
sig+ V
os;
(3) by the forward voltage V of upper half chopping cycle
out1with the reverse voltage V of lower half chopping cycle
out2carry out computing, balance out the voltage noise in described forward voltage and reverse voltage, obtain the DC voltage detection value V at shunt resistance two ends:
(4) according to the DC voltage detection value V at shunt resistance two ends and the resistance R of shunt resistance, direct current detection value is obtained;
(5) step (1) ~ (4) are repeated, Real-time Obtaining direct current detection value;
Wherein, V
sigthe actual value intending detecting d. c. voltage signal, V
oslow-frequency noise, the voltage noise that causes of offset voltage and temperature variation, be the function of time t and temperature T, V
os=f (t, T); By said method, the voltage noise that elimination low-frequency noise, offset voltage and temperature variation cause is on the impact of testing result, and the DC voltage detection value obtained is exactly the actual value of this voltage.
Preferably, gather the method for shunt resistance two ends forward voltage and reverse voltage, specific as follows:
A, upper half period at the n-th chopping cycle, by the in-phase input end of the nearly power end signal access amplifier of shunt resistance, by the inverting input of the nearly load end signal access amplifier of shunt resistance, complete forward voltage access;
Start to gather described forward voltage after b, time delay xms, according to the sample frequency preset, gather i time in half chopping cycle; Using the forward voltage values V that the mean value of i sampling collects in this half chopping cycle
out1; Wherein, i gets positive integer;
After c, times of collection reach i, in the lower half period of the n-th chopping cycle, by the inverting input of the nearly power end end signal access amplifier of shunt resistance, by the in-phase input end of the nearly load end signal access amplifier of shunt resistance, complete reverse voltage access;
Start to gather described reverse voltage after d, time delay xms, according to the sample frequency preset, gather i time in half chopping cycle; Using the reverse voltage value V that the mean value of i sampling collects in this half chopping cycle
out2.
Preferably, the scope of above-mentioned time delay x is (0, kt); Wherein, 0 moment was the switching over moment, and k is V
out(k)-V
out(k-1)≤ε time corresponding sampling number; ε is default voltage tester error tolerance band, and t is the sampling period;
V
outk () refers to a kth sampled value; In forward voltage gathers, V
outk () is V
out1(k), in reverse voltage gathers, V
outk () is V
out2(k).
Preferably, chopping frequency is determined according to voltage noise characteristic, and when the voltage noise changes in amplitude within the Δ t time period is less than default voltage tester error tolerance band ε, then chopping frequency f is set to
Chopping frequency is enough high, using low-frequency noise as time dependent offset voltage process, can subtract each other the mode be averaging offset offset voltage by forward and reverse voltage of the present invention.
According to another aspect of the present invention, provide a kind of chopped mode D.C. current detecting circuit, comprise shunt resistance, analog switch, amplifier, analog to digital converter and control module, by analog device and digital control combination, carry out direct current detection;
Wherein, shunt resistance is connected on bus, and bus current is converted to terminal voltage; Analog switch is connected in parallel on the two ends of shunt resistance, and two input ends of analog switch connect the two ends of shunt resistance respectively, and tie point is as voltage acquisition point; The output terminal of the input end connecting analog switch of amplifier, for amplifying the voltage signal at the shunt resistance two ends collected; The input end of analog to digital converter connects the output terminal of amplifier, and the forward and reverse voltage signal for the simulation exported by amplifier converts forward and reverse voltage signal of numeral to;
The output terminal of the input end connection mode number converter of control module, the control signal input end of the output terminal connecting analog switch of control module; Control module provides the switching of Digital Signals analog switch on the one hand, to switch the connected mode of shunt resistance and amplifier, carries out computing on the other hand to forward and reverse voltage signal of numeral, obtains direct current detection value; Single-chip microcomputer, DSP or FPGA is adopted to realize.
Preferably, above-mentioned chopped mode D.C. current detecting circuit, operationally,
A, by the action of Digital Signals analog switch, in the upper half period of the n-th chopping cycle, by the in-phase input end of the nearly power end signal access amplifier of shunt resistance, by the inverting input of the nearly load end signal access amplifier of shunt resistance, complete switch motion, access forward voltage;
The method adopting this digital-to-analogue of Digital Signals analog switch to combine, eliminates the impact of the stray capacitance that analog switch brings;
After b, switch motion complete, after time delay xms, gather the forward voltage that amplifier exports, according to the sample frequency preset, gather i time in half chopping cycle; Using the forward voltage values V that the mean value of i sampling collects in this half chopping cycle
out1;
Voltage stabilization post-sampling is treated in time delay, avoids the impact of switching frequency noise on testing result;
After c, times of collection reach i, switched by Digital Signals analog switch, in the lower half period of the n-th chopping cycle, by the inverting input of the nearly power end end signal access amplifier of shunt resistance, by the in-phase input end of the nearly load end signal access amplifier of shunt resistance, complete switching over, access reverse voltage;
D, after switching over completes, gather after time delay xms amplifier export reverse voltage, according to preset sample frequency, gather i time in half chopping cycle; Using the reverse voltage value V that the mean value of i sampling collects in this half chopping cycle
out2;
Wherein, when forward voltage refers to the voltage access inverting input by the normal phase input end of the voltage of near for sampling resistor power end access amplifier, nearly load end, the magnitude of voltage that amplifier out gathers, when reverse voltage refers to the normal phase input end voltage of near for sampling resistor load end being sent into amplifier, the voltage of nearly power end sends into inverting input, the magnitude of voltage that amplifier out gathers.
In existing chopping zero-stabilizing amplifier, use analog switch that signal is done to copped wave process, carries out filtering by switching capacity to chopping signal again, to be reduced by original signal, thus obtain low drifting characteristic;
And switching noise is inevitably introduced in signal by analog switch and electric capacity, need again to increase complicated circuit to the process of switching noise, cost increases and fundamentally can not eliminate switching noise;
For detection system, adopt the mode that mimic channel provided by the invention and digital processing combine, do not need expensive device, while reducing costs, make circuit design more flexible.
In general, the above technical scheme conceived by the present invention compared with prior art can obtain following beneficial effect:
(1) chopped mode direct current detection method provided by the invention and circuit, the low-frequency noise introduced by the signal conditioning circuits such as amplifier is as offset voltage; When chopping frequency is enough high, low-frequency noise is by as time dependent offset voltage; By direct current signal copped wave, be averaging after forward and reverse voltage signal is subtracted each other, offset offset voltage to the impact of direct current detection;
(2) chopped mode direct current detection method provided by the invention and circuit, adopts real-time continuous copped wave sampling, the forward and reverse voltage in a chopping cycle is carried out to the method for computing, real-time bucking voltage noise V
os; Due to operating ambient temperature impossible drastic change in extremely short chopping cycle, the offset voltage that temperature consecutive variations causes is also impossible drastic change in adjacent copped wave interval, therefore for the offset voltage noise that temperature variation causes, method provided by the invention, can offset in real time equally, improve the adaptive faculty of direct current detection testing circuit to working environment;
(3) chopped mode direct current detection method provided by the invention, meeting time delay a period of time after each switching over, starts sampling again, drops to minimum by the impact of switching frequency noise on voltage acquisition value after voltage tends towards stability;
(4) chopped mode DC current circuit provided by the invention, adopts the mode that digital-to-analogue combines, and adopts Digital Signals analog switch, eliminates switching frequency noise that analog switch causes to the impact of testing current accuracy; On the other hand, circuit structure is simple, has the advantage of low cost.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearly understand, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.In addition, if below in described each embodiment of the present invention involved technical characteristic do not form conflict each other and just can mutually combine.
Chopped mode D.C. current detecting circuit provided by the invention and method, by forward voltage and the reverse voltage at Real-time Collection shunt resistance two ends, and the mode be averaging after the forward and reverse voltage in same chopping cycle is subtracted each other, obtain DC voltage detection value, then obtain current detection value further.
Because the forward voltage that collects and reverse voltage are all with noise, comprise the noise etc. that low-frequency noise, offset voltage and temperature variation that amplifier causes cause; Subtracting each other in the process be averaging, this part noise voltage is directly cancelled, and eliminates the impact of noise voltage on testing result;
The method that the present invention adopts mimic channel and digital processing to combine, uses conducting and the disconnection of digitial controller control simulation switch; And chopping cycle can be arranged flexibly according to noisiness; The introducing of digital processing method makes choosing of sampled data more flexible, avoiding switching noise; The empirical data setting that sampling delay time can obtain according to actual measurement, also can set by carrying out digital processing to sampled data in real time; The setting of chopping frequency can be arranged flexibly according to noisiness; Use general discrete device, farthest reduce costs while acquisition expection accuracy of detection.
Testing circuit provided by the invention comprises shunt resistance, analog switch, amplifier, analog to digital converter and control module, and its system chart as shown in Figure 1;
Concrete, analog switch is connected in parallel on the two ends of shunt resistance, and two input ends of analog switch connect the two ends of shunt resistance respectively, and tie point is as voltage acquisition point; The output terminal of the input end connecting analog switch of amplifier; The input end of analog to digital converter connects the output terminal of amplifier; The output terminal of the input end connection mode number converter of control module, the control signal input end of the output terminal connecting analog switch of control module;
Control module provides the switching of Digital Signals analog switch on the one hand, to switch the connected mode of shunt resistance and amplifier, on the other hand according to forward and reverse voltage signal of numeral, obtains direct current detection value; In embodiment, control module can adopt FPGA to realize.
The direct current detection method that embodiment provides and circuit, the current value for each the road power supply to LED module group backlight source detects in real time and monitors; Due to the power supply in this type of application and control signal depositing, therefore current detecting can only adopt the mode that shunt resistance, flash detect; Shunt resistance is connected between power output end and load, detects the voltage at shunt resistance two ends, according to the resistance value of the magnitude of voltage detected with shunt resistance, acquisition DC current values.
Below in conjunction with embodiment, concrete elaboration chopped mode direct current detection method provided by the invention and circuit;
The D.C. current detecting circuit schematic diagram that embodiment provides as shown in Figure 2, shunt resistance Rs one end connects supply voltage Vs, the other end connects load: analog switch is connected in parallel on the two ends of shunt resistance Rs, input end connects the voltage acquisition point at shunt resistance two ends, and output terminal connects the input end of instrument amplifier INA; Analog switch, in the digital control lower switching of control module MCU, switches the connected mode of shunt resistance Rs and instrument amplifier INA;
In an embodiment, analog switch has 6 contacts; Contact A 1, A2, B1 and B2 are the contacts for being connected shunt resistance, and contact C is for connecting the in-phase end of amplifier INA, and contact D is for connecting the end of oppisite phase of amplifier INA;
In the upper half period of the n-th chopping cycle, the contact C connecting terminal A1 of analog switch, contact D connecting terminal A2, the high voltage end of the in-phase end of instrument amplifier INA with shunt resistance RS is connected, end of oppisite phase is connected with the low-voltage end of shunt resistance RS, to gather the forward voltage at the two ends of shunt resistance Rs; After upper half chopping cycle terminates, analog switch switches, make in lower half chopping cycle, the contact C connecting terminal B1 of analog switch, contact D connecting terminal B2, be connected by the low-voltage end of the in-phase input end of instrument amplifier INA with shunt resistance RS, reverse input end is connected with the high voltage end of shunt resistance RS, to gather the reverse voltage at the two ends of shunt resistance Rs.
In embodiment, what instrument amplifier INA gathered is the differential voltage signal at shunt resistance two ends, change-over switch like this, the in-phase input end of shunt resistance two ends and instrument amplifier and inverting input are alternately connected, with the acquisition of this output terminal at instrument amplifier INA to the forward of shunt resistance differential voltage signal and reverse voltage value, its waveform as schematically shown in Figure 3;
Forward voltage values and reverse voltage value all contain identical offset voltage Vos, are offset by Vos by computing; Another advantage of this method is not only the imbalance of instrument amplifier INA self to be offset, and can also offset because common mode voltage is high, amplifier common mode rejection ratio is limited and bring imbalance.
The chopped mode direct current detection method that embodiment provides is specific as follows:
(1) chopping cycle is 0.5s, in the upper half period of chopping cycle, MCU provides high level digital signal control simulation switch to get to high voltage end and the low-voltage end of shunt resistance, high voltage end signal is sent into the in-phase input end of instrument amplifier, low-voltage end signal is sent into the inverting input of instrument amplifier;
(2) through 10ms ~ 50ms time delay, avoiding switching switches the signal fluctuation of moment, analog to digital converter starts with the output voltage of 128KHz frequency collection instrument amplifier INA, and carry out analog to digital conversion, the sampled data that control module MCU obtains after reading analog to digital conversion, stored in the register of control module MCU, in MCU, sampled data is averaging, obtains the forward voltage V at shunt resistance two ends
out1;
(3) in the lower half period of chopping cycle, control module MCU provide low level digital signal, control simulation switching over, makes in-phase input end low-voltage end B1 signal being sent into instrument amplifier, high voltage end B2 signal is sent into the inverting input of instrument amplifier;
(4) through 10ms ~ 50ms time delay, analog to digital converter starts with the output voltage of 128kHz frequency collection instrument amplifier INA, and carry out analog to digital conversion, the sampled data that control module MCU obtains after reading analog to digital conversion, stored in the register of control module MCU, in control module MCU, sampled data is averaging, obtains the reverse voltage V at shunt resistance two ends
out2; Above forward voltage values V
out1with reverse voltage value V
out2inside include noise voltage;
(5) DC voltage detection value V is obtained,
(6) according to the resistance of DC voltage detection value V and shunt resistance Rs, DC current values I is obtained.
The DC detection method that above-described embodiment provides, in the range of current of 0 ~ 1mA, without the need to software calibration, can realize the accuracy of detection of 1uA, and under different operating environment temperature, all can keep this precision; Use identical instrumentation amplifier and identical analog to digital converter, do not adopt method of the present invention, adopt the shunt resistance of 1 Ω, in the scope of 0-1mA, through software calibration, the accuracy of detection of 10uA can only be realized, and in 0-75 DEG C of operating temperature range, temperature-compensation circuit need be increased output valve is corrected.
Those skilled in the art will readily understand; the foregoing is only preferred embodiment of the present invention; not in order to limit the present invention, all any amendments done within the spirit and principles in the present invention, equivalent replacement and improvement etc., all should be included within protection scope of the present invention.