A kind of method for controlling power supply and device
Technical field
The present invention relates to the power supply control technology, relate in particular to a kind of method for controlling power supply and device.
Background technology
Integrated Service Digital Network far-end power supply provides the redundant power supply mode for the S/T interface user of NT1, for the far-end client functional reliability of this interface provides strong assurance.According to ITU description I.430, the network terminal (NT) is defined as the interface between reference point U and the S/T; NT1 is exactly the transducer of different sign indicating number types between u interface and the S interface, as shown in Figure 1.
Because the S/T interface is positioned at the terminal of subscriber line circuit, therefore subject to the subscriber line termination environmental interference, as thunderbolt, surge etc.; The realization principle of NT1 as shown in Figure 1.
Industry has following scheme about far-end power supply control technology network side at present:
Control circuit is controlled by the single IC for both chip IC.This scheme causes this circuit closely to link to each other with user interface circuit because of the logic and the physical relation of device.Because user interface circuit voltage height, electromagnetic interference (EMC) and surge impact phenomenon are comparatively serious, this has just proposed austere requirement because to the grade that chip satisfies safety standard, realizes that in side circuit the equipment fault that difficulty comparatively causes in other words thus is difficult to overcome.Can not adjust flexibly and control corresponding to the magnitude numerical value of monitor current in addition.
Summary of the invention
The invention provides a kind of method for controlling power supply and device, exist power-supplying circuit to be interfered easily in the prior art and cause job insecurity to solve, and the problem that can't adjust flexibly of Control Parameter.
A kind of method for controlling power supply comprises the steps:
The electric current of sampling load circuit also obtains sampled signal;
Described sampled signal and the given signal that is used for overcurrent protection are relatively produced first signal;
With described first signal be used for constant current reference signal and compare, produce the constant current control signal;
Utilize described constant current control signal control load loop, if electric current raises when making the constant current control signal present first state, reduce electric current gradually by this constant current control signal,, improve electric current gradually by this constant current control signal if electric current reduces when making the constant current control signal present second state; And
Produce secondary signal during greater than protective current at described electric current, force the switching off load loop and the constant current control signal was lost efficacy by secondary signal.
According to said method:
When electric current surpasses the scheduled time greater than protective current, produce the over-current state signal, be used to force switching off load loop and the shutoff control signal that the constant current control signal was lost efficacy according to this over-current state signal and the generation of given state signal by secondary signal.
Described shutoff control signal acts on the given state signal, keeps described shutoff control signal by this given state signal.
Utilize described judgement control signal that the working state signal of power supply circuits is provided.
Described constant current reference signal, described given signal and the described overcurrent time that is used for overcurrent protection are determined by circuit parameter, and adjust by revising circuit parameter.
A kind of power supply control apparatus comprises:
Current sampling circuit, the electric current of the load circuit that is used to sample also obtains sampled signal;
The intermediate controlled circuit is connected with described current sampling circuit, is used for described sampled signal and the given signal that is used for overcurrent protection are relatively exported first signal, and produces secondary signal during greater than the protective current set at described electric current;
Output state monitors and constant current feed circuit, is connected with described intermediate controlled circuit, is used for that generation is used for the constant current control signal of constant current according to first signal, and utilizes the electric current in constant current control signal regulating load loop;
The maximum current testing circuit is connected with described intermediate controlled circuit, is used for producing the over-current state signal according to the secondary signal that receives;
The input state control circuit is connected with described maximum current testing circuit, is used for according to described over-current state signal and given state signal, produces the shutoff control signal that is used to force the switching off load loop;
Control unit is connected with the input state control circuit, is used to provide described given state signal, and controls this given state signal when producing described shutoff control signal, turn-offs control signal to keep the output of input state control circuit.
Described current sampling circuit comprises: sampling resistor, the comparator that is connected with this sampling resistor; This comparator will compare from voltage signal and the reference voltage that sampling resistor obtains, the sampled signal of output expression size of current.
Described intermediate controlled circuit is the bridge circuit that resistance constitutes, and described given signal that is used for overcurrent protection and sampled signal are as the input of electric bridge, and its output monitors with output state with the maximum current testing circuit respectively and constant current feed circuit is connected.
Described maximum current testing circuit comprises first comparator, and second comparator that is connected with first comparator is connected in the delayer between first comparator and second comparator; First comparator compares first signal and reference signal, outputs to second comparator, the second comparator output overcurrent status signal after the output time-delay of delayer with first comparator.
Described input state control circuit comprises a plurality of logic gates, is used for described given state signal and crosses flow control signals being combined into the shutoff control signal.
Described output state monitors and constant current feed circuit comprises switching tube, comparator that is electrically connected with switching tube and charging and discharging circuit; Described comparator relatively produces the constant current control signal that is used to control described switching tube with first signal and constant current reference signal; When the electric current rising makes the constant current control signal present first state, this constant current control signal is turn-offed described switching tube, described charge-discharge circuit turn-offs gradually by switch in the discharge control load loop, when the electric current reduction makes the constant current control signal switch to second state by first state, this constant current control signal makes described switching tube conducting, and described charge-discharge circuit is by switch conducting gradually in the charging control load loop.
Described control unit is central processing unit (CPU).
The present invention can realize the over-current detection to the ISDN Remote Power Supply effectively, and constant current function and CPU can force to turn-off and open the function of Remote Power Supply at any time.The present invention is realizing that function adopts split circuit simultaneously, can regulate resistance value on request and change constant current point and cross flow point, has avoided original integrated circuit (IC) chip to bring to such an extent that be difficult to change the defective of monitoring numerical value.
Description of drawings
Fig. 1 is the schematic diagram of the network terminal in the prior art;
Fig. 2 is the theory diagram of NT1 in the prior art;
Fig. 3 is the structured flowchart of power supply control apparatus of the present invention;
Fig. 4 is the circuit theory diagrams of current sampling circuit of the present invention;
Fig. 5 is the circuit theory diagrams of intermediate controlled circuit of the present invention;
Fig. 6 is the circuit theory diagrams of maximum current testing circuit of the present invention;
Fig. 7 is the circuit theory diagrams of input state control circuit of the present invention;
Fig. 8 is the circuit theory diagrams of output state supervision of the present invention and constant current feed circuit.
Embodiment
Consult shown in Figure 3ly, power supply control apparatus of the present invention comprises: control unit, and current sampling circuit, the intermediate controlled circuit, the maximum current testing circuit, the input state control circuit, and output state monitors and constant current feed circuit.
Current sampling circuit is used for the line current sampling, and sampled signal Vq is delivered to the intermediate controlled circuit.
The intermediate controlled circuit will be used for the reference voltage V ref of overcurrent protection and sampled signal relatively, output signal VQ1, and when line current surpasses the protective current of setting output overcurrent signal VQ2.
The maximum current testing circuit is connected with the intermediate controlled circuit, according to the over-current signal VQ2 of intermediate controlled circuit output, to input state control circuit output overcurrent status signal ST.
The input state control circuit is connected with described maximum current testing circuit, is used for according to described over-current state signal ST and given state signal SI, produces the shutoff control signal that is used to force the switching off load loop, and produces working state signal SC.
Control unit, be connected with the input state control circuit, be used to provide described given state signal SI, and when producing described shutoff control signal, control this given state signal SI, to keep the output of input state control circuit to turn-off control signal, promptly be in self-locking state.
Output state supervision and constant current feed circuit are connected with the intermediate controlled circuit, are used for the signal VQ1 according to the output of intermediate controlled circuit, the constant current control signal of the control switch output constant current in load circuit; If electric current raises when making the constant current control signal present first state, reduce electric current gradually by this constant current control signal, if electric current reduces when making the constant current control signal present second state, improve electric current gradually by this constant current control signal.
In the present embodiment, described control unit is a central processing unit.
Consult shown in Figure 4ly, sample circuit mainly comprises sampling resistor Rq and comparator OP2.When the operating current Iq that outside need monitors flow through sample resistance Rq, the reference signal of sampled signal Vq that sample circuit obtains and comparator OP2 was sent signal Vq0 after relatively.
Consult shown in Figure 5ly, the intermediate controlled circuit is the bridge circuit that resistance R 1, R2, R3 and R4 constitute, by impedance operator and electrical bridge principle, the maximum current testing circuit, current sampling circuit, the input state control circuit, and output state monitors and constant current feed circuit organically is linked together.The intermediate controlled circuit compares the reference voltage V rfe of the overcurrent protection of sampled signal Vq0 and expression setting; monitor and constant current feed circuit output signal VQ1 to output state; and when line current surpasses the maximum current of setting, to maximum current testing circuit output signal VQ2.
Consult shown in Figure 6ly, the maximum current testing circuit comprises: comparator OP3, the comparator OP4 that is connected with comparator OP3 is connected in the delayer CRLT between comparator OP3 and the comparator OP4.After producing over-current signal VQ2, comparator OP3 compares output signal VQ3 with over-current signal VQ2 and reference signal, delayer CRLT is to the signal VQ3 time-delay of comparator OP3 output, also there be (being still overcurrent of load current) in over-current signal VQ2 in delay time, comparator OP4 output overcurrent status signal ST.Because the restriction of the t of the delay time of delayer CRLT, the moment can guarantee over-current state signal ST=0 powering on.
Consult shown in Figure 7ly, the input state control circuit comprises the logic OR not gate.Given state signal SI is by certain I/O mouth control of CPU, and the input state control circuit carries out logical combination according to given state signal SI and over-current state signal ST, exports one and turn-offs control signal SC.After handling through correlation module, finally can produce the status signal SO that is used to monitor, and this status signal SO is reported certain I/O mouth of CPU, with the prompting user.Also can directly report as status signal turn-offing control signal SC.
Powering on initially, given state signal SI=" 0 ", over-current state signal SI=" 0 ", guaranteed shutoff control signal SO=" 0 ", it is inoperative promptly to turn-off control signal, make entire circuit be in normal operating conditions, when a signal is for " 1 " in over-current state signal ST or given state signal SI appoint, produces and turn-off control signal SO=" 1 ".
Consult shown in Figure 8ly, output state monitors and constant current feed circuit comprises: triode Q2, by the comparator OP1 that resistance R 1 is connected with switching tube Q2 base stage, the charging and discharging circuit CRL that is connected with triode Q2 emitter; Simultaneously, the drain electrode output control signal signal of the CMOS pipe Q1 (not shown) of the emitter of triode Q2 in being serially connected in load circuit is with the regulating load electric current.When control signal is turn-offed in the output of input state control circuit, when promptly turn-offing control signal SO=" 1 ", make the base stage of triode be clamped at high level state, force to turn-off triode Q2 and the constant current control signal was lost efficacy.
The delay time of above-mentioned constant current reference signal, the described given signal that is used for overcurrent protection and overcurrent is determined by circuit parameter, and is adjusted by revising circuit parameter.
Consult Fig. 5, Fig. 6, Fig. 7 and Fig. 8, its groundwork principle is as follows:
When the electric current I q of overcurrent protection electric current I g>load circuit of setting; this moment over-current signal Vq2=VEE; signal VQ1 in the intermediate controlled circuit monitor by output state and constant current feed circuit in comparator OP1 after the constant current control signal that produces make triode Q1 conducting; stably provide constant feed current to CMOS pipe Q1, charge-discharge circuit CRLT is in the charging stage.
When the electric current I q of load circuit 〉=overcurrent protection electric current I g; signal VQ1 in the intermediate controlled circuit makes the polarity of comparator OP1 upset occur; turn-off the output of triode Q2; but because the effect of charge-discharge circuit CRL; the voltage of the drain electrode of CMOS pipe will be kept a period of time and constantly descend, and the electric current of load circuit is constantly reduced.Be accompanied by the minimizing of flowing through load current, signal VQ1 is during less than the reference signal of comparator OP1, and the output of comparator OP1 will change once more makes triode Q2 conducting, charge-discharge circuit CRL begin charging, control CMOS manages conducting gradually, and the line circuit of load circuit is raise gradually.This process constantly repeats during operation, thereby has guaranteed the constant current operating characteristic.
When the electric current I q of load circuit 〉=overcurrent protection electric current I g, the signal of the comparator OP4 output ST=VCC in the maximum current testing circuit shown in Figure 6 produces by input state of a control circuit and to be used to force the status signal SC in switching off load loop.Owing to have charging circuit CRLT in the maximum current testing circuit, to producing status signal ST delay time is arranged from producing over-current signal VQ2, as overcurrent time tg<delay time t, status signal ST=" 0 ", this moment also monitors by output state and constant current feed circuit carries out constant current control, after over-current signal disappeared, the feed current of output just can recover automatically; If during overcurrent time tg 〉=delay time t, status signal ST=" 1 ", CPU will pick up this over-current signal from the SO output, and make the given state signal SI=" 1 " of input state control circuit, and formation self-locking state, therefore in this case if eliminate this over-current state, must guarantee the fail safe of control device and load with this by cpu reset.
The modular circuit that the present invention proposes can realize the over-current detection to the ISDN Remote Power Supply effectively, and constant current function and CPU can force to turn-off and open the function of Remote Power Supply at any time.Especially the present invention adopt that software and hardware combining makes not only that circuit structure is more succinct, safety and be easy to control; Simultaneously, the related resistors numerical value of adjusting module is chosen the power supply of monitoring maximum far and is flow through flow point, thereby realizes the output current of this module of auto-control easily, for remote subscriber provides reliably, and stable working power.
Above-mentioned only the present invention will be described with better embodiment, but enforcement of the present invention is not limited to this, can not adopt CPU as control unit, and adopt other logical blocks to constitute.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.