Background technology
Power over Ethernet (POE, be Power over Ethernet), power to the network terminal by ethernet networks such as 10base-T, 100BASE-TX, 1000BASE-T exactly, promptly the network terminal does not need external power supply, only needs a netting twine just can realize the power supply power supply.Along with the release of 802.3af standard and perfect, the POE technology has obtained application more and more widely, and along with the popularizing of equipment such as the IP phone of supporting the POE technology, wireless aps, portable equipment charger, machine for punching the card, camera, data acquisition unit, the POE switch has more and more wide application prospect.
Fig. 1 a and Fig. 1 b have represented the schematic diagram of two kinds of Power over Ethernet patterns respectively, and power supply unit is supported two kinds of Power over Ethernet patterns, respectively called after Mode A and Mode B.When Power over Ethernet, the down link of terminal power supply unit adopts Mode A or Mode B, also can adopt two kinds of patterns respectively at different links.Power over Ethernet equipment can be compatible with 10,000,000,100,000,000, and even the Ethernet of gigabit.Fig. 1 a represents the schematic diagram of Mode A power supply unit, and Mode A adopts 1,2,3,6 four holding wires (1,2 line is for sending holding wire, and 3,6 lines are the received signal line) in the Ethernet cable to transmit power supply.Fig. 1 b represents the schematic diagram of Mode A power supply unit, and Mode B then adopts 4,5 in the Ethernet cable, and 7,8 four idle lines transmit power supply.
Present most POE switch device can be supported the 802.3af standard, but the support (1,2,3,6) to the holding wire power supply can only be provided.But also some POE equipment, particularly some early stage POE equipment are not supported the 802.3af standard, these equipment can only be supported idle line supply power mode (4,5,7,8).And for the equipment of the support Power over Ethernet that in network, connects, may be the holding wire power supply unit, also may be the idle line power supply unit.Therefore need support the switch device of two kinds of patterns simultaneously.
In the prior art, if will realize of the support of the switch of supporting signal line power supply to the idle line power receiving equipment, can only realize by increasing special external conversion equipment, promptly the voltage on the holding wire is transferred to idle line, thereby realizes power supply the idle line power receiving equipment by the external conversion device.
External conversion equipment of the prior art is the external transducer shown in Fig. 1 c, and this transducer comprises the plug and socket of a pair of RJ45.Plug and socket connects by illustrated lead-in wire relation, and 1,2 pin that are about to plug are connected with 4,5 pin of socket, and 3,6 pin of plug are connected with 7,8 pin of socket.Plug is inserted on the port of switch, when port is worked under the Power over Ethernet pattern, port is still pressed the output of holding wire powering mode, but the line of process RJ45 connector/socket is to after transferring, voltage on the holding wire 1,2,3,6 is transferred on the idle line, thereby has realized power receiving equipment is powered with the idle line powering mode.On which port, connect the idle line power supply unit if desired, then need be on this port grafting said external transducer, the idle line power supply unit that will connect again is connected on the RJ45 socket of outside adapter.
Use the technical scheme of external transducer, not only cause system configuration complexity, complex operation, and because after increasing external adapter, its point of pegging graft increases, thereby has reduced system reliability.
And, when if this external transducer is fixedly installed on certain port, when the user changes terminal equipment (situation when for example, the user is replaced with the holding wire power supply unit to the idle line power supply unit), the situation that the meeting appearance can't be powered influences user's normal use.
Embodiment
What Fig. 2 represented the embodiment of the invention passes through the flow chart of Ethernet to outside power devices method.At first, in step 201, detect the state of the mode key (Mode key) of switch, to determine whether switch enters the Power over Ethernet pattern, and the number of times that is pressed in the given time at step 203 judgment model key, in the present embodiment, when mode key the scheduled time (for example, be pressed 1s) after twice, then switch enters the Power over Ethernet pattern.
Replacedly, mode key also can be set enter the Power over Ethernet pattern under other states, for example, the time of pressing mode key enters the Power over Ethernet pattern when surpassing the scheduled time.Or enter the Power over Ethernet pattern by modification to switch in house software module, for example,, promptly enter the Power over Ethernet pattern after the defining mode key is pressed, and replace the pattern of pressing mode key in the prior art and entering duplex state by revising software module.
In step 205, detect the power supply state of each port of switch, if port is in power supply state, generally the powering mode of this port is not changed, cause damage with the power receiving equipment of avoiding port is connected.So, in step 217, write down the supply lines preface of port, and judge whether that in step 204 power supply state of all of the port all finishes after testing, if inspection finishes, then return, and continue the state of monitoring mode key in step 201; If check as yet to finish, then get back to step 205 and continue next port is carried out the power supply state detection.
Replacedly, in another embodiment, also can just reset to described at the port of power supply state, promptly stop the charged state of described power supply port, thereby can change the power receiving equipment that port connects, and as following steps: detect power receiving equipment connection and type, switching supply lines preface, so that change its powering mode.
If port is in not power supply state,, detects this port and whether connected power receiving equipment then in step 209.Detection to power receiving equipment is by load a test voltage on the network cable, usually (this small voltage must guarantee in safe range according to power receiving equipment to add a small voltage on holding wire and dead pair respectively, in order to avoid damage hardware circuit), when having connected the network equipment on the port, flow through with regard to the electric current that has predetermined size in corresponding signal lines or the idle line.Whether at first, judging whether has electric current to flow through in holding wire He in the idle line, if all do not have electric current to flow through in two circuits, then thinking does not have power receiving equipment to be connected to this port or what be connected to this port is the non-Ethernet power receiving equipment; When all having electric current to flow through in two circuits, think that then abnormal conditions such as short circuit appear in this port or the power receiving equipment that is connected on this port.This is because a port can only be operated under a kind of powering mode, therefore if the situation that all has electric current to flow through in holding wire and idle line thinks that then this port breaks down.
For example, of the present invention by Ethernet in the device of outside power devices, when having the electric current that is not less than 50ma to flow through in holding wire or the idle line, think that port has correspondingly connected holding wire or idle line power receiving equipment.When in holding wire and idle line, all not having electric current greater than 50ma to flow through, think that then this port does not connect power receiving equipment or power receiving equipment cuts out; When holding wire and idle line all have electric current above 250ma to flow through, think that then this port or port device are in abnormalities such as short circuit.
If it is unusual to judge that this port or power receiving equipment occur, then in step 223, switch sends alarm signal to the outside, for example by the indicator light on the switchboard panel to the outside send flash signal or by other sound, the light mode indicates, perhaps send warning message, and cut off power supply simultaneously to the power receiving equipment that is connected by Ethernet other nodes on network.
Realize Power over Ethernet, connection device must correspondingly be supported.If terminal equipment is not supported corresponding Power over Ethernet mode, power supply unit is powered by force to it, occurs the situation that causes power receiving equipment to damage possibly.So power supply unit must detect power receiving equipment.
Therefore, in step 211, if it is normal to determine to have connected power receiving equipment and equipment and port working at port, the power receiving equipment that then needs further to detect the power receiving equipment that this equipment is supporting signal line powering mode or support the idle line powering mode.The voltage (this voltage should guarantee in the range of voltage values to power receiving equipment safety) that detects the power receiving equipment type and also be by idle line or holding wire being applied pre-sizing carries out, preferably, can by with step 209 in detect the identical voltage that is loaded when power receiving equipment connects and detect.For example, the power receiving equipment of supporting signal line powering mode can be associated in a resistance string at predetermined Standard resistance range in the circuit after being connected to port at present, therefore, when described voltage is loaded on the holding wire, can produce an electric current in predetermined magnitude range.If after loading described voltage on the holding wire, from output loop, measure electric current (for example 50ma-150ma) output of pre-sizing, think that then the equipment that switch connected is the power receiving equipment of holding wire power supply type; Equally,, from the output loop of idle line, measure the electric current output of pre-sizing, think that then this connection device is the power receiving equipment of idle line power supply type if after loading above-mentioned voltage on the idle line.
In step 213, if external equipment is a power receiving equipment of supporting the idle line power supply, then the supply line with this port switches to idle line, and voltage is exported from idle line.If external equipment is the power receiving equipment of supporting signal line power supply, then the supply line of port is switched to holding wire in step 215.Can power up power receiving equipment afterwards.
With an instantiation concrete steps that this power supply unit detects are described below, described detection comprises:
Present the voltage of 2.8V to 10V to each bar down link, and the electric current of detection line in real time.After power receiving equipment is connected to ethernet link, the detection resistance of a resistance between 23.75 to 26.25 kilo-ohms can be connected in series in the link in the power receiving equipment, cause the electric current of whole piece link to change, be equivalent to power receiving equipment and sent an application power supply signal to power supply unit.So power supply unit is confirmed to have power receiving equipment to be connected on the ethernet link and is being applied for power supply.By measurement, can calculate the resistance that detects resistance to electric current.Wherein, if detect resistance between 12 to 23.75 kilo-ohms or between 26.25 to 45 kilo-ohms, power supply unit will correctly detect power receiving equipment, but does not think that power receiving equipment at the application power supply, can not carry power supply to power receiving equipment yet.And if resistance value is less than 12 kilo-ohms or greater than 45 kilo-ohms accordingly, power supply unit will can correctly not discerned power receiving equipment, and will send an alarm signal this moment.
Because the power receiving equipment kind is numerous, also there is very big difference in the power that needs, so preferably, power supply unit need carry out optionally power classification operation to power receiving equipment, so that determine to distribute the power supply of much power to power receiving equipment.After the power level of determining power receiving equipment, power supply unit is increased to setting voltage (for example 48 volts) with supplying voltage, and beginning is sent to the power supply of power receiving equipment.
Fig. 3 represents to pass through the structural representation of Ethernet to the device of outside power devices according to the embodiment of the invention.Described device comprises power supply unit, also comprises mode key state detection unit, power supply detecting unit, port device detecting unit, mode switch element.
At first, the mode key of switch is done simple the introduction: mode key (Mode) is a switch, can realize that the circulation of switch ports themselves state model is switched.The user can pass through mode key, changes the operational mode of switch.For switch of the prior art, the pairing running status of mode key generally includes A/L (Active/Link) state and D/S (Duplex/Speed) state.Wherein, when the Active state was ON, the expression port had flow to pass through; When the Active state was OFF, the expression port does not have flow to be passed through; When the Link state was ON, expression connected correct; When the Link state was OFF, the expression malunion was true; When the Duplex state is ON, the expression duplex communication; When the Duplex state is OFF, represent non-duplex communication; When the Speed state is ON, expression port speed 100Mbps; When the Speed state is OFF, expression port speed 10Mbps.When switch is worked, when mode key is not pressed, expression A/L pattern (this pattern is also referred to as initial condition), be switch output Active and Link state parameter, for example at mode key when not pressing, represent Active and Link state (as the bright expression of green light Active state is ON, and the bright expression of amber light Link state is ON) by two indicator lights of switchboard panel.Equally, when mode key is pressed, expression D/S pattern.
And in the present invention, on the basis of existing technology, be provided with Power over Ethernet state model (Powered), described powering mode can be by pattern is replaced (for example dual-mode being replaced with the Power over Ethernet pattern) or the increase pattern realizes to having now.
Power supply unit comprises that the DC power supply, transformer and the corresponding lead-out terminal that are installed in the switch constitute, for power receiving equipment provides power supply.In conjunction with Fig. 1 a, 1b, for example, if the idle line supply power mode, then power supply is directly sent to the idle line terminal of power receiving equipment by idle line, provide power supply thereby be provided as power receiving equipment; If the holding wire supply power mode, then power supply is sent to the transformer input of power receiving equipment by transformer.
Described mode key state detection unit is used to detect the mode key state of switch.Low level (or high level) signal that key circuit was produced after the mode key state detection unit was pressed by detection Mode key comes the down state of mode key is discerned.In the present embodiment, by in the scheduled time, the number of times that the Mode key is pressed, state to button is judged, for example, when Mode key in 1 second is pressed twice the time, the mode key state detection unit detects two owing to button is pressed the low level that produces in 1 second the time interval, press in the given time twice thereby the mode key state detection unit detects mode key.After the mode key state detection unit detects mode key and presses twice, send the powering mode signal to mode switch element, so that the supply lines preface is switched, can carry out Power over Ethernet to described external equipment.Preferably, the mode key state detection unit is also sent the power supply detection signal to the power supply detecting unit, to detect the electric power thus supplied of power supply detecting unit detection port.In the embodiment of the replacement that mode key is had now pattern, after mode key was pressed, electric supply installation had just entered the Power over Ethernet pattern.The mode key state detection unit detects mode key with higher frequency, for example, every 20ms once to the status scan of mode key, so that during to mode switch, can in time capture the change of mode key state the user.
The power supply detecting unit is used for the power supply state of port is detected, if judge that power supply unit enters powering mode, the detecting unit of then powering detects all of the port of switch successively, to determine whether each port is in power supply state.For being in the not port of power supply state, then continue to detect the power supply type whether this port has connected external equipment and external equipment.For the port that is in power supply state, then write down the line preface of port, and do not change its power supply state, keep normal work to guarantee the outside network equipment that connects.
Selectively, in a further embodiment, for the port that is in power supply state, the power receiving equipment power supply that also can the interruption of power supply port be connected with the corresponding port, and then detect the type of described power receiving equipment so that change its powering mode or keep former powering mode.
In the power supply detecting unit, comprise line preface memory cell, described line preface memory cell is used to store the supply lines preface information of power supply port.Line preface memory cell is by various memories realizations, for example SDRAM, DDRAM, FLASH, EPROM, E
2Storage medium such as PROM, hard disk.
The port device detecting unit is used to detect the power receiving equipment type that connects on each port of switch.Described port device detecting unit detects by the voltage that power receiving equipment is loaded pre-sizing judges the port device type.Whether at first the port device detecting unit is judged has electric current to flow through in holding wire and idle line, if only in holding wire, there is electric current to flow through, think that then the holding wire power receiving equipment is connected to this port, if only in idle line, there is electric current to flow through, think that then the idle line power receiving equipment is connected to this port; If all do not have electric current to flow through in two circuits, then thinking does not have power receiving equipment to be connected to this port; When all having electric current to flow through in two circuits, think that then abnormal conditions such as short circuit appear in this port or the power receiving equipment that is connected on this port.Described port device detecting unit comprises current sensing means, for example various current sensors such as Hall element.Wherein, information such as short circuit, overcurrent also can detect by POE chip commonly used.
Mode switch element is used to set the powering mode of switch corresponding port.When mode key is pressed, the mode key state detection unit is sent the powering mode signal to mode switch element, after mode switch element receives the powering mode signal, again according to the signal of port device detecting unit, to power supply unit output mode switching signal, thereby switch the supply lines preface of corresponding port, make external equipment to receive the power supply input by ethernet port.In the present embodiment, described mode switch element is to realize by the switching devices such as relay that are installed in switch ports themselves to the switching of line preface.
Indicating member is used for the power supply state of display port and whether power supply state or power supply state be abnormal.In the present embodiment, adopt the state model indicator light of switchboard panel as display unit.Each state model indicator light that constantly only is switched to is lighted.The provider of state model indicator light the user according to oneself needs inquiries and confirm the current state of port, such as, the user wishes to understand the connection status of certain port, can pass through mode key, the state model indicator light is switched to the A/L state, observe the state of this port green indicating lamp this moment again, if green light is bright, expression connects correct; If green light extinguishes, then represent connection error.When power supply state was undesired, the power supply state indicator light then glimmered, with prompting custom system abnormal electrical power supply.By concrete states such as the going out of indicator light, bright, flickers, confirm the current state of this port.
In the present embodiment, after to switch power-up and initialization, port status pattern indicator light is A/L state (initial condition).Press mode key (Mode) and just can switch, 45 rear port states in second can restPose automatically (A/L state) port status.When indicator light was the A/L state, switch detected the far-end power receiving equipment by the data wire in the ethernet twisted pair.When indicator light switched to P (Power) state, switch detected, powers by holding wire in the ethernet twisted pair or dead pair power receiving equipment.
According to another kind of embodiment of the present invention, power supply unit can also be installed on the mid-span equipment.
Power supply unit with network power supply ability can directly provide power supply by the downlink Ethernet cable for power receiving equipment.And for conventional switch, do not possess the network power supply ability, therefore, need mid-span equipment be installed between conventional switch and power receiving equipment so that power supply capacity to be provided, the descending ethernet line of conventional switch is that power supply is not provided, but the Ethernet cable has just possessed the ability of carrying power supply to power receiving equipment after by mid-span equipment, and the user can provide power supply by Ethernet for power receiving equipment under the situation that keeps existing conventional switch.
And for mid-span equipment, generally only adopt 4,5,7 in the Ethernet cable, 8 four idle lines to transmit power supply, promptly can only be operated in Mode B.
The described Ethernet that passes through that is installed on the mid-span equipment comprises power supply unit to the device of outside power devices, also comprises mode key state detection unit, port device detecting unit, mode switch element, also comprises the power supply detecting unit in addition.
Power supply unit comprises that the DC power supply, transformer and the corresponding lead-out terminal that are installed in the mid-span equipment constitute, for power receiving equipment provides power supply.In conjunction with Fig. 1 a, 1b, for example, mid-span equipment adopts the idle line supply power mode, and promptly power supply directly sends to the idle line terminal of power receiving equipment by the idle line of mid-span equipment, thereby provides power supply for power receiving equipment.
Described mode key detecting unit is used to detect the mode key state of switch.Low level (or high level) signal that key circuit was produced after the mode key state detection unit was pressed by the detecting pattern key comes the down state of mode key is discerned.
The power supply detecting unit is used for the power supply state of port is detected, if judgement is in powering mode, the detecting unit of then powering detects all of the port of switch successively, to determine whether each port is in power supply state.To being in the not port of power supply state, then continue to detect the power supply type whether this port has connected external equipment and external equipment.To being in the port of power supply state, then write down the line preface of port, and do not change its power supply state, keep normal work to guarantee the outside network equipment that connects.
The port device detecting unit is used to detect the power receiving equipment type that connects on each port of mid-span equipment.Described port device detecting unit detects by the voltage that power receiving equipment is loaded pre-sizing judges the port device type.Whether at first the port device detecting unit is judged has electric current to flow through in the idle line, if there is not electric current to flow through, then thinking does not have power receiving equipment to be connected to this port; Described port device detecting unit comprises current sensing means, for example various current sensors such as Hall element.
Mode switch element is used to set the powering mode of mid-span equipment corresponding port.When mode key is in powering mode, the mode key state detection unit is sent the powering mode signal to mode switch element, after mode switch element receives the powering mode signal, again according to the signal of port device detecting unit, to power supply unit output mode switching signal, thereby with the supply lines preface of corresponding port never power supply state switch to the idle line power supply state, make external equipment can receive the power supply input by the idle line of ethernet port.In the present embodiment, described mode switch element is to realize by the switching devices such as relay that are installed in the mid-span device port to the switching of line preface.
Described indicating member is used for the display mode bonded state.In the present embodiment, adopt the state model indicator light of mid-span device panel as display unit.Each state model indicator light that constantly only is switched to is lighted.
Fig. 4 be according to an embodiment of the invention Ethernet to the hardware configuration schematic diagram of outside power devices device.Wherein, can control the supply lines preface of switch to the relay of the device control of outside power devices by Ethernet.As shown in the figure, in the electric supply installation of present embodiment, comprise the plug side of RJ45.Described RJ45 connector side connects power supply unit, and comprises the RJ45 socket side in power receiving equipment.In electric supply installation, comprise power management module, relay and corresponding Ethernet cable terminal, described power management module is controlled relay by the software and hardware control logic that operates in wherein, to realize Power over Ethernet.The control coil of described relay can be integrated in the power management module, and power management module is by applying the control of voltage realization to relay to relay coil.
Under the holding wire power supply state of acquiescence, the end of fixing of relay 10 contact centerings is connected with positive source, and the other end is in 11 contacts; The end of fixing of the contact centering of relay 20 is connected with power cathode, and the other end is in 21 contacts.At this moment, the supply lines preface is: 1,2 and 3,6, and electric supply installation is in holding wire supply lines preface; After switching the supply lines preface under the control at the power management module of electric supply installation, two actuatings of relay, an end of relay 10 be connected to 12 contacts, relay 20 an end be connected to 22 contacts, at this moment, the supply lines preface is: 4,5 and 7,8, and electric supply installation is in idle line supply lines preface.
In a preferred embodiment of the invention, be with switch as Power over Ethernet equipment, in fact, other support the network switching equipment of Power over Ethernet modes also can be used as Power over Ethernet equipment, and router of Power over Ethernet or the like for example is provided.
It may be noted that for enforcement of the present invention to be not limited to the foregoing description,, only otherwise break away from spirit of the present invention, also belong to protection scope of the present invention if other forms of modification arranged.