sebmillet / RF433any

GNU Lesser General Public License v3.0
41 stars 4 forks source link

Use for 802.4 Token Bus? #18

Closed tlf30 closed 3 months ago

tlf30 commented 4 months ago

Hello, I am wondering if this library could be used to decode the Manchester Biphase L signal on an 802.4 like network? The network is operating at 5 Mbs with the Manchester encoded clock at 10 Mhz.

The frame looks like this: image

It has a 16 bit preamble and 8 bit start/end delimiters.

I am working with an ESP32 board, esp32doit-devkit-v1, which as dual cores, but can easily change to a different chip.

The transceiver I am working with has a carrier detect signal to indicate that the RX level on the network is within the voltage threshold for a valid signal, and requires both a TX and TX BAR signal (the TX signal inverted).

Do you think this would be feasible to setup with your library? I'm mostly worried about the data rate, and what optimizations would be required to achieve it.

Any help would be appreciated.

Thank you, Trevor

sebmillet commented 3 months ago

Hello

I don't think RF433any is suitable for such decoding. I see these issues:

1) RF433any expects an "init" sequence longer than the following short/long timings making the data coding, and it expects a "separator" (or another init sequence) at the end = another timing different from short/long durations. In your case, I see no such signal inits or separators. The specs start with a preamble that is already part of the low level code.

2) You mention signal works at 10 Mhz. The lib has been developed, and tested, using Arduino operating at 16 Mhz, and the timing that can be handled is typically of ~ 100 microseconds (instructions take several cycles + many instructions are executed at each signal switch). This is, in order of magnitude, one thousand longer than a 10 Mhz signal. Maybe ESP32 is fast enough to handle it? I don't know the answer but I'd bet it is no (at least while using my lib = this lib executes really a lot of instructions at each signal switch).

3) The data amount in your case can be up to 4 thousand bits (512 bytes), whereas RF433any has been designed to handle signals containing short amounts like 32 or 64 bits or a little more. The longest I've seen and tested is 72 bits. It certainly can manage longer data but I doubt it'll gracefully scale to managing 60x more data.

4) For an already-known-timings signal ("Manchester at 10 Mhz" implies precise timings), rf433recv would be more suitable. That said, comments above apply, so I don't think rf433recv will help either.

Regards, Sébastien Millet

tlf30 commented 3 months ago

Thank you for the detailed information Sébastien. I have purchased an FPGA development board and will attempt to build a hardware solution instead.

Thanks again, Trevor