[Kajer] was doing some work with IP phones that use Power over Ethernet. While trying to get this to work with a network switch he decided to use PoE to power the switch itself. The best thing about this is he managed to shoehorn all of the necessary bits into the stock case. Those bits include a bridge rectifier, transistor, resistor, and a 5v power supply. Along the way he discovered he can now power the switch off of USB if he wishes.
34 thoughts on “Powering A Switch Via PoE”
Nice job Kajer!
holy spellchecking web design batman
well at least it has all the pictures and writeup on one page
other than that this is a very clever well done hack
Only problem with this is that gigabit ethernet uses all 4 pairs, and if he takes any away for power usage, then he looses the gigabit connectivity. Otherwise nice hack that I have done several times.
@Jared – thanks
@kirov – I fixed some spelling errors…
@duncant20196 – The port I used to pull PoE still links at gigglebit and to non-PoE sources. The power comes over 2 of the data pairs.
Those black boxes that he calls “port magnetics”
Does anyone know what they are or what they do?
I see them all the time in ethernet cards and routers and such.
If I plug this into a PoE switch will it still work? Is it pseudo af?
actually a lot of USB ports are greatly overrated in terms of the power they supply; won’t you run into this issue?
@jamieriddles – They are isolation transformers, they are required by the IEEE 802.3 specifications and help protect against things like voltage spikes.
@mthode – Sort of the point of the build, and you’re right, it’s not quite 802.3af compliant until I add in the capability to receive power from the other two pairs (MODE B).
The magnetics are also used because ethernet employs a balanced 100ohm pair.
What happens when you send packets at 88 miles per hour? Will the switch go back in time?
I still think you did a really good job, and even keeping it compliant with the standards is great. I usually throw power on two of the pairs and just build an injector.
It’s not even close to compliant with standards. This is useful as a temporary hack, and not much more than that. Nice build, though.
If you’ve ever seen a minimally standards-compliant PoE interface, you know it takes a crapload more design than what you could pull off inside that box anyway. One of the biggest things you’d need to do is ensure that ALL of the power supply circuitry is completely isolated. This is NOT only to prevent lightning strikes and all that (that’s the obvious reason everyone says you need isolation transformers), but it’s also because, especially with PoE, the current traveling through the wires produces ground mismatches between equipment, and if the signals are ground referenced, lots of bad things can happen if the wiring is long enough (ethernet signal / power is suddenly below ground, frying your PHY, etc. . .) Here’s a sample, real-world implementation: http://datasheets.maxim-ic.com/en/ds/MAX5941A-MAX5941B.pdf
Also, I suspect that the 75 ohm resistor you took off does something, possibly for balancing the transmission lines.
Nice /hack/, though.
I’m impressed. Well done.
I’ve utilized the isolation transformers in a fair amount of Telecom projects. Good resource.
I wouldnt plug this into my laptop for sure even tho I looking for how to build some universal power supply or regulator for normal psu which is able to handle bunch of external devices so i dont need adaptor for each one.
Eg I have 2 switches, 1 router, 1 wireless router, 1 external hdd and I want to power these all from my servers psu.
@threepointone – My switch may not be fully compliant, but I did try to keep everything to spec, on a budget. The main thing is that it does convince a compliant switch to send power. The DC-DC supply IS isolated, and it’s 48V supply is isolated from the switch through the ethernet magnetics. About the 75Ohm resistors, everything is still balanced relative to itself, and it’s been flowing packets very well.
very nice job! But thats a switch not a hub.
I’ve done a LOT of work with PoE- in fact I wrote the brief explanation on voip-info.org explaining PoE on the Cisco phones. Kajer’s system is isolated- with respect to the PoE wiring. He used the center taps of the isolation transformers. What he needs to ensure is that no one plugs the thing into mains power at the same time as that could cause a ground mismatch and fried circuitry.
threepointone is correct with respect to the isolation transformers- they aren’t there to prevent voltage spikes- a transient spike can pass through a transformer through coupling anyway. They are there to prevent ground mismatches.
The ground resistors that were on the center taps are there to keep a static charge from building up on the line- if it got high enough it could arc to the PHY or another part of the board and fry something. Since you’ve got PoE configured that won’t happen so removing them wasn’t an issue.
One thing you won’t be able to do is pass power along to your phones. 802.3af can only supply about 12 watts to a device (15.4 at the port- 12 watts at the end of the wire). Your switch is already using most of that power. Add in another 8 watts for a Cisco phone and you are over your power budget.
As for standards compliance- most PSE’s these days are supplying power over the data pairs. It works with more wiring- and it’s what you have to do with gigabit anyway. I certainly wouldn’t worry about adding support power over the non data pairs- no point.
Having said all of this- there are inexpensive PoE chips that you could add instead of that big DC-DC converter that handle switching in the 25kohm resistor- switching it out when power is supplied- converting the 48V DC to 5V- not supplying power to the device until the power is stable, etc. It would require spinning a board- but it would be a pretty easy build.
For those that want a turnkey solution- try the dlink DWL-P50:
Just to clarify:
The unused pairs in an Ethernet cable are basically just big antennas- as such they can develop static charges or induced currents. The 75ohm resistors that were there safely dissipate that buildup to ground.
Also, if you are going to _supply_ power with this thing- you’ve got to make sure no one plugs in a device with grounded center taps unless you take other precautions. For example: If someone plugs in a device like this switch, with grounded center taps, and you supply power without checking first, you’re going to end up with a dead short and something is going to burn out.
“Only problem with this is that gigabit ethernet uses all 4 pairs, and if he takes any away for power usage, then he looses the gigabit connectivity. Otherwise nice hack that I have done several times.”
You are mistaken. His hack works by biasing a differential pair. The differential signal is unchanged- but the individual components are raised 48 volts relative to ground. This is possible by taking the two parts of the differential signal and feeding them into a transformer with a center tap. You can raise the center tap to whatever voltage you want- but the differential signal on the other side of the transformer is still only going to be the same differential but at ground (assuming 1:1 magnetics which most are- other ratios would cause a difference in the differential signal- but the biasing would still work).
@TheFish – Yes, I am aware. I built a hub that passed power through. This is a completely different build.
@Don – “What he needs to ensure is that no one plugs the thing into mains power at the same time as that could cause a ground mismatch and fried circuitry.”
A few diodes could isolate the DC-DC from plugging in a higher voltage wall wart. But, I will be the only one using this switch, so I should know better.
@Don -“One thing you won’t be able to do is pass power along to your phones. 802.3af can only supply about 12 watts to a device (15.4 at the port- 12 watts at the end of the wire).”
The 7940’s and 7960’s I was testing with use about 6.5W. Add that to this switch at 3.5W and that is 10W. Even though cisco CDP tells the switch that it only needs to allocate 6.5W, the switch doesn’t limit the current, it just ‘puts the spare wattage back in the pool’. I only needed to pass power through the hub to tap the IP phones and get a good duplex capture with wireshark. This switch I just wanted to power, not pass anything through.
I love those netgear boxen. Have the 10/100 hub, need to get one of the 10/100 switches or even that gigabit switch. Solid metal construction, and as small as two packs of cards. I’m in love with a piece of networking fluff.
“A few diodes could isolate the DC-DC from plugging in a higher voltage wall wart. But, I will be the only one using this switch, so I should know better.”
Yeah- i just meant it as something to keep in mind- not something you necessarily had to worry about. You just don’t want different ground voltages- you’ll get a current flow and could fry something.
“The 7940’s and 7960’s I was testing with use about 6.5W. Add that to this switch at 3.5W and that is 10W. Even though cisco CDP tells the switch that it only needs to allocate 6.5W, the switch doesn’t limit the current, it just ‘puts the spare wattage back in the pool’.”
I measured 7.5 Watts on mine but it’s close enough either way. My measurements were taken while talking and while ringing- that might explain the small difference.
CDP will only be a factor if you have it enabled but I did all my testing with it disabled. I should probably do some more testing and see what I come up with. The switch can also choose to ignore it if the load is too high.
As for the spare wattage- you’re still limited to 12 watts at the end of the wire- regardless of how much spare wattage the switch has. It’s simply a function of how much current the Ethernet pairs themselves can carry multiplied by 48 volts. It comes out to 15.4 watts at the port itself- and by the end of the Ethernet cable, taking into account losses- it’s supposed to be 12 watts. Some switches “cheat” and push a little more- but it’s generally safest to assume 12 watts. (I suspect you know this and I just misunderstood your comment- my apologies).
I also misunderstood your writeup to mean you wanted to power all the ports via PoE from the one switch port. Since you only plan to power the switch and the one phone obviously you should be fine. Sorry for the confusion.
Did you come across the page:
and if so- what it helpful?
And of course upon re-reading your post I noticed the quotes around “puts the spare wattage back in the pool” and realize what you meant. You were referring to the internal housekeeping the switch does to track power allocations. Sorry for the confusion.
@Don – In fact, I read that page a few times when I was prototyping my hubs. Very Useful as I was using a pre-standard 7960, requiring the polarity cross-over.
I don’t plan on powering a phone with this switch, so no worries here. Shoot me an email so we can talk about hubs with power pass through ports :)
Heh- I actually shot you an email right after my first post :)
I was trying to get my 7960 working and the original PoE page over at voip-info.org was terrible. There was so much misinformation that I spent several hours going through docs and testing configurations just to figure out what was what. When I got done I added the top part of that page and supplied as much information as I could. I’m glad someone else found it useful :)
“You never get to see the
inside of things like this unless you look for yourself.”
Nice one, but can you stil run 1000Mbits over that port…? :?
A very nice and tidy hack. The next step, I guess, would be to integrate a USB to Ethernet adapter (and lose an ethernet port) so that you’d only need one cable connected to the powering computer. Although, USB2 only offers 480 Mbits/sec, so the 1000 Mbits/sec would be out of the question.
Please read the comments- Kajer did this by biasing the center tap of the Ethernet magnetics. The Ethernet signaling was completely untouched.
I work in (IT) my boss built a full duplex gigabit network buying all the best routers and switches he was quite proud of it… then we purchased a VIOP system from CISCO and got the Cheaper 10/100 phones I found this out after the co purchased them and I was out to lunch with a contract engineer and because of POE we had to route all Ethernet through the phones to the computers, this kept the back plane at a full duplex and every single client bottlenecked at 10/100 not that big of a deal unless someone was running a huge report and killing the bandwidth. We found AC adapters for my boss and my self to gain our full bandwidth back… we have a ton of these little netgear switches laying around I may pri a few open now…
You know you can buy Gigabit phones from Cisco. Then you would still keep you’re POE and have Gb access.
When you run these reports have you done any bandwidth reporting that shows the client is really transferring more than 100Mb of information? I would really be surprised that your reporting program can generate reports using that much information while not handling the entire process server side…
Silvertel seems to have some nice PoE modules at reasonable prices ($11 for an isolated 12W converter module.) On paper, anyway. Has anyone used them? http://www.silvertel.com/poe_products.htm
I’d love to see something cheaper and lower power; 5V@ 3 to 5 W, for powering those little remote sensors that it would be convenient to not have separate power connections.
@WestfW I was going to grow my own complient POE kit based around the MAX5941B and it looks like Silvertel has ripped it off for hte Ag9400 POE module. nonetheless I have ordered a sample and should be testing it out in the next week or so.
made sense to getthis as its no cheaper making it myself
Please be kind and respectful to help make the comments section excellent. (Comment Policy)