Author Topic: Has anyone had any success building a passive ethernet hub with just diodes?  (Read 9918 times)

0 Members and 1 Guest are viewing this topic.

Offline FreesurferTopic starter

  • Regular Contributor
  • *
  • Posts: 57
  • Country: no
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
« Last Edit: December 08, 2021, 08:59:26 pm by Freesurfer »
 

Offline magic

  • Super Contributor
  • ***
  • Posts: 6733
  • Country: pl
Not saying I know it can't work, but did you find any explanation how it is supposed to work and why it has to be diode pairs, out of all the components in the world? :o

Okay, found some info.
https://electronics.stackexchange.com/questions/10864/building-a-passive-ethernet-hub-with-anti-parallel-diodes
http://www.zen22142.zen.co.uk/Circuits/Interface/pethhub.htm

Maybe...
 :popcorn:
« Last Edit: December 08, 2021, 09:38:49 pm by magic »
 

Offline ejeffrey

  • Super Contributor
  • ***
  • Posts: 3685
  • Country: us
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/B000FNFSPY

It would probably be less when idle with some ports inactive.
 

Offline ve7xen

  • Super Contributor
  • ***
  • Posts: 1192
  • Country: ca
    • VE7XEN Blog
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.
73 de VE7XEN
He/Him
 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 6272
  • Country: ca
  • Non-expert
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/B000FNFSPY

It would probably be less when idle with some ports inactive.

Yep, 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.. hm

What is wrong with using the ethernet splitter/economiser though?
« Last Edit: December 09, 2021, 12:06:24 am by thm_w »
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 

Offline FreesurferTopic starter

  • Regular Contributor
  • *
  • Posts: 57
  • Country: no
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.
 
The following users thanked this post: thm_w

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 6272
  • Country: ca
  • Non-expert
Makes sense now.

Heres a pre-layed out board: https://easyeda.com/kisly.va/passive-ethernet-hub-pin-diode
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
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?
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 8973
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Just use Wifi for low power, low bandwidth devices? ESP32 supports several low power modes.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 7660
  • Country: ca
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...
 

Offline magic

  • Super Contributor
  • ***
  • Posts: 6733
  • Country: pl
Heres a pre-layed out board: https://easyeda.com/kisly.va/passive-ethernet-hub-pin-diode
A minute of silence for those differential pairs separated and routed away towards opposite sides of the board :(
Methinks 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.

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.
Something 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?
« Last Edit: December 09, 2021, 09:31:25 am by magic »
 

Offline FreesurferTopic starter

  • Regular Contributor
  • *
  • Posts: 57
  • Country: no
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.


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...


"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.
 

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 6145
  • Country: ro
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.

Offline magic

  • Super Contributor
  • ***
  • Posts: 6733
  • Country: pl
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.
« Last Edit: December 09, 2021, 12:23:25 pm by magic »
 

Offline FreesurferTopic starter

  • Regular Contributor
  • *
  • Posts: 57
  • Country: no
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.

I 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.

 

Offline magic

  • Super Contributor
  • ***
  • Posts: 6733
  • Country: pl
Meet my fun plug :)
It'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 16

I'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.
« Last Edit: December 09, 2021, 02:30:08 pm by magic »
 

Offline IDEngineer

  • Super Contributor
  • ***
  • Posts: 1924
  • Country: us
A minute of silence for those differential pairs separated and routed away towards opposite sides of the board :(
Upvote for Best Comment of the Day!
 

Offline ve7xen

  • Super Contributor
  • ***
  • Posts: 1192
  • Country: ca
    • VE7XEN Blog
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.

This 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.

Quote
If not, only one device needs to be set to half duplex and the others will follow.

Normally 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.

Quote
- 100Mb half duplex: NIC driver refused this configuration, maybe not specified by the standard(?)

It'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.
« Last Edit: December 09, 2021, 08:13:23 pm by ve7xen »
73 de VE7XEN
He/Him
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16272
  • Country: za
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.
 

Offline magic

  • Super Contributor
  • ***
  • Posts: 6733
  • Country: pl
Quote
- 100Mb half duplex: NIC driver refused this configuration, maybe not specified by the standard(?)

It'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.
:-+

I 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.
 

Online mariush

  • Super Contributor
  • ***
  • Posts: 4983
  • Country: ro
  • .
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 / isp
The 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.3v

So 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.
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
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.

Or change the resistors, many modern LEDs will produce usable brightness at a few tens of microamps.
 

Online tooki

  • Super Contributor
  • ***
  • Posts: 11332
  • Country: ch

Schematics:


(above doesn't seem to work, try copy/pasting this):

i.stack.imgur.com/RhIgF.gif
Please 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.
 

Offline FreesurferTopic starter

  • Regular Contributor
  • *
  • Posts: 57
  • Country: no
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.
 

Offline SilverSolder

  • Super Contributor
  • ***
  • Posts: 6126
  • Country: 00
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.

If someone complains, they can always be taken down again...
 
The following users thanked this post: george.b


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf