Wire over ethernet - Page 1
Forum section: electronics / general

author: PlainName
author_rank: Super Contributor
timestamp: March 26, 2024, 02:49:58 pm
content: 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.

author: DavidAlfa
author_rank: Super Contributor
timestamp: March 26, 2024, 03:55:19 pm
content: Quote from: PlainName on March 26, 2024, 02:49:58 pmQuote from: PlainName on March 26, 2024, 02:49:58 pmPlease 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.

author: Andy Chee
author_rank: Super Contributor
timestamp: March 26, 2024, 04:07:58 pm
content: 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.

author: PlainName
author_rank: Super Contributor
timestamp: March 26, 2024, 04:33:24 pm
content: Quote from: DavidAlfa on March 26, 2024, 03:55:19 pmI 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.

author: PlainName
author_rank: Super Contributor
timestamp: March 26, 2024, 04:34:42 pm
content: Quote from: Andy Chee on March 26, 2024, 04:07:58 pmYes, that's the idea, although I wouldn't use a Pi nor PythonSo what I am asking is whether that kind of thing already exists, or if I need to actually make it.

author: ebastler
author_rank: Super Contributor
timestamp: March 26, 2024, 05:17:28 pm
content: Quote from: PlainName on March 26, 2024, 02:49:58 pmYou 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?

author: pqass
author_rank: Super Contributor
timestamp: March 26, 2024, 05:28:10 pm
content: Quote from: PlainName on March 26, 2024, 04:34:42 pmWell they do makeserial 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."

author: tom66
author_rank: Super Contributor
timestamp: March 26, 2024, 05:30:56 pm
content: 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.

author: pcprogrammer
author_rank: Super Contributor
timestamp: March 26, 2024, 08:03:26 pm
content: Quote from: tom66 on March 26, 2024, 05:30:56 pmThere 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.

author: thm_w
author_rank: Super Contributor
timestamp: March 26, 2024, 08:42:37 pm
content: Quote from: pqass on March 26, 2024, 05:28:10 pmSerial to ethernet converters are cheap now if you go for a noname brand:https://www.aliexpress.us/item/3256803765053671.htmlhttps://www.aliexpress.us/item/3256804215918107.htmlThe 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.htmlHas 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.

author: PlainName
author_rank: Super Contributor
timestamp: March 26, 2024, 09:36:46 pm
content: Quote from: ebastlerAh, 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.QuoteYes, normal LAN traffic. Currently is gigabit Ethernet and traffic is low: mobiles and satnavs periodically.QuoteDunno. That's why they are ad-hocQuoteI 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: pqassYes, 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 helpfulQuote from: tom66Yes.QuoteNo, 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.

author: PlainName
author_rank: Super Contributor
timestamp: March 26, 2024, 09:38:34 pm
content: Quote from: thm_w on March 26, 2024, 08:42:37 pmWow! That looks interesting enough to have a play with even if, ultimately, it doesn't turn out. ThanksEdit: 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

author: thm_w
author_rank: Super Contributor
timestamp: March 26, 2024, 10:16:12 pm
content: 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.htmlhttps://www.aliexpress.us/item/4001078446561.htmlESP32 breakout for WIFI stuff (coding required):https://www.aliexpress.us/item/3256806016605486.html

author: PlainName
author_rank: Super Contributor
timestamp: March 26, 2024, 10:50:38 pm
content: The ESP32 ones look right, and close to what I had in mind to DIY.

author: themadhippy
author_rank: Super Contributor
timestamp: March 26, 2024, 11:32:18 pm
content: If its a 4 pair cable roll back to a 100meg connection and free up 2 pairs

author: PlainName
author_rank: Super Contributor
timestamp: March 26, 2024, 11:47:12 pm
content: 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!

author: shapirus
author_rank: Super Contributor
timestamp: March 26, 2024, 11:51:25 pm
content: Quote from: PlainName on March 26, 2024, 09:36:46 pmEthernet 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.

author: PlainName
author_rank: Super Contributor
timestamp: March 27, 2024, 12:01:24 am
content: Quote from: shapirus on March 26, 2024, 11:51:25 pmSure, 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.

author: shapirus
author_rank: Super Contributor
timestamp: March 27, 2024, 12:38:35 am
content: Quote from: PlainName on March 27, 2024, 12:01:24 amWell 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).

author: PlainName
author_rank: Super Contributor
timestamp: March 27, 2024, 10:53:36 am
content: QuoteWell 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 areslavesoops, 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.

author: EPAIII
author_rank: Super Contributor
timestamp: March 30, 2024, 03:27:56 pm
content: 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.

author: PlainName
author_rank: Super Contributor
timestamp: March 30, 2024, 03:32:01 pm
content: Quote from: EPAIII on March 30, 2024, 03:27:56 pmPerhaps I could highlight a sentence from the post previous to yours:QuoteFor 'DIY' assume PIC, Pi, whatever (deffo not Arduino though).