Summary of the invention
The objective of the invention is to provide a kind of proportioning valve output compensating circuit and control method, solving by storage battery provides the output meeting of power supply the problem of fluctuation to occur along with the height of battery voltage.
The object of the present invention is achieved like this: this compensating circuit comprises photoelectric coupled circuit, switch transformed circuit, the PWM output circuit, sample circuit, amplifying circuit, low pass filter and comparison circuit, the output of photoelectric coupled circuit is connected with the input of switch transformed circuit with the output of comparison circuit simultaneously, the output of switching circuit is connected with the input of PWM output circuit, the output of PWM output circuit is connected with the input of sample circuit, the output of sample circuit is connected with the input of amplifying circuit, and the output of amplifying circuit is connected with the input of comparison circuit with the output of low pass filter simultaneously.
The control method of this compensating circuit is: the PWM1 signal that processor P IC16F73 produces, at first carry out electrical isolation by optocoupler, be connected on the base stage of triode PT1 then by a diode PD1, triode PT1, triode PT2, triode PT3 and triode PT4 are on off state, utilize the switching characteristic of triode PT1, triode PT2, triode PT3 and triode PT4 to become the signal condition from the input of triode PT1 base stage duty ratio constant, high potential, the rational signal of electronegative potential amplitude; The break-make of the field effect transistor PT5 of this signal controlling PWM output circuit, the signal loading of PWM output circuit on the coil of proportioning valve; Sampling resistor PR18 of series connection in the proportioning valve coil COIL loop, the current signal that flows through on sampling resistor PR18 and the proportioning valve coil POLL is the same; When proportioning valve coil COIL has electric current to flow through, by amplifier POA the voltage on the sampling resistor PR18 is suitably amplified, process amplifier POA amplifying signal is the reverse input end signal of device PUA as a comparison; Another road PWM2 signal by processor P IC16F73 generation according to the input variation, become and the linear direct current signal of PWM2 signal dutyfactor by the RC low-pass filtering treatment, be connected on the input in the same way of comparator PUA, the output signal of comparator PUA is delivered to the output of photoelectric coupled circuit, constitutes a negative feedback control loop.
Beneficial effect, owing to adopted such scheme, if supply voltage changes, the reverse input voltage of comparator also can change, thereby influences the output of comparator.The output of comparator is connected on diode cathode, the output signal of the output signal of optocoupler and comparator is controlled the break-make of triode PT1 jointly like this, thereby the make-and-break time of control field effect transistor PT5, electric current on the proportioning valve coil finally also can change, because treated sampled signal is connected on the reverse input end of comparator, so the ON time of field effect transistor PT5 is opposite with the Changing Pattern of comparator reverse input end.When battery voltage was standard value, the electric current of passing ratio valve coil was our desired value.When battery voltage is higher than standard value, the electric current that flows through the proportioning valve coil increases, and the time of comparator output low level increases, and the time of field effect transistor PT5 conducting reduces, the effective voltage that is added in like this on the proportioning valve coil reduces, thereby has reduced the electric current of proportioning valve coil.When battery voltage is lower than standard value, the electric current that flows through the proportioning valve coil reduces, and the time of comparator output high level increases, and the time of field effect transistor PT5 conducting increases, the effective voltage that is added in like this on the proportioning valve coil increases, and the electric current that flows through the proportioning valve coil also can increase.When therefore battery voltage slightly fluctuateed up and down in the circuit, the electric current that flows through the proportioning valve coil all can be stabilized near our desired value, plays the effect of current compensation.Solved by storage battery the problem of the proportioning valve output meeting of power supply along with the height appearance fluctuation of battery voltage is provided, reached purpose of the present invention.
Advantage: the present invention passes through the output current of sampling proportioning valve coil, and by feeding back to the output of optocoupler after amplification, the comparison process, has realized Current Negative Three-Point Capacitance.Circuit is simple and reliable, is easy to realize.
Embodiment
Embodiment 1: this compensating circuit comprises photoelectric coupled circuit, switch transformed circuit, the PWM output circuit, sample circuit, amplifying circuit, low pass filter and comparison circuit, the output of photoelectric coupled circuit is connected with the input of switch transformed circuit with the output of comparison circuit simultaneously, the output of switching circuit is connected with the input of PWM output circuit, the output of PWM output circuit is connected with the input of sample circuit, the output of sample circuit is connected with the input of amplifying circuit, and the output of amplifying circuit is connected with the input of comparison circuit with the output of low pass filter simultaneously.
The control method of this compensating circuit is: the PWM1 signal that processor P IC16F73 produces, at first carry out electrical isolation by optocoupler, be connected on the base stage of triode PT1 then by a diode PD1, triode PT1, triode PT2, triode PT3 and triode PT4 are on off state, utilize the switching characteristic of triode PT1, triode PT2, triode PT3 and triode PT4 to become the signal condition from the input of triode PT1 base stage duty ratio constant, high potential, the rational signal of electronegative potential amplitude; The break-make of the field effect transistor PT5 of this signal controlling PWM output circuit, the signal loading of PWM output circuit on the coil of proportioning valve; Sampling resistor PR18 of series connection in the proportioning valve coil COIL loop, the current signal that flows through on sample electric positive PR18 and the proportioning valve coil POLL is the same; When proportioning valve coil COIL has electric current to flow through, by amplifier POA the voltage on the sampling resistor PR18 is suitably amplified, process amplifier POA amplifying signal is the reverse input end signal of device PUA as a comparison; Another road PWM2 signal by processor P IC16F73 generation according to the input variation, become and the linear direct current signal of PWM2 signal dutyfactor by the RC low-pass filtering treatment, be connected on the input in the same way of comparator PUA, the output signal of comparator PUA is delivered to the output of photoelectric coupled circuit, constitutes a negative feedback control loop.
The PWM1 signal that the duty ratio that processor P IC16F73 produces is constant is exported the positive pole that is connected on diode PD1 by optocoupler PO1, and the negative pole of diode PD1 connects the base stage of triode PT1.Triode PT1, triode PT2, triode PT3, triode PT4 form switch transformed circuit, and the high level and the low level of input triode PT1 base stage are changed.When input triode PT1 base stage B is high level, triode PT1 conducting, the collector electrode C of triode PT1 is a low level, resistance PR4 and resistance PR5 dividing potential drop, triode PT2 conducting, the collector electrode C of triode PT2 is a high level, triode PT4 conducting, field effect transistor PT5 conducting, the drain D output high level of field effect transistor PT5.When input triode PT1 base stage B is low level, not conducting of triode PT1, the collector electrode C of triode PT1 is a high level, not conducting of triode PT2, the collector electrode C of triode PT2 is lower than supply voltage, triode PT3 conducting, not conducting of field effect transistor PT5, the drain D no-output of field effect transistor PT5.
The pwm signal PWM2 that another road that processor P IC16F73 produces changes according to input is connected on the input in the same way of amplifier POA through processing.The PWM1 signal frequency will be higher than the frequency of PWM2 signal, is generally its integral multiple.Capacitor P WC1, capacitor P WC2, resistance PR12, capacitor P WC3, capacitor P WC4, resistance PR13 constitute the passive low-pass filter network of second order, and the PWM2 conversion of signals is become and the linear direct current signal of duty ratio.The value of resistance capacitance will be determined according to the frequency and the voltage accuracy of PWM2 signal.
Resistance PR18 is a sampling resistor, its two ends respectively by resistance PR16, resistance PR17 be connected on amplifier POA in the same way and reverse input end.Because the signal of gathering is smaller, therefore need add that amplifier carries out suitable amplification.Resistance PR16, resistance PR17, amplifier POA and resistance PR15 form differential amplifier circuit, and the voltage signal on the sampling resistor is amplified to suitable value.Voltage signal after the amplification is received the reverse input end of comparator PUA by PR14.
Comparator PUA and resistance PR11 form comparison circuit.Comparator PUA imports the direct current signal after the termination PWM2 signal processing in the same way, and reverse input end connects the sampled voltage signal after the amplification, and the output of comparator PUA is connected on the positive pole of diode PD1.Resistance PR11 is connected between the input in the same way and output of comparator, can introduce positive feedback between output and input like this, prevents comparator PUA output jitter.
Because the output signal of optocoupler and the output signal of comparator all are connected on the positive pole of diode PD1, so whether the conducting of diode PD1 and triode PT1 is determined jointly by these two signals.Therefore because when having only these two signals to export high level simultaneously, diode PD1 and triode PT1 just understand conducting, only in optocoupler is output as the time of high level, the output of comparator just can be worked.
VCC is higher than standard value when supply voltage, and under the situation of not considering comparator output, the electric current that flows through proportioning valve coil and sampling resistor will increase, and the voltage on the resistance PR18 increases.Because the voltage signal that is added on the proportioning valve coil is the pwm signal of being controlled by field effect transistor PT5, but current signal can not suddenly change, therefore the electric current that flows through on proportioning valve and the sampling resistor is the signal of sawtooth pattern, and the voltage signal on the resistance PR18 also is a sawtooth pattern.After by amplification and comparison circuit, the increase of resistance PR18 voltage causes the voltage of comparator PUA reverse input end to increase, the voltage signal of sawtooth pattern can wholely increase, reverse input end voltage surpasses in the same way that the time of input terminal voltage can increase in one-period like this, and the time of comparator output low level increases.In the time of optocoupler output high level, the ON time of diode PD1 and triode PT1 reduces, and field effect transistor PT5 ON time reduces, and the duty ratio that finally causes being added in the pwm signal on the proportioning valve coil reduces, and electric current reduces on the proportioning valve coil.Equally, VCC is lower than standard value when supply voltage, and the voltage signal of sawtooth pattern can integral body reduce, and reverse input end voltage surpasses in the same way that the time of input terminal voltage can reduce in one-period like this, and the time of comparator output high level increases.In the time of optocoupler output high level, the ON time of diode PD1 and triode PT1 increases, and field effect transistor PT5 ON time increases, and the duty ratio that finally causes being added in the pwm signal on the proportioning valve coil increases, and electric current increases on the proportioning valve coil.So no matter supply voltage slightly increases or reduces, the proportioning valve electric current all can be stabilized in desired value near, do not have big fluctuation, guarantee the reliability of proportioning valve output.Diode PD3, COIL, resistance PR18, PFU form freewheeling circuit, prevent that big sudden change from appearring in the voltage on the proportioning valve.
The optical coupling isolation circuit of PWM output; The switch level translation circuit of forming by triode and MOSFET; Pwm signal is transformed into the filter circuit of direct current; The sampling amplifying circuit; The comparator regenerative circuit; Proportioning valve coil freewheeling circuit.
The PWM1 signal is the signal by the fixed duty cycle of processor P IC16F73 generation, and at its output terminating diode PD1, guarantees its unidirectional conduction.
Its switch level change-over circuit is made up of four transistors and a field effect transistor.Wherein PT1, PT4 are the NPN type, and PT2, PT3 are positive-negative-positive, and PT5 is a P channel power field effect transistor.The emitter of PT4 connects the 12V power supply, and has connect a diode between emitter and base stage.PT3 and PT4 common collector, and be connected on the VCC by pull-up resistor PR9.
The PWM2 signal that carries out filtering is produced by controller, and its duty ratio can change according to the input of controller.Pwm signal is transformed into direct current signal and realizes by second-order low-pass filter.
The sampling of proportioning valve coil current is less by the resistance of series connection with it, and the resistance PR18 that power is bigger realizes.The amplification of sampled voltage is to utilize differential amplifier circuit.
In the comparator circuit, comparator what import termination in the same way is the PWM2 signal through the direct current signal of conversion, inverse output terminal connects is signal after sampled voltage amplifies, has been connected resistance PR11 at the output of comparator with input in the same way, has introduced positive feedback.The output of comparator is connected on the positive pole of diode PD1.
Be connected in series a resettable fuse PFU in the output circuit of proportioning valve coil, can have effectively carried out current limliting to output circuit, protection ratio valve coil is without prejudice.Diode PD3 of reversal connection between the drain electrode of PT5 and ground, Comparative Examples valve coil electric current carries out afterflow.
The output of optocoupler and the output of comparator are connected together, and control the conducting of PD1 and PT1 jointly.
Among Fig. 2, PO1 is an optocoupler among the present invention; PT1, PT4 are NPN type triode; PT2, PT3 are the positive-negative-positive triode; Field effect transistor PT5 is a P channel power field effect transistor; PD1, PD2, PD3, PD4 are diode; The model of amplifier POA is LM358; The model of comparator PUA is LM393; PR1, PR2, PR3, PR4, PR5, PR6, PR7, PR8, PR9, PR10, PR11, PR12, PR13, PR14, PR15, PR16, PR17, PR18 are resistance; PWC1, PWC2, PWC3, PWC4, PWC5, PWC6, PWC7, PWC8, PWC9 are electric capacity; PFU is a resettable fuse; COIL is the proportioning valve coil.