Summary of the invention
The present invention is directed to solve at least some of the technical problems in related technologies.For this purpose, of the invention
One purpose is to propose a kind of long luminescence detection apparatus of ONU optical module based on electric current.
It is another object of the present invention to propose a kind of long luminous detection method of ONU optical module based on electric current.
To achieve the above object, on the one hand, the ONU optical module long hair light detection according to an embodiment of the present invention based on electric current
Device, comprising:
Optical module;
Power supply, the power supply are connected to the emission power end of the optical module by a metal-oxide-semiconductor switching circuit;
Current detection circuit, the current detection circuit are connected to the metal-oxide-semiconductor switching circuit and the emission power end
Between, to detect the operating current at the emission power end;
Watchdog circuit, the watchdog circuit is connected with the current detection circuit and metal-oxide-semiconductor switching circuit, to root
The on-off of the metal-oxide-semiconductor switching circuit is controlled according to the operating current.
In addition, the ONU optical module long luminescence detection apparatus according to the above embodiment of the present invention based on electric current can also have
There is following additional technical characteristic:
According to one embodiment of present invention, further includes:
CPU, the GPIO pin of the CPU are connected with the metal-oxide-semiconductor switching circuit, to control the metal-oxide-semiconductor switch electricity
The on-off on road.
According to one embodiment of present invention, the current detection circuit includes:
Current sampling module, to acquire the operating current at the emission power end;
Comparator, the comparator and the current sampling module, to by the average value of the operating current and default
Threshold value is compared, and when the average value of the operating current is less than the predetermined threshold value, then exports square-wave signal to institute
State watchdog circuit, the watchdog circuit exports high level to the metal-oxide-semiconductor switching circuit according to the square-wave signal, so that
The metal-oxide-semiconductor switching circuit is held on;
When the operating current average value be greater than the predetermined threshold value, then export constant level signal and guard the gate to described
Dog circuit, the watchdog circuit export low level to the metal-oxide-semiconductor switching circuit, so that institute according to the constant level signal
State the disconnection of metal-oxide-semiconductor switching circuit.
According to one embodiment of present invention, the current sampling module includes first resistor, second resistance and the first electricity
Hold, wherein one end of the first resistor is connected with the first inverting input terminal of the power supply and the comparator, described
The other end of first resistor is connected with the one end at emission power end and second resistance, the other end of the second resistance and the ratio
It is connected compared with the first non-inverting input terminal of device and one end of first capacitor, the other end of the first capacitor and the comparator connect
Ground terminal is grounded jointly;
First output end of the comparator is connected to one end of one the 4th resistance, the other end connection of the 4th resistance
It is connected to a 3rd resistor and one end of one second capacitor, the other end of the 3rd resistor with the power supply, described
The other end of two capacitors is grounded;
The positive power source terminal of the comparator is connected to supply voltage a VDD, the supply voltage VDD and passes through one the 4th capacitor
Ground connection, the second output terminal of the comparator are connected to one the 7th resistance and one the 5th capacitor one end, the 7th resistance it is another
One end connects the watchdog circuit, the other end ground connection of the 5th capacitor, the second inverting input terminal of the comparator with
Described one end of second capacitor is connected, and the second non-inverting input terminal of the comparator is connected to one the 5th resistance, one the 6th
One end of resistance and a third capacitor, another termination power supply of the 5th resistance, the 6th resistance it is another
The other end of end and the third capacitor is grounded jointly.
According to one embodiment of present invention, the watchdog circuit includes watchdog chip, the tenth capacitor, the 11st electricity
Appearance, the tenth resistance, eleventh resistor, twelfth resistor, thirteenth resistor, the 12nd capacitor, the 14th resistance, the 15th resistance
And the 16th resistance;
One end of tenth resistance connects the power supply, the other end and the house dog core of the tenth resistance
One end of the hand-reset pin of piece, the tenth capacitor and eleventh resistor is connected, the other end of the eleventh resistor with it is described
The house dog output pin of watchdog chip is connected, the other end ground connection of the tenth capacitor;
One end of 11st capacitor is connected with the positive power source terminal of the watchdog chip and the power supply, described
The other end of 11st capacitor is grounded jointly with the ground terminal of the watchdog chip;One end of the thirteenth resistor with it is described
The Power Supply Monitoring output pin of watchdog chip and one end of twelfth resistor are connected, the other end and electricity of the thirteenth resistor
One end of source voltage end VCC2 and the 12nd capacitor is connected, the other end of the other end of the twelfth resistor and the 12nd capacitor
Ground connection;
One end of 14th resistance falls signal output pin with the power supply of the watchdog chip and is connected, and described
The other end of 14 resistance is connected with one end of the power supply and the 15th resistance, the other end of the 15th resistance with
The reset output pin of the watchdog chip is connected, one end of the 16th resistance and the house dog of the watchdog chip
Input pin is connected;
The reset output pin of the watchdog chip is connected with the metal-oxide-semiconductor switching circuit, the watchdog chip
House dog input pin is connected with the current detection circuit.
According to one embodiment of present invention, the metal-oxide-semiconductor switching circuit include the 20th capacitor, the 21st capacitor,
Metal-oxide-semiconductor, the 20th resistance, the 41st resistance, triode, the 21st resistance, the 22nd capacitor, the 33rd resistance and
22nd resistance;
One end of 20th capacitor is connected with the drain electrode of one end of 21 capacitor and metal-oxide-semiconductor, and described second
The other end of ten capacitors and the 21st capacitor is grounded jointly, and the source electrode of the metal-oxide-semiconductor connects the emission power end and the 20th
One end of resistance, the grid of the metal-oxide-semiconductor meet the one of the collector of the triode, the 20th resistance and the 41st resistance
End, the base stage of another termination triode of the 41st resistance and one end of the 21st resistance, the triode
Emitter ground connection, the other end of the 21st resistance and the 22nd capacitor, the 23rd resistance, the 22nd
One end of resistance is connected, and the other end of the 22nd capacitor and the 33rd resistance is grounded jointly, the 22nd electricity
The other end of resistance is connected with the reset output pin of the watchdog chip.
On the other hand, the long luminous detection method of ONU optical module based on electric current provided according to embodiments of the present invention, application
In detection device as described above, comprising:
Current detection circuit detects the operating current at the emission power end of optical module;
Watchdog circuit controls the on-off of metal-oxide-semiconductor switching circuit according to the operating current.
According to one embodiment of present invention, the work electricity at the emission power end of the current detection circuit detection optical module
Stream includes:
Acquire the operating current at the emission power end of optical module acquisition optical module;
The average value of the operating current is compared by comparator with predetermined threshold value, when being averaged for the operating current
When value is less than the predetermined threshold value, then square-wave signal is exported to the watchdog circuit, when the average value of the operating current
Greater than the predetermined threshold value, then constant level signal is exported to the watchdog circuit;
The watchdog circuit according to the operating current control metal-oxide-semiconductor switching circuit on-off include:
Watchdog circuit exports high level to the metal-oxide-semiconductor switching circuit, so that the metal-oxide-semiconductor according to the square-wave signal
Switching circuit is held on;
Watchdog circuit exports low level to the metal-oxide-semiconductor switching circuit, so that described according to the constant level signal
Metal-oxide-semiconductor switching circuit disconnects.
The long luminous detection method of ONU optical module and device based on electric current provided according to the present invention, passes through current detecting
Circuit detects the operating current at the emission power end of optical module, then through watchdog circuit according to operating current control
The on-off of metal-oxide-semiconductor switching circuit.Since when optical module is in long luminance, operating current is that invariable shape is presented
State and be greater than work normally when average current, so, by the detection, the operating current can more accurately judge light
Whether module is in long luminance, and in long luminance, can be disconnected by control metal-oxide-semiconductor switching circuit, in turn
The long luminous optical module of shutdown in time is played, avoids impacting other ONU equipments.Meanwhile reduce the maintenance difficulties of ONU with
Cost.In addition, the present invention realizes current detecting, power cutoff by hardware circuit completely, CPU is eliminated the reliance on to judge, is detected
Judge and controls relatively reliable.
Specific embodiment
The embodiment of the present invention is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end
Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached
The embodiment of figure description is exemplary, it is intended to is used to explain the present invention, and is not considered as limiting the invention.
In the description of the present invention, it is to be understood that, term " center ", " longitudinal direction ", " transverse direction ", " length ", " width ",
" thickness ", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom" "inner", "outside", " up time
The orientation or positional relationship of the instructions such as needle ", " counterclockwise " is to be based on the orientation or positional relationship shown in the drawings, and is merely for convenience of
The description present invention and simplified description, rather than the device or element of indication or suggestion meaning must have a particular orientation, with spy
Fixed orientation construction and operation, therefore be not considered as limiting the invention.
In addition, term " first ", " second " are used for descriptive purposes only and cannot be understood as indicating or suggesting relative importance
Or implicitly indicate the quantity of indicated technical characteristic.Define " first " as a result, the feature of " second " can be expressed or
Implicitly include one or more of the features.In the description of the present invention, the meaning of " plurality " is two or more,
Unless otherwise specifically defined.
In the present invention unless specifically defined or limited otherwise, term " installation ", " connected ", " connection ", " fixation " etc.
Term shall be understood in a broad sense, for example, it may be being fixedly connected, may be a detachable connection, or be integrally connected;It can be machine
Tool connection, is also possible to be electrically connected;It can be directly connected, two members can also be can be indirectly connected through an intermediary
Connection inside part.For the ordinary skill in the art, above-mentioned term can be understood in this hair as the case may be
Concrete meaning in bright.
Shown in referring to Fig.1, the embodiment of the invention provides a kind of long luminescence detection apparatus of ONU optical module based on electric current,
It can be used for whether being in long luminance to the optical module 10 in ONU equipment and detect, and shine detecting in long
When state, the power supply of control optical module 10 is disconnected.It includes optical module 10, power supply 11, current detection circuit 12 and guards the gate
Dog circuit 14.
Specifically, power supply 11 is connected to the emission power end of the optical module 10 by a metal-oxide-semiconductor switching circuit 13
VCCT.Current detection circuit 12 is connected between the metal-oxide-semiconductor switching circuit 13 and the emission power end VCCT, to detect
The operating current of the emission power end VCCT.Watchdog circuit 14 and the current detection circuit 12 and metal-oxide-semiconductor switching circuit
13 are connected, to control the on-off of the metal-oxide-semiconductor switching circuit 13 according to the operating current.
The long luminous detection method of ONU optical module 10 and device based on electric current provided according to the present invention, is examined by electric current
Slowdown monitoring circuit 12 detects the operating current of the emission power end VCCT of optical module 10, then by watchdog circuit 14 according to the work
The on-off of metal-oxide-semiconductor switching circuit 13 described in current control.Since optical module 10 is in normal operating conditions, the transmitting of optical module 10
It is the pulse signal of mechanical periodicity when the operating current of power end VCCT, and when optical module 10 is in long luminance, work
It is the invariable state of presentation as electric current and is greater than average current when working normally, so, pass through the detection work
Electric current can more accurately judge that optical module 10 whether in long luminance, and in long luminance, can pass through
It controls metal-oxide-semiconductor switching circuit 13 to disconnect, and then plays the long luminous optical module 10 of shutdown in time, avoid making other ONU equipments
At influence.Meanwhile reducing the maintenance difficulties and cost of ONU.In addition, the present invention completely by hardware circuit realize current detecting,
Power cutoff eliminates the reliance on CPU15 to judge, detection judges and controls relatively reliable.
Referring to Fig.1 shown in, further include CPU15 in one embodiment of the invention, the GPIO pin of the CPU15 with
The metal-oxide-semiconductor switching circuit 13 is connected, to control the on-off of the metal-oxide-semiconductor switching circuit 13.
It should be noted that the CPU15 can be CPU15 in ONU equipment, such as PAS6301 chip etc..
That is, in the present embodiment, it can also be by CPU15 come the on-off of manual control MOS switch circuit, Jin Erguan
The sending function of optical module 10 is opened in supply shortage, is conducive to long-range fault diagnosis.
Referring to shown in Fig. 2, in one embodiment of the invention, current detection circuit 12 includes current sampling module 121
And comparator U1, operating current of the current sampling module 121 to acquire the emission power end VCCT;Comparator U1 with it is described
Current sampling module 121, the average value of the operating current to be compared with predetermined threshold value.
When the average value of the operating current is less than the predetermined threshold value, then square-wave signal is exported to the house dog
Circuit 14, the watchdog circuit 14 export high level to the metal-oxide-semiconductor switching circuit 13, so that institute according to the square-wave signal
Metal-oxide-semiconductor switching circuit 13 is stated to be held on.When the operating current average value be greater than the predetermined threshold value, then export constant
Level signal to the watchdog circuit 14, the watchdog circuit 14 exports low level to institute according to the constant level signal
Metal-oxide-semiconductor switching circuit 13 is stated, so that the metal-oxide-semiconductor switching circuit 13 disconnects.
As noted previously, as optical module 10 is in normal operating conditions, the work of the emission power end VCCT of optical module 10
It is the pulse signal (square-wave pulse) of mechanical periodicity when electric current, and when long luminance occurs in optical module 10, operating current
It is that invariable state is presented and is greater than average current when working normally, therefore, in the present embodiment, by presetting
Predetermined threshold value, the predetermined threshold value is slightly larger than average current when working normally, in this way, comparator U1 can first basis
The operating current that current sampling module 121 acquires calculates average value in one cycle, by the average value of the operating current with
Predetermined threshold value is compared, as long as the average value of operating current is lower than predetermined threshold value, illustrates that the optical module 10 is in just
Normal working condition, at this point, comparator U1 output square-wave signal to watchdog circuit 14 carries out feeding dog, the then basis of watchdog circuit 14
The square-wave signal keeps high level output, and then controls metal-oxide-semiconductor switching circuit 13 and be held on.And once operating current is averaged
Value is greater than predetermined threshold value, then illustrates that the optical module 10 is in long light emitting module 10, at this point, comparator U1 output constant level letter
Number to watchdog circuit 14 stop feed dog, watchdog circuit 14 then according to the constant level signal export low level, and then control
Metal-oxide-semiconductor switching circuit 13 disconnects, and then cuts off the power supply electricity of the emission power end VCCT of the optical module 10 in long hair light state
Source 11.In the present embodiment, using above-mentioned multilevel iudge mode, it can be ensured that rectangular light detection is relatively reliable accurate, simultaneously, it is ensured that
Luminous optical module 10, which can be grown, to be disconnected in time.
Referring to shown in Fig. 2, in one particular embodiment of the present invention, current sampling module 121 include first resistor R1,
Second resistance R2 and first capacitor C1, wherein one end of the first resistor R1 and the power supply 11 and the comparator
The first inverting input terminal IN1- of U1 is connected, the other end and emission power end VCCT and second resistance R2 of the first resistor R1
One end be connected, the first non-inverting input terminal IN1+ and first capacitor of the other end of the second resistance R2 and the comparator U1
One end of C1 is connected, and the ground terminal GND of the other end of the first capacitor C1 and the comparator U1 are grounded jointly;Comparator U1
The first output end Output1 be connected to one end of one the 4th resistance R4, the other end of the 4th resistance R4 is connected to one
One end of three resistance R3 and one second capacitor C2, the other end of the 3rd resistor R3 is connected with the power supply 11, described
The other end of second capacitor C2 is grounded;The positive power source terminal VCC of comparator U1 is connected to a supply voltage VDD, the supply voltage
VDD is grounded by one the 4th capacitor C4, and the second output terminal Output2 of the comparator U1 is connected to one the 7th resistance R7 and one
The other end of the 5th one end capacitor C5, the 7th resistance R7 connects the watchdog circuit 14, and the 5th capacitor C5's is another
One end ground connection, the second inverting input terminal IN2- of the comparator U1 is connected with described one end of the second capacitor C2, described
The second non-inverting input terminal IN2+ of comparator U1 is connected to the one of one the 5th resistance R5, one the 6th resistance R6 and a third capacitor C3
End, another termination power supply 11 of the 5th resistance R5, the other end of the 6th resistance R3 and third electricity
The other end for holding C3 is grounded jointly.
Wherein, optical mode is detected by the current sampling module 121 that first resistor R1, second resistance R2 and first capacitor C1 are formed
After the operating current of the emission power end VCCT of block 10, pass through the first inverting input terminal IN1- and the first normal phase input end IN1+
Input comparator U1 exports square-wave signal by second output terminal Output2 after comparator U1 is compared with predetermined threshold value
Dog feeding operation is carried out to watchdog circuit 14, or output constant level signal stops feeding dog to watchdog circuit 14.
Referring to shown in Fig. 3, watchdog circuit 14 includes watchdog chip U2, the tenth capacitor C10, the 11st capacitor C11, the
Ten resistance R10, eleventh resistor R11, twelfth resistor R12, thirteenth resistor R13, the 12nd capacitor C12, the 14th resistance
R14, the 15th resistance R15 and the 16th resistance R16;One end of the tenth resistance R10 connects the power supply 11, described
The hand-reset pin of the other end of tenth resistance R10 and the watchdog chip U2The electricity of tenth capacitor C10 and the 11st
The one end for hindering R11 is connected, the house dog output pin of the other end of the eleventh resistor R11 and the watchdog chip U2It is connected, the other end ground connection of the tenth capacitor C10;One end of the 11st capacitor C11 and the house dog core
The positive power source terminal VCC and the power supply 11 of piece U2 is connected, the other end and the house dog core of the 11st capacitor C11
The ground terminal GND of piece U2 is grounded jointly;One end of the thirteenth resistor R13 and the Power Supply Monitoring of the watchdog chip U2 are defeated
One end of pin PFI and twelfth resistor R12 are connected out, the other end and power voltage terminal VCC2 of the thirteenth resistor R13
And the 12nd capacitor C12 one end be connected, the other end of the twelfth resistor R12 and another termination of the 12nd capacitor R12
Ground;One end of the 14th resistance R14 and the power supply of the watchdog chip U2 fall signal output pinIt is connected, institute
The other end for stating the 14th resistance R14 is connected with one end of 11 and the 15th resistance R15 of power supply, the 15th electricity
Hinder the other end of R15 and the reset output pin of the watchdog chip U2It is connected, the 16th resistance R16's
One end is connected with the house dog input pin WD of the watchdog chip U2;The reset output pin of the watchdog chip U2It is connected with the metal-oxide-semiconductor switching circuit 13, the house dog input pin WD and the electric current of the watchdog chip U2
Detection circuit 12 is connected.
Wherein, the second output terminal Output2 of the house dog input pin WD access comparator U1 of watchdog chip U2 is defeated
Square-wave signal or constant level signal out, corresponding, the reset output pin of watchdog chip U2Export high level or
Low level, and then metal-oxide-semiconductor switching circuit 13 is controlled by high level and is connected, it is disconnected by low level control metal-oxide-semiconductor switching circuit 13
It opens.
Referring to shown in Fig. 4, metal-oxide-semiconductor switching circuit 13 include the 20th capacitor R20, the 21st capacitor R21, metal-oxide-semiconductor Q2,
20th resistance R20, the 41st resistance R41, triode Q1, the 21st resistance R21, the 22nd capacitor C22, the 30th
Three resistance R33 and the 22nd resistance R22;One end of one end of the 20th capacitor C20 and the 21 capacitor C21 and
The drain electrode of metal-oxide-semiconductor Q2 is connected, and the other end of the 20th capacitor C20 and the 21st capacitor C21 is grounded jointly, the MOS
The source electrode of pipe Q2 connects one end of the emission power end VCCT and the 20th resistance R20, and the grid of the metal-oxide-semiconductor Q2 connects described three
One end of the collector of pole pipe Q1, the 20th resistance R20 and the 41st resistance R41, the 41st resistance R41's is another
Terminate the base stage of the triode Q1 and one end of the 21st resistance R21, the emitter ground connection of the triode Q1, described the
The other end of 21 resistance R21 and the 22nd capacitor C22, the 23rd resistance R23, the 22nd resistance R22
One end is connected, and the other end of the 22nd capacitor C22 and the 33rd resistance R33 is grounded jointly, the 22nd electricity
Hinder the other end of R22 and the reset output pin of the watchdog chip U2It is connected.
When the other end of the 22nd resistance R22 accesses high level, then metal-oxide-semiconductor Q2 is connected, and when the 22nd resistance
When the other end of R22 accesses low level, then metal-oxide-semiconductor Q2 is disconnected.
Referring to Figure 5, the embodiment of the invention provides a kind of long luminous detection method of ONU optical module based on electric current,
Applied to the detection device as described in above-described embodiment, comprising:
S10, current detection circuit 12 detect the operating current of the emission power end VCCT of optical module.
S20, watchdog circuit 14 control the on-off of metal-oxide-semiconductor switching circuit 13 according to the operating current.
Referring to shown in Fig. 6 and Fig. 7, in one embodiment of the invention, step S10 includes:
S101, acquisition optical module acquire the operating current of the emission power end VCCT of optical module.
The average value of the operating current is compared by S102, comparator U1 with predetermined threshold value, when the work electricity
When the average value of stream is less than the predetermined threshold value, then square-wave signal is exported to the watchdog circuit 14, when the work electricity
The average value of stream is greater than the predetermined threshold value, then exports constant level signal to the watchdog circuit 14.
Step S20 includes:
S201, watchdog circuit 14 export high level to the metal-oxide-semiconductor switching circuit 13 according to the square-wave signal, so that
The metal-oxide-semiconductor switching circuit 13 is held on.
S202, watchdog circuit 14 export low level to the metal-oxide-semiconductor switching circuit 13 according to the constant level signal,
So that the metal-oxide-semiconductor switching circuit 13 disconnects.
The long luminous detection method of ONU optical module based on electric current provided according to the present invention, passes through current detection circuit 12
The operating current of the emission power end VCCT of optical module is detected, then institute is controlled according to the operating current by watchdog circuit 14
State the on-off of metal-oxide-semiconductor switching circuit 13.Since optical module is in normal operating conditions, the work of the emission power end VCCT of optical module
Make be when electric current mechanical periodicity pulse signal (square-wave pulse), and when optical module is in long luminance, operating current
It is the invariable state of presentation and is greater than average current when working normally, so, by the detection, the operating current can
It, can be by controlling metal-oxide-semiconductor more accurately to judge whether optical module is in long luminance, and in long luminance
Switching circuit 13 disconnects, and then plays the long luminous optical module of shutdown in time, avoids impacting other ONU equipments.Meanwhile
Reduce the maintenance difficulties and cost of ONU.In addition, the present invention realizes current detecting, power cutoff by hardware circuit completely, no longer
CPU is relied on to judge, detection judges and controls relatively reliable.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show
The description of example " or " some examples " etc. means specific features, structure, material or spy described in conjunction with this embodiment or example
Point is included at least one embodiment or example of the invention.In the present specification, schematic expression of the above terms are not
Centainly refer to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be any
One or more embodiment or examples in can be combined in any suitable manner.
Although the embodiments of the present invention has been shown and described above, it is to be understood that above-described embodiment is example
Property, it is not considered as limiting the invention, those skilled in the art are not departing from the principle of the present invention and objective
In the case where can make changes, modifications, alterations, and variations to the above described embodiments within the scope of the invention.