Author Topic: Wire over ethernet  (Read 1055 times)

0 Members and 2 Guests are viewing this topic.

Offline PlainNameTopic starter

  • Super Contributor
  • ***
  • Posts: 6847
  • Country: va
Wire over ethernet
« on: March 26, 2024, 02:49:58 pm »
You can get a pair of network adapters where you feed, say, serial data in one end and it comes out the other as if it were hard wired rather than traversing a network. I am looking to do the same but for ad-hoc digital or analog signals. Essentially, this is to be used where UTP was used to connect some stuff and that's now been co-opted to run network data instead - the original functionally now needs to run over virtual wires.

Before I start down the rabbit hole this is bound to turn into, is there an existing product that does this (or something very close)? A search didn't turn up anything but that might well be because I don't know what it might be called.
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 5912
  • Country: es
Re: Wire over ethernet
« Reply #1 on: March 26, 2024, 03:55:19 pm »
where you feed, say, serial data
I am looking to do the same but for ad-hoc digital or analog signals.
Please make your requirements right. Serial data is not the same as analog, or any random digital signal.

With a pair of Ethernet MCUs, you could easily send raw data over UDP, it's the simplest protocol I know.
« Last Edit: March 26, 2024, 04:00:15 pm by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline Andy Chee

  • Frequent Contributor
  • **
  • Posts: 686
  • Country: au
Re: Wire over ethernet
« Reply #2 on: March 26, 2024, 04:07:58 pm »
I would probably just use something like a Raspberry Pi as the network device, then use the GPIO pins and some Python code to send your analog or digital signal over Ethernet.
 

Offline PlainNameTopic starter

  • Super Contributor
  • ***
  • Posts: 6847
  • Country: va
Re: Wire over ethernet
« Reply #3 on: March 26, 2024, 04:33:24 pm »
where you feed, say, serial data
I am looking to do the same but for ad-hoc digital or analog signals.
Please make your requirements right. Serial data is not the same as analog, or any random digital signal.

With a pair of Ethernet MCUs, you could easily send raw data over UDP, it's the simplest protocol I know.

I was using the serial over ethernet kit as an example, to illustrate the kind of setup I have in mind. But I did say it was for ad-hoc stuff - can't say exactly what because I don't know right now. Think of something you'd join wire a bit of wire, and it could be that.
 

Offline PlainNameTopic starter

  • Super Contributor
  • ***
  • Posts: 6847
  • Country: va
Re: Wire over ethernet
« Reply #4 on: March 26, 2024, 04:34:42 pm »
I would probably just use something like a Raspberry Pi as the network device, then use the GPIO pins and some Python code to send your analog or digital signal over Ethernet.

Yes, that's the idea, although I wouldn't use a Pi nor Python :)

So what I am asking is whether that kind of thing already exists, or if I need to actually make it.
 

Offline ebastler

  • Super Contributor
  • ***
  • Posts: 6510
  • Country: de
Re: Wire over ethernet
« Reply #5 on: March 26, 2024, 05:17:28 pm »
You can get a pair of network adapters where you feed, say, serial data in one end and it comes out the other as if it were hard wired rather than traversing a network. I am looking to do the same but for ad-hoc digital or analog signals. Essentially, this is to be used where UTP was used to connect some stuff and that's now been co-opted to run network data instead - the original functionally now needs to run over virtual wires.

You should probably state your data rate and timing requirements. I assume it's a steady stream of data which must be transmitted without interruption? Is the latency critical too or could generous buffering be used?

Also, presumably there is other traffic on the network -- do you need to share bandwidth? How much bandwidth do you have available for your transmission, on average and worst case? Do you have to deal with routers, packet switching or whatever along the line? 

Edit: Oh, and what are the "ad-hoc digital signals"? What format or interface? You can't really ask whether a suitable product is available without specifying that, right?
« Last Edit: March 26, 2024, 05:21:05 pm by ebastler »
 

Offline pqass

  • Frequent Contributor
  • **
  • Posts: 726
  • Country: ca
Re: Wire over ethernet
« Reply #6 on: March 26, 2024, 05:28:10 pm »
So what I am asking is whether that kind of thing already exists, or if I need to actually make it.
Well they do make serial to Ethernet converters.  They're not cheap.
From the product page:  "In addition, the device server supports TCP server, TCP client, and UDP modes of communication, and serial tunneling, which you can use to send data between two serial devices via the TCP/IP link instead of RS-232, -485, or -422 connections. Link a touchscreen to a distant PLC over the Ethernet network, for instance."
« Last Edit: March 26, 2024, 05:35:28 pm by pqass »
 

Offline tom66

  • Super Contributor
  • ***
  • Posts: 6709
  • Country: gb
  • Electronics Hobbyist & FPGA/Embedded Systems EE
Re: Wire over ethernet
« Reply #7 on: March 26, 2024, 05:30:56 pm »
Does the network interface have to play nicely with existing Ethernet infrastructure, or are you just looking to utilise the cables for sending signals?  If it's the latter, you just need to break out the signals to some kind of interface board.  I suspect you can find one of those cheaply enough as they're often used to test Ethernet cables.

If it's the former, the fundamental problem you will have if it has to co-operate with Ethernet is that all packet delivery mechanisms over Ethernet are either best effort (like UDP) or reliable delivery without a latency guarantee (like TCP).    If you are sending encoded analog or digital signals over this interface, you'll have to cope with the interface occasionally going into an undefined state if the network is congested.  For, say, RS232 it might be as simple as breaking at a character boundary, but for something like digital video there might not be a way to put a space in a frame without breaking the overall operation of a system.
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 3710
  • Country: nl
Re: Wire over ethernet
« Reply #8 on: March 26, 2024, 08:03:26 pm »
If it's the former, the fundamental problem you will have if it has to co-operate with Ethernet is that all packet delivery mechanisms over Ethernet are either best effort (like UDP) or reliable delivery without a latency guarantee (like TCP).

There is QOS (quality of service) that is used in VOIP (RTP UDP) transmissions, but depends on implementation and settings in routers and switches, so still best effort with some priority.

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 6389
  • Country: ca
  • Non-expert
Re: Wire over ethernet
« Reply #9 on: March 26, 2024, 08:42:37 pm »
Well they do make serial to Ethernet converters.  They're not cheap.
From the product page:  "In addition, the device server supports TCP server, TCP client, and UDP modes of communication, and serial tunneling, which you can use to send data between two serial devices via the TCP/IP link instead of RS-232, -485, or -422 connections. Link a touchscreen to a distant PLC over the Ethernet network, for instance."

Serial to ethernet converters are cheap now if you go for a noname brand: https://www.aliexpress.us/item/3256803765053671.html https://www.aliexpress.us/item/3256804215918107.html The issue is just the protocols are non-standard and all over the place.

Also OP is asking about analog signals.
You can get those too: https://www.aliexpress.us/item/3256805676123978.html Has up to 6 analog inputs and outputs for $30.

But I don't know how hard it is to set up two to just pass data through, or what sort of bandwidth they have.
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 

Offline PlainNameTopic starter

  • Super Contributor
  • ***
  • Posts: 6847
  • Country: va
Re: Wire over ethernet
« Reply #10 on: March 26, 2024, 09:36:46 pm »
Quote from: ebastler
You should probably state your data rate and timing requirements. I assume it's a steady stream of data which must be transmitted without interruption? Is the latency critical too or could generous buffering be used?

Ah, perhaps I wasn't too clear. There is no data rate as such - imagine a button at one end and a button input at the other. Or an LED. Perhaps daylight sensor (analog). Stuff like that - if I need to do actual data comms then I would do that via a pukka IP connection.

Quote
Also, presumably there is other traffic on the network -- do you need to share bandwidth?

Yes, normal LAN traffic. Currently is gigabit Ethernet and traffic is low: mobiles and satnavs periodically.

Quote
what are the "ad-hoc digital signals"?

Dunno. That's why they are ad-hoc :)

Quote
You can't really ask whether a suitable product is available without specifying that, right?

I believe that's what I did at the start, yes! However, whatever solution presents would, of course, define what I could connect up, so think of it more as trying not to narrow the possibilities to some specific thing (like  how it's concentrated on serial data already!). I'm sure that if I succinctly describe a specific usage there will be a big discussion on how to perfectly sort that and nothing else will work with it.

Quote from: pqass
Well they do make serial to Ethernet converters.

Yes, but that's NOT what I want to do (already have those if I needed them). I used that simply for illustration to show the idea of having none-IP stuff traverse a network, but I am quickly thinking that might've been too helpful :(

Quote from: tom66
Does the network interface have to play nicely with existing Ethernet infrastructure

Yes.

Quote
or are you just looking to utilise the cables for sending signals

No, that's what it used to be. About twenty years ago I buried two runs of cat5, using one for network and t'other for alarm. Then because there was little use for the network (just a milling machine, and I preferred to keep that off the net for security) I used that cable for security cameras (four in the end, using baluns at each end). But now the alarm had an alternative route and we needed decent WiFi there so it made sense to convert the alarm cable over to Ethernet. But... I kind of got used to being able to use the unused pairs in the alarm cable for simple connections, so that's what I'm trying to replicate.
 

Offline PlainNameTopic starter

  • Super Contributor
  • ***
  • Posts: 6847
  • Country: va
Re: Wire over ethernet
« Reply #11 on: March 26, 2024, 09:38:34 pm »
Also OP is asking about analog signals.
You can get those too: https://www.aliexpress.us/item/3256805676123978.html Has up to 6 analog inputs and outputs for $30.

But I don't know how hard it is to set up two to just pass data through, or what sort of bandwidth they have.

Wow! That looks interesting enough to have a play with even if, ultimately, it doesn't turn out. Thanks  :-+

Edit: maybe... It wants a PC or terminal at the other end, which isn't in the plan. It could be done easily enough by having some intelligence reading from one and writing to the other (and vice versa), a kind of MITM controller. Is that simple and easier than just rolling my own network dongles which would talk direct to each other? Difficult one... But any excuse to try new toys :)
« Last Edit: March 26, 2024, 09:49:28 pm by PlainName »
 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 6389
  • Country: ca
  • Non-expert
Re: Wire over ethernet
« Reply #12 on: March 26, 2024, 10:16:12 pm »
Yes looking at the manual it needs a PC so can't be device to device. For that level off the shelf I'm guessing you'd need a full on PLC or similar.

Another few: https://www.aliexpress.us/item/3256804650601020.html https://www.aliexpress.us/item/4001078446561.html
ESP32 breakout for WIFI stuff (coding required): https://www.aliexpress.us/item/3256806016605486.html
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 

Offline PlainNameTopic starter

  • Super Contributor
  • ***
  • Posts: 6847
  • Country: va
Re: Wire over ethernet
« Reply #13 on: March 26, 2024, 10:50:38 pm »
The ESP32 ones look right, and close to what I had in mind to DIY.
 

Online themadhippy

  • Super Contributor
  • ***
  • Posts: 2583
  • Country: gb
Re: Wire over ethernet
« Reply #14 on: March 26, 2024, 11:32:18 pm »
If its a 4 pair cable roll back to a 100meg  connection and free up 2 pairs
 

Offline PlainNameTopic starter

  • Super Contributor
  • ***
  • Posts: 6847
  • Country: va
Re: Wire over ethernet
« Reply #15 on: March 26, 2024, 11:47:12 pm »
That would severely dent what the link could be used for, both in the way of network  bandwidth and non-network connections.

Edit: got that wrong - it would give me potentially three wires (I was thinking pairs, but a single return might be fine depending on requirement). But the 100MB network is too horrible to contemplate. Otherwise a good idea!
« Last Edit: March 27, 2024, 10:43:45 am by PlainName »
 

Online shapirus

  • Super Contributor
  • ***
  • Posts: 1361
  • Country: ua
Re: Wire over ethernet
« Reply #16 on: March 26, 2024, 11:51:25 pm »
Ah, perhaps I wasn't too clear. There is no data rate as such - imagine a button at one end and a button input at the other. Or an LED. Perhaps daylight sensor (analog). Stuff like that - if I need to do actual data comms then I would do that via a pukka IP connection.
Ethernet is a digital protocol. If you need to transmit an analog signal using a digital protocol, then you have to digitize it (and convert back to analog, if required, on the receiving side). Once it's digitized, you have data rate and timing requirements.
 

Offline PlainNameTopic starter

  • Super Contributor
  • ***
  • Posts: 6847
  • Country: va
Re: Wire over ethernet
« Reply #17 on: March 27, 2024, 12:01:24 am »
Ah, perhaps I wasn't too clear. There is no data rate as such - imagine a button at one end and a button input at the other. Or an LED. Perhaps daylight sensor (analog). Stuff like that - if I need to do actual data comms then I would do that via a pukka IP connection.
Ethernet is a digital protocol. If you need to transmit an analog signal using a digital protocol, then you have to digitize it (and convert back to analog, if required, on the receiving side). Once it's digitized, you have data rate and timing requirements.

Sure, but the rate of change determines how often you need to send data, so if that rate is either slow or steppy then your actual protocol speed can be, er, relaxed. You don't have to do 44kHz x 16-bit when nowt is happening.
 

Online shapirus

  • Super Contributor
  • ***
  • Posts: 1361
  • Country: ua
Re: Wire over ethernet
« Reply #18 on: March 27, 2024, 12:38:35 am »
Sure, but the rate of change determines how often you need to send data, so if that rate is either slow or steppy then your actual protocol speed can be, er, relaxed. You don't have to do 44kHz x 16-bit when nowt is happening.
Well yes, but there is still some data rate and there are still timing requirements to meet. It may be low or high and it may be easy or difficult, depending on the sample rate and sample size of the ADC process. So for analog signals, you basically need ADC->MCU (with an eth interface)->ethernet->MCU->DAC, correct? I don't know if there are any ready made solutions, but it doesn't sound too hard to DIY, as long as bandwidth requirements stay reasonably low. For digital signals, you skip ADC/DAC and use GPIO directly (after/before level conversion and input/output protection, if necessary).
 

Offline PlainNameTopic starter

  • Super Contributor
  • ***
  • Posts: 6847
  • Country: va
Re: Wire over ethernet
« Reply #19 on: March 27, 2024, 10:53:36 am »
Quote
I don't know if there are any ready made solutions, but it doesn't sound too hard to DIY

Well that's is the crux of my original ask: I was going to get started on DIY but then wondered if I would just be reinventing some product that already exists.

The thread has turned up some things to think about. For instance, I hadn't considered the modbus gateways which superficially seem inappropriate because they are slaves oops, clients wanting a controller, but an ESP32-based doobrey could easy be that as well as dealing with it's own I/O. But if I'm going to have one ESP32-based device, why not have that at both ends instead. It is close, but I think it has to be either completely turnkey or all DIY.
 

Offline EPAIII

  • Super Contributor
  • ***
  • Posts: 1067
  • Country: us
Re: Wire over ethernet
« Reply #20 on: March 30, 2024, 03:27:56 pm »
I don't understand why you wouldn't use an Arduino or Raspberry Pi or just a plain PIC. Once you start two of them talking to each other any data, including very low frequency data or analog signal input with an ADC could be transmitted and reconstituted at the other end. A simple relay could activate a light bulb, buzzer, or bell.
« Last Edit: March 30, 2024, 03:31:41 pm by EPAIII »
Paul A.  -   SE Texas
And if you look REAL close at an analog signal,
You will find that it has discrete steps.
 

Offline PlainNameTopic starter

  • Super Contributor
  • ***
  • Posts: 6847
  • Country: va
Re: Wire over ethernet
« Reply #21 on: March 30, 2024, 03:32:01 pm »
I don't understand why you wouldn't use an Arduino or Raspberry Pi or just a plain PIC. Once you start two of them talking to each other any data, including very low frequency data or analog signal input with an ADC could be transmitted and reconstituted at the other end.

Perhaps I could highlight a sentence from the post previous to yours:

Quote
I was going to get started on DIY but then wondered if I would just be reinventing some product that already exists.

For 'DIY' assume PIC, Pi, whatever (deffo not Arduino though).
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf