Has anyone had any success building a passive ethernet hub with just diodes? - Page 1
Forum section: electronics / projects

author: Freesurfer
author_rank: Regular Contributor
timestamp: December 08, 2021, 08:57:33 pm
content: I have an off-grid cabin on solar with a low power router which only consumes around 5W for internet access, which has 5 ethernet ports. Those 5 ports are all used. For extra ports I would need to add a small switch, which can easilly draw another 5W on its own. The aim is to keep the consumption from such devices as low as possible.Googling around there are schematics for fully passive unpowered "3-way" network hubs built only from a bunch of diodes, which in theory should allow you to split a single port on the router to two devices running at 10/100Mbit half duplex. This may be sufficient just for some low bandwidth smart devices and monitoring devices. Of course there is no signal amplification like you would get from a real hub or switch, the impedance matching is probably not ideal, and there's the challenge of 0.6V diode drops which could greatly reduce the max distance.(For clarification, it should not be mistaken as an "ethernet economiser" or pair splitter which splits the pairs of a single cat.5/6 cable into two separate ports in each end)Schematics:(above doesn't seem to work, try copy/pasting this):i.stack.imgur.com/RhIgF.gif

author: magic
author_rank: Super Contributor
timestamp: December 08, 2021, 09:27:00 pm
content: Not saying I know it can't work, but did you find any explanation how it issupposedto work and why it has to be diode pairs, out of all the components in the world?Okay, found some info.https://electronics.stackexchange.com/questions/10864/building-a-passive-ethernet-hub-with-anti-parallel-diodeshttp://www.zen22142.zen.co.uk/Circuits/Interface/pethhub.htmMaybe...

author: ejeffrey
author_rank: Super Contributor
timestamp: December 08, 2021, 10:17:11 pm
content: This is a 5 port switch that claims to have a max power consumption of 2W:https://www.amazon.com/TP-Link-Ethernet-Splitter-Unmanaged-TL-SF1005D/dp/B000FNFSPYIt would probably be less when idle with some ports inactive.

author: ve7xen
author_rank: Super Contributor
timestamp: December 08, 2021, 10:35:50 pm
content: 2W max at DC (AC adapter efficiency ignored) is pretty typical for a 5-port switch. The lowest I have seen is that exact unit - 1.87W at the wall, so maybe 1.5W DC; the 8-port version specifies 2.2W at the wall. But 2W is very typical even for GigE units. If it has "Green Ethernet", then idle or link-down ports should save significant power, and even with all ports running, unless they are running at full transmit power (long cable) the actual consumption should be less.The diode thing might work, it's a clever hack if it does, but it's obviously totally out of spec.

author: thm_w
author_rank: Super Contributor
timestamp: December 08, 2021, 11:56:40 pm
content: Quote from: ejeffrey on December 08, 2021, 10:17:11 pmYep, just looking at some random switches: Netgear 8 port claims 3.6W consumption (GS208). Tplink 8 port 2.7W power consumption (LS1008G V2)Better off getting the extra ports.edit: missed that original product is a router, so you'd still be adding ~3W draw.. hmWhat is wrong with using the ethernet splitter/economiser though?

author: Freesurfer
author_rank: Regular Contributor
timestamp: December 09, 2021, 12:49:43 am
content: I would use one if I could but the economisers don't give you any extra ports on the router. You need one in each end, one at the source to take two ports from the router and combine them over a single cable. Then another in the remote end to split the signal back into 2 ports. So they are only useful where you want to to run 2 devices over a single cable, not when you need 2 devices on a single port.

author: thm_w
author_rank: Super Contributor
timestamp: December 09, 2021, 01:07:17 am
content: Makes sense now.Heres a pre-layed out board:https://easyeda.com/kisly.va/passive-ethernet-hub-pin-diode

author: james_s
author_rank: Super Contributor
timestamp: December 09, 2021, 02:26:29 am
content: Seems like it would be more sensible to just add another solar panel somewhere to make up for the few watts a proper ethernet switch would draw. Does it have to be powered all the time or can you just turn it on when you need those devices?

author: NiHaoMike
author_rank: Super Contributor
timestamp: December 09, 2021, 04:00:15 am
content: Just use Wifi for low power, low bandwidth devices? ESP32 supports several low power modes.

author: BrianHG
author_rank: Super Contributor
timestamp: December 09, 2021, 04:01:38 am
content: Why not use low impedance RF analog switches?They would consume a few microamps to internally drive the AC mosfets switche's gates.I think some D-MOS analog switch ICs which may do the job.Again, since you brought out the 'DIODE' idea, I assume we are talking about a literal switch...

author: magic
author_rank: Super Contributor
timestamp: December 09, 2021, 07:08:49 am
content: Quote from: thm_w on December 09, 2021, 01:07:17 amA minute of silence for those differential pairs separated and routed away towards opposite sides of the boardMethinks the TRVE way of building this should be a rat's nest of THT diodes, but with a logical layout.In a 3-dimensional space it might even be possible to expand the hub to four ports.Quote from: BrianHG on December 09, 2021, 04:01:38 amSomething would have to drive those switches; not sure how to do that?The diode trick means that each TX goes to the other two RX (which is not a problem) but loopback to its own RX (which would be a problem) is suppressed.By the way, they say it's half-duplex, so what happens when two hosts start to transmit at the same time? I think when A tries do drive low and B tries to drive high, their signals will mutually clamp each other to ± one diode drop which is not enough to pass through other diodes to each other's RX port. And the third C host sees a zero signal at its RX at that time. So it looks like setting the hosts for half-duplex is important for avoiding packet loss.I know how to set computer NICs for half-duplex, but what about your switch/router, which I believe would be connected to one of the ports?

author: Freesurfer
author_rank: Regular Contributor
timestamp: December 09, 2021, 10:51:49 am
content: I don't think setting the duplex is a problem. I think the NICs will figure that out on their own. You can plug any ethernet NIC into any other and they will work out the best common supported speed and duplex as well as drop down if the line itself is bad. On damaged cables where wires from different pairs are shorted together, the NICs may see this, assume it is a hub, and drop to half duplex.If not, only one device needs to be set to half duplex and the others will follow.Quote from: BrianHG on December 09, 2021, 04:01:38 am"real" powered legacy hubs are just that. a bunch of switches, transistors or logic gates. They simply have the logic to take what it receives from one host to pass the same signal directly to all the other hosts without storing any bits at all. But they are fundamentally different from real network switches. Hubs don't have any processor or memory at all, only simple logic. Whereas a real network switch will have memory to store full packets and a processor to address the packets to the correct port.

author: RoGeorge
author_rank: Super Contributor
timestamp: December 09, 2021, 11:12:49 am
content: It doesn't need diodes at all. Put two patches of cable in parallel and it will work.I don't know if it will still work for very long cables, or for gigabit speed, but it is trivial to test. Cut two cable and twist by hand the copper of each pair of wires together, paired by colors.

author: magic
author_rank: Super Contributor
timestamp: December 09, 2021, 12:20:37 pm
content: I doubt it.In full duplex mode there will be random packet loss from collisions.In half duplex mode nothing will get sent because each station will receive its own transmissions.I don't think twisted pair NICs support true bus topology.

author: Freesurfer
author_rank: Regular Contributor
timestamp: December 09, 2021, 12:34:26 pm
content: Quote from: RoGeorge on December 09, 2021, 11:12:49 amI don't think that will work. 10/100Mbit uses 2 pairs, where each NIC sends on one pair and receives on the other one. Simple enough for a straight link between 2 NICs as the TX pair on the one NIC goes to the RX on the other and vice versa. But on a hub, all the hosts are "equal", as in all of them must be able to send directly to each other and not just to and from the router. Without the diodes there is no way to wire a simple split cable in such a way that every NIC can send only to the 2 others but not to itself. You could make NIC 1 transmit only to NIC 2 and NIC 3.But when you want NIC 2 to send to only NIC 1 and 3, you end up bridging all the pairs together to a single "bus" where all TX and RX pairs are all connected. I guess that is why you need the diodes to cleverly direct the signals in the right directions without bridging the pairs together.

author: magic
author_rank: Super Contributor
timestamp: December 09, 2021, 02:08:11 pm
content: Meet my fun plugIt's like a crossover cable, but all pairs loop back to the same plug.Most NICs happily establish link with themselves, even gigabit works.So I plugged it into one unused 100 megabit NIC to see what happens:- 100Mb full duplex: transmitted packets are received back- 100Mb half duplex: NIC driver refused this configuration, maybe not specified by the standard(?)- 10Mb full duplex: transmitted packets are received back- 10Mb half duplex: no packets come back, each attempt increments collision counter by 16I'm fairly confident that at least this particular NIC wouldn't work in bus topology unless in full duplex mode with risk of undetected collisions.

author: IDEngineer
author_rank: Super Contributor
timestamp: December 09, 2021, 06:58:52 pm
content: Quote from: magic on December 09, 2021, 07:08:49 amUpvote for Best Comment of the Day!

author: ve7xen
author_rank: Super Contributor
timestamp: December 09, 2021, 08:09:51 pm
content: Quote from: Freesurfer on December 09, 2021, 10:51:49 amThis is a negotiated process. I have to assume the link-pulses pass through the diodes, or link wouldn't come up at all. So who knows for sure what will happen to autonegotiation here. I'd think that if there are 3 devices attached, they'll stomp on each other's autoneg bursts, and autoneg just fails. But it's also possible (especially if there's a timing difference as they come up) that autonegotiation succeeds, in which case you will get a full-duplex link. Since there's no provision for re-negotiation once link is up, I'm not sure what happens when the 3rd device comes up. Either link flaps and all 3 redo negotiation (which hopefully fails and you get them all in half-duplex), or more likely IMO only the new device fails autoneg and the other two continue on with their full-duplex link. This will result in undetected collisions and corruption. Either way, it's undefined behaviour.So disabling autoneg and manually forcing half-duplex is probably necessary for 'reliable' operation. If autoneg fails (as it probably will in a significant proportion of cases), that will result in half-duplex link too, but I wouldn't want to count on that, since I don't think there's anything about this scheme that will cause it to fail reliably.QuoteNormally yes, because autonegotiation will fail, and that will force the NIC to half-duplex. However, in this case, any two of the devices may send FLPs for autonegotiation, so setting only one of them to half-duplex is probably not sufficient as the other two can still negotiate. In fact it might be worse, since you won't have 3 devices competing to autonegotiate any more, which seems like it'd make it more likely to succeed between the other two.Besides which, this is bad practice. If one side has manual speed/duplex, you should definitely set the other side manually too.QuoteIt's definitely specified and should work. 100base-TX hubs were even a real thing. 1000base-T spec includes half-duplex too, though it isn't a real thing AFAIK. It was finally dropped for 10GBASE-T.

author: SeanB
author_rank: Super Contributor
timestamp: December 09, 2021, 08:11:23 pm
content: Easiest will be to get a low power 5 port hub, and remove all the link LED's and power led's from it. That will drop power consumption a lot, as they typically are 5mA per LED, and you can do without them, or put in a switch to disable them. As the majority of the small cheap ones run off 5V, power it from the router USB port, saving a power supply as well. Doing that myself, as the Huawei router I use only has 2 network connections, and a phone socket for the built in VOIP phone, and I needed one more port, so use the USB port for power to the cheap Totolink S505 5 port switch i bought.

author: magic
author_rank: Super Contributor
timestamp: December 09, 2021, 08:49:34 pm
content: Quote from: ve7xen on December 09, 2021, 08:09:51 pmI got it to work. Turns out, it doesn't want to run half duplex with autonegotiation enabled, so I turned that off.The result is the same as at 10Mb: packets don't make it through and TX collision counter increases.

author: mariush
author_rank: Super Contributor
timestamp: December 09, 2021, 09:02:48 pm
content: Yeah.... agree with SeaB ...Get a cheap 5-8 port switch and open it up. You'll most likely find that it has a dc-dc regulator converting 5v...12v down to 2.5v or 3.3v for the switch IC....You could probably open your current router / modem and see what voltages uses internally and maybe tap into 3.3v or 3.6v or whatever low voltage is there, and power your switch directly from that dc-dc converter on your router / ispThe overall current may be too much for that regulator, in which case you could replace the regulator on the original router with one that can supply current for both.At the very least see what dc-dc converter they used, measure the efficiency ... tap into the output voltage trace and measure the actual current.I've opened some time ago a cheap Canyon 5 port switch with built in USB printer server, and there was definitely room for improvement as you can see in the picture attached.The switch had a bridge rectifier on the input to protect against wrong polarity or AC wallwarts, so there's some losses in those diodes.Then, the switch used a plain common mc34063 dc-dc converter to produce 3.3v for the Winbond arm chip and its flash and sd-ram memory - all running at 3.3vSo I could have changed that whole circuit with some high efficiency synchronous rectifier dc-dc converter circuit or run it directly with 3.3v from another device.

author: james_s
author_rank: Super Contributor
timestamp: December 09, 2021, 11:16:30 pm
content: Quote from: SeanB on December 09, 2021, 08:11:23 pmOr change the resistors, many modern LEDs will produce usable brightness at a few tens of microamps.

author: tooki
author_rank: Super Contributor
timestamp: December 11, 2021, 02:43:34 pm
content: Quote from: Freesurfer on December 08, 2021, 08:57:33 pmPlease just upload images as attachments to the forum post. Embedded images invariably go missing eventually, as services change or close, or people delete them thinking they’re no longer used.

author: Freesurfer
author_rank: Regular Contributor
timestamp: December 11, 2021, 07:33:28 pm
content: I would but I don't know about the copyright status of various attachments so I try to avoid reuploading as much as possible. I am unsure why the clickable link or embedded picture didnt work at first.

author: SilverSolder
author_rank: Super Contributor
timestamp: December 11, 2021, 11:13:09 pm
content: Quote from: Freesurfer on December 11, 2021, 07:33:28 pmIf someone complains, they can always be taken down again...

author: magic
author_rank: Super Contributor
timestamp: December 11, 2021, 11:32:44 pm
content: So how is the project going?BTW, does anyone know if there is something special about the recommended diodes?Wouldn't 1N4148 do?I'm kinda curious, I would have built a rat's nest prototype myself out of 4148s but I don't have RJ45 jacks.

author: Freesurfer
author_rank: Regular Contributor
timestamp: December 12, 2021, 02:28:43 am
content: I have some 1n4148s laying around so maybe I will try tomorrow if I have the time

author: Freesurfer
author_rank: Regular Contributor
timestamp: December 12, 2021, 04:08:00 am
content: Ok, I made a prototype on a TCB (Taped Circuit board)(tm) by just twisting the pins and wires together without any soldering, and tried to connect it between my router, laptop and desktop PC.It does work and all 3 devices can communicate with each other.However the link only negotiates to 10Mbit and is even slower than that in real world performance. Running a few speed tests it gives me about 1.5-2Mbit from both my laptop and my desktop PC. Packet loss doesn't seem too horrible at first glance but I haven't done any tests or checked wireshark or anything like that.It doesn't seem like win10 has a straight forward way to check whether the link is full or half duplex. When I try to force it to 10Mbit half and full duplex, they both work and give similar results. Trying to force to 100Mbit does not work at all.These network adapters are all Gbit ethernet adapter, so the results may be different from what we'd see on older 10/100Mbit cards. Gigabit cards can use features gigabit specific features that 10/100Mbit cards don't have. For example if you have a faulty cable where the orange and green pairs are broken, a gbit NIC can still operate at 100Mbit over the blue and brown pairs which are not even in use on non-gbit cards.

author: magic
author_rank: Super Contributor
timestamp: December 12, 2021, 09:43:53 am
content: This wins "the ugliest circuit of the month" awardBTW, I would try to minimize untwisting of those twisted pairs, so that the diodes carrying any orange/green signal are closely in parallel with the diodes carrying its corresponding white signal. Note sure if you have done that because... tape.That being said, I'm not sure if it was supposed to work at 100Mb at all. The site I found only mentions 10Mb.Does anything improve if one of the computers is disconnected?Does it get worse when speed test runs on both at the same time?Anyway, I suppose it's good enough for some IoT refrigerator stuff

author: Freesurfer
author_rank: Regular Contributor
timestamp: December 12, 2021, 11:44:54 am
content: I agree. It would have been fun to test it on a properly designed board with traces and extra components that maintain the correct impedance and such. Fundamentally I think it could have worked for 100Mbit if designed properly. I believe one of the pages even stated having achieved decent results with 100Mbit.I did the "best" I could with tape to keep the pairs as close together as possible. I am not too worried about untwisting too much, but more worried about the distance between the parallel wires in each pair.The circuit is made out of 2 "hexagons" of diodes, layered on top of each other with tape and plastic between the two layers for insulation. If you look closely at the original schematics and reshape the diodes into a hexagon, then stack the hexagons on top of each other, you will see that the corners on the top and bottom layer of diodes line up in such a way that the wire pairs don't need to be split very much. One wires goes on the bottom layer, the other on the top layer with minimal separation of the pairs. So it's not as horrible as it looks, but it's limited how close I can get it with a flimsy circuit like this. hehe.Yes I tried running a test on both at once, and also with only one computer connected. Doesn't change much whether I only have 2 or 3 devices connected.But I don't think I will use this for the IoT stuff. I'll find another way to free up some ports on the router. I have 2 routers there. One for a point to point link which is always on (5 ethernet ports, but no wifi), and another tiny wifi router with just a single port that is only powered on while using the cabin. I can just replace this second wifi router with a bigger one with extra ports, and use those ports for devices like the TV and STB. Then have the IoT stuff connected directly to the main router that is always on.

author: rsjsouza
author_rank: Super Contributor
timestamp: December 12, 2021, 12:34:24 pm
content: I don't recall seeing a dumb hub operating at more than 10 Mbps half duplex. Too many collisions.A commercial dumb hub usually has some logic to not only detect collision but also to drop bad ports, but I recall the power consumption was not terribly high, even with all the LEDs (I have one lying around but I just can't find it).

author: RoGeorge
author_rank: Super Contributor
timestamp: December 12, 2021, 12:41:21 pm
content: Quote from: Freesurfer on December 12, 2021, 04:08:00 amSince you already have the setup and the cut cables, have you tried if it also works without the diodes?

author: tooki
author_rank: Super Contributor
timestamp: December 12, 2021, 02:00:27 pm
content: Quote from: rsjsouza on December 12, 2021, 12:34:24 pmAn Ethernet hub is by definition “dumb” and half-duplex. (Full-duplex requires it to be a “switch”, which is by definition not dumb.)But indeed, I don’t recall ever seeing 100Mbps hubs. Maybe one existed, but certainly in practice people had moved to 10Mbps switches before going to 100Mbps.AFAIK mixing media speeds requires it to be a switch (hence the dedicated uplink port on old 10Mbps switches with a 100Mbps port to the backbone), and so this, too, almost certainly meant 100Mbps splitter boxes had to be switches, not hubs. Otherwise it would have made transitioning a network far more difficult.

author: Freesurfer
author_rank: Regular Contributor
timestamp: December 12, 2021, 02:28:21 pm
content: 100Mbit hubs did exist. My first home network had one. And I know for a fact it was a 100Mbit hub. But they seem a bit hard to come by. I am a telco guy so I have been in lots of places with older equipment, but I only really see older 10Mbit hubs perhaps with a mix of RJ45 ports and coax ports.And I am 100% certain it was a hub, not a switch. But this was around the time when network switches also became more common.And yes to connect 10 and 100Mbit devices together in the same network you needed a switch. The switch has memory to store a full packet and re-transmit at a different data rate than it was received at. Hubs don't so all devices need to run at the same speed.Edit: There were also hubs with a mix of both 10Mbit and 100Mbit ports. They were essentially a hub, but with a switch in between the 10Mbit and 100Mbit segment

author: magic
author_rank: Super Contributor
timestamp: December 12, 2021, 03:27:57 pm
content: I think I know what's the deal with 100Mb.According tothis PDF, 10Base-T uses ±2.2~2.8V differential pulses and 100Base-TX uses ±0.95~1.05V, which leaves only 0.5V per each side.Maybe Schottky's would work. BAT81~83 or something of that sort. But then it won't be usable with 10Mb (host will RX their own TX).

author: rsjsouza
author_rank: Super Contributor
timestamp: December 12, 2021, 04:03:06 pm
content: Quote from: tooki on December 12, 2021, 02:00:27 pmWell, not quite. The dumbness is simply to differentiate those from the other, "smarter" dual standard hubs that were common during the transitional period from 10Base-2/10Base-5 (AUI) to 10BaseT era - I was shocked many times by the stupid ground differences between the several hosts connected to these networks (things of a country that couldn't pull his head from his rear end and enforce true grounding on electrical installations, but that is another story).Indeed the CSMA/CD is half duplex by definition.

author: james_s
author_rank: Super Contributor
timestamp: December 12, 2021, 07:01:37 pm
content: Quote from: tooki on December 12, 2021, 02:00:27 pmI'm pretty sure I still have a couple 100Mbps hubs in my box of network "stuff", or maybe I gave them away already since upgrading everything to gig switches, I'm not sure. I know they exist though and I know I had some. Switches were always a lot more expensive than hubs.

author: tooki
author_rank: Super Contributor
timestamp: December 13, 2021, 03:31:48 pm
content: Quote from: james_s on December 12, 2021, 07:01:37 pmWell no, not always, which is why hubs eventually disappeared entirely. The price difference between switches and hubs fell continually until there was none at all, making hubs pointless.