#276 Power over Ethernet (PoE) Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
our connected devices usually have two connections one for data and the other for power if we use an Ethernet cable we can combine data and power on the same cable very convenient do you know how this power over internet works and what we have to do to take advantage let's have a closer look great see you tubers here is the guy with the Swiss accent with a new episode and fresh ideas around sensors and microcontrollers remember if you subscribe you will always sit in the first row power over ethernet is often used for access points or IP cameras we also can use it to power our raspberries etc in this video we will start by looking at the Ethernet cable and its connectors and continue with the various ways of injecting and retrieving power unfortunately different standards exist some are compatible and others are not today's Ethernet cables usually comply with a cat5e standard these cables use eight wires twisted together in four pairs of two they are colored like that green and green white orange and orange white blue and blue white brown and brown white the cables use differential mode for data transmission and should have a minimum bandwidth of 100 megahertz the maximum length of a cable segment is 100 meters what is differential mode the signals do not change between zero and BCC as the digital signals in our Arduino they hop from minus VCC to plus VCC what is the advantage they are more immune against noise from the outside why noise usually attacks both wires at the same time if you add the same signal to both wires the difference stays the same this sort of noise is therefore eliminate it automatically and it has another advantage which can be used for p OE as we will late to see so far so good let's continue with the connectors fortunately all Ethernet standard used the same rj45 connectors but unfortunately there are at least two different wiring standards t568a and P both ends of the cables use the same male connectors and pins are connected straight pin 1 with pin 1 etc there is one exception patch cables in the early days we had to cross wires when we wanted to connect for example two switches fortunately this is no more necessary today because modern Ethernet devices negotiate which wires are used for communication from the outside patch cables do not look different if they are not labeled you only find it out by testing them with an Ethernet cable tester or by a close look at the cable colors on both sides I disposed all of those cables because they are no more needed the difference between the two wiring standards is to which pins the green and the orange wires are connected fortunately it does not matter as long as both ends of one cable use the same standard if you crimp both sides you can choose the standard if you crimp only one end look at the other end and use the same schema by the way most category 5 cables should not be bent too much too much is a radius of less than 8 centimeters for regular cables otherwise they might be damaged and no more transmit the full 100 mega Hertz next we have to have a look at the signals transmitted over these cables they are called 10 base T 100 base TX or Fast Ethernet 1000 pasty or Gigabit Ethernet 2.5 g pasty and 5 g pasty currently the standard mostly used by makers is Gigabit Ethernet and I'm not sure if we have to bother soon with the higher speed variants for our home networks 10 base T and 100 page TX Ethernet connections requires only 2 wire pairs gigabit and fast ethernet connectors require all 4 wire pairs so we have two spare wire pairs on the slower standards next we come to our main topic power over ethernet here we have two sorts of devices power sourcing equipment also called PSE and powered devices called PD PS es are devices that provide power on the ethernet cable and p DS are devices powered by p OE a few methods are used to transfer power across ethernet cables three of them have been standardized since 2003 all have the same problem they have to use the thin and long wires inside Ethernet cables such wires have significant resistance fortunately we can have this resistance if we use two wires in parallel we all know how picky our raspberries are if the voltage goes below five volts and if we use long or lousy USB cables the raspberry is quickly report under voltage or even crash and now I'm telling you we can use these thin wires to transport power over long distances like 10 or even 100 meters no way you can rightly say fortunately we can use the same trick Engineers used 100 years ago for long overhead power lines they increased the voltage for transmission in the case of overhead power lines to a few thousand volts and for p OE to around forty to fifty seven volts let's do some calculations if we assume our raspberry con su 1 ampair on 5 Walt it consumes 5 watts Ethernet wires should have a resistance of less than 0.2 ohms per meter which means 0.1 ohms if we use 2 wires in parallel let's assume our cable is 10 meters long then it has a resistance of 1 ohm if a PSE feeds it with 5 volts we lose one volt and get 4 volts on the PD site which is not at all acceptable for most 5 volt devices let's now increase the voltage to 50 volts then transporting 5 watts only need point 1 ampere we only lose 0.1 volts and get forty nine point nine volts at the PD no problem at all even if we would extend the cable to 100 meters and increase the power to 50 watts we still would get 40 volts at the PD of course we need a buck converter at each PD to reduce the voltage to for example 5 volts but these devices are quite cheap and efficient these days problem solved let's now cover the different standards of power transmission mode AE transports the power on the data pairs polarity is not important here mode B uses the extra pairs for power transport and does not conflict with the data wires it uses pin 4 5 for positive and pins 7 8 for negative or current it can only be used by 10 megabit and 100 megabit Ethernet Gigabit Ethernet has no spare pairs some types of for pppoe use all 4 pairs for power transmission to further reduce the resistance and transport more power we do not cover the 4 pair transmission in this video it is only necessary for high powered devices PDS have to be able to accept mode a and B PSE s are also allowed to only offer mode this makes sure P DS are not destroyed if you connect them to a wrong PSE theoretically you should also be able to connect non ple devices to p OE cables here I would be more cautious mainly if you use passive p OE here a comparison of the various alternatives p OE and for pppoe type 1 are the same it is quite clear how we can use spare pairs to transfer power but how is it done on pairs which also transport data if we will just add 50 volts to a data line most of our chips would immediately be destroyed and create some magic smoke for sure no warranty case as I mentioned in the beginning twisted pair wires using differential signals do not suffer from signals if they have the same voltage level on both wires indeed this is quite easy to achieve we just add the same voltage to both wires of one cable pair so the signal looks like that but how to separate the high DC voltage from the signal again engineers use a simple trick transformers on both sides of the cable transformers transport alternating signals from the primary to the secondary winding with ease not so with DC so they can be used to separate the signal from DC if wired up like that we find the data signal here and T C here cool concept I think if you look at the diagram of a Raspberry Pi 3 B+ we find a transformer for each signal typically these transformers are either built into the ethernet connector or they use chips to do the job but why for transformers because the 3 B+ already supports Gigabit Ethernet and therefore uses all four wire pairs be aware that not all rj45 jacks have built in transformers if you have a device without this protection it is possible to destroy it with applying 50 volts p OE voltage to things I did not mention yet injectors and handshake if you are lucky your switch or router supports p OE then you're okay and can power your devices directly if not you still can use injectors between your switch and your device we will try them out later and if your device cannot be powered over Ethernet you can use the opposite of an injector to get the power of the Ethernet before it is connected to the device both the injector and reverse injector look similar the only difference is that one has a male and the other has a female DC block pay attention most of these injectors are very primitive because not all devices can be powered over Ethernet a handshake procedure is defined to signal the PSC if it has to send power and how much devices which cannot shake hands are called passive if you connect a PD which cannot handle handshake to a PSE with handshake capabilities it is well possible that you do not get power so let's do a few tests to understand the behavior of different devices and see if we can use it for our purpose I have the following parts a power supply which can inject power into an Ethernet cable to different pairs of injectors from aliexpress an injector delivered with my micro tech access point to different POV hats for the Raspberry Pi and apoE enabled router from micro tech let's start with the power supply the input is connected to a regular Ethernet connector and the output also carries the POA voltage it acts as a PSE and if we check we find 48 volts between the blue and the brown wire pairs on the output and no POA voltage on the input side by the way no handshake is necessary to get the power which makes it a passive system and it only supports mode P let's now look at a typical PD a Raspberry Pi 3 B plus of course I could have used my brand-new 4 B model for these tests but you never know if we create some casualties here is the diagram of the ethernet part of this Raspberry Pi these are the pins for the rj45 connector and these four pins belong to this small pin header used for p OE if we connect the pirate ethernet cable from our injector power supply to the raspberry we find the 48 volts on two pins of the p OE header now we need a buck converter to reduce these for the eight volts to five volts and then feed it to the 40 pin GPIO header this task is done by one of those POA hats and it works the raspberry powers up as soon as I connect the ethernet cable no power cable needed anymore and the data connection also works but only with 100 megabit now let's have a look at these injectors the rj45 connectors are only wired for pin 1-2-3 and pin 6 which are the data lines for slow ethernet so first let's check if our raspberry 3 B plus with Iike bit Internet also works with only 2 wire pairs yes it works but only on 100 megabit and the barrel connectors they are directly connected to the spare wire pairs also a mode B configuration so they should be able to source a Raspberry Pi with p OE hat if we inject at least around 40 volts let's test yes it works and we see the current is only around 100 milliampere much less than if we powered the raspberry with 5 volts as expected and the small p OE hat works - without apoE hat or if our device does not support p OE we can use such an injector on both sides and if we know what we do we can inject for example only 12 volts then we can add a widely available 12 to 5 volt buck Converter between the barrel connector of the second adapter and the powered device we do not need 40 or 50 volts in this case at least not if we only want to bridge short distances the second injector pair from Aliexpress works precisely the same way if we open the case we see that these are very primitive devices the mikrotik injector seems to be a little more sophisticated and supports Gigabit Ethernet this time in mode a I assume so we would find some transformers inside the plastic now I connect the cable to my mikrotik router the multimeter does not show stable values on pin 4 5 and 7 8 so let's connect the oscilloscope we see this curve it is part of the handshake where the PLC tries to find out if the other side uses p OE and to negotiate the right power level we can signal that we are POA enabled by connecting a 25k resistor between the two pin pairs now its which is p OE on and starts to deliver 50 volts because we do not consume at least 5 milli ampere after around 500 milliseconds it switches power of also part of the standard if our PD does not understand the handshake it will not get power fortunately both p OE hats know how to deal with it and power up good to know summarized the simplest p OE method is to use an injector and an extractor with this method we can choose the voltage level for our project and do not need to use 50 volts this might save some money it can be used for all sorts of devices because P OE is entirely handled by these two devices all standard p OE enabled PDS have to support mode a and mode P like that there is no danger to destroy a PD with a wrong PSE with standard PDS the simplest method is to use passive mode B this system also transports power over the spare wire pairs and does not need a handshake it is compliant with the official standard and can also be used by simple P DS it supports speed up to 100 megabit per second and 30 watts if we need Gigabit Ethernet we have to use mode a we still can use it without handshake as the mikrotik injector shows here we get a maximum of 30 watts the next level is to use handshake because both devices have to be handshake enabled this concept only work if the PD can handle the handshake handshake enables to switch to higher power levels up to 100 watts most current routers however do not support these high power modes and do not accept such requests one last thing if you build a new house or renew your old one deploying cat5 cables to all the rooms is an excellent idea mainly because it can be p OE enabled and cat 5 cables are the cheapest multi wire cables for our projects even if you do not need all eight wires I always have a spool of cat 5 cable in my lab I hope this video was useful or at least interesting for you if true please consider supporting the channel to secure its future existence you find the links in the description thank you bye you
Info
Channel: Andreas Spiess
Views: 115,542
Rating: undefined out of 5
Keywords: arduino, arduino project, beginners, diy, do-it-yourself, eevblog, electronics, esp32, esp32 datasheet, esp32 tutorial, esp8266, esp8266 datasheet, esp8266 project, greatscott, guide, hack, hobby, how to, iot, lorawan, nodemcu, project, simple, smart home, ttgo, wemos, wifi, PoE, power over ethernet, poe tutorial, power over ethernet tutorial, ip camera, poe hat, poe raspberry pi, power over ethernet raspberry pi, power over ethernet raspberry pi 3 b+, poe injector
Id: EUMIdhZXRWY
Channel Id: undefined
Length: 20min 24sec (1224 seconds)
Published: Sun Jul 07 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.