Serial out node - how to send break and idle instruction?


How can I send 88 usec break and 8 usec idle state before the main data frame, using node (e.g. Serial Out)?

Does the hardware you are using allow the serial port to be driven like that? If the hardware does not support then there is nothing that node-red can do.

I have no idea, Colin. That's why I want to test it.
This break is just a low state of line - a bunch of zero bits, just without surrounding start and stop bits. Why would serial port not support this?

What hardware are you using for the serial port? Direct to gpio pins or a usb serial dongle, or what?

RS-485 hat over Raspberry Pi.

So the question is, is it possible, using the HAT that you linked to, to send an 88 usec break and 8 usec idle state before the main data frame? I think that is a question that you need to direct to a Pi forum or to the supplier of the HAT. Do you know if it is possible to do it with a standard USB/RS485 interface? Googling for Pi DMX suggests that you need specific hardware for driving a DMX bus. This for example

Yes, I know there are plenty of hardware dedicated to RPi and DMX, including USB dongles, but I've been successfully running DMX over other RS485 shield, like Zihatec on Arduino, which is also a regular RS485 hat.

Maybe I should rephrase my question to:
How can I send 88 usec break and 8 usec idle state before the main data frame, using node (e.g. Serial Out), assuming that my hardware supports it?
It's a general software-based question. I guess DMX isn't the only protocol using this kind of break.

How do you achieve the break in that setup?

[Edit] Or alternatively, forget about node-red for the moment, assume you are using Python or whatever language you like, how would you achieve what you want on the Pi? Once that is answered then it should be clear how to do it in node-red.

There are a couple of Arduino C++ libraries that allow sending this type of signal over RS, like DMXSimple, DMXMaster or DMXSerial - they work fine.

Alright, assuming that I already have a python code running DMX, what then? I know there are nodes executing python scripts, but they have unacceptable latency.

I understand your point - why am I asking about a node if I'm not even sure if my hardware can handle DMX. Well, It's an academic question about how can I model a particular protocol using Node-RED, and understanding it better in general.
When I send a bunch of bytes over Serial Out node, it surrounds it with one start bit and one or two end bits (or parity bit). My question is simply - is Node-RED capable of adding a break and mark-after-break in the beginning of the signal. I cannot just add 22 zero bits instead of this break, because they will also be wrapped in start/end bits.

Take a look at the end of that python code - the last four lines. This is how it's done in python.

Is that code intended to be used on a pi with an usb/rs485 dongle?

If so then I stand corrected. I did not think it was possible. I think the serial node would have to be extended to provide that.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.