Paid Gig - RS-232 routing with Arduino

Hi guys

I need a program written for the Arduino Mega (so hardware serial rather than software hopefully) which can listen on one serial port for incoming commands, and then based on the incoming command, send one from a list of predefined serial HEX strings out via a couple of other serial ports.Scenario is this:

  • 1 RS-232 source (audio processor unit)
  • 2 RS-232 receiver (video switchers)

The RS-232 source (sound processor) has only one RS-232 port, but I need to control the 2 video switchers separately. The video switchers use a predefined set of RS-232 Hex strings to switch particular inputs to outputs (8 x 8 matrix switcher, so 64 "switch" hex strings).

What I need to have is this:

  • We fire a serial string out from the audio processor (HEX or ASCII), this would be a custom string such as Unit2Input1Output5 , to the Arduino, which would be listening on one serial port. Once it sees this command come in, I need it to fire the relevant command ("Input 1 to Output 5" in this instance) to the relevant video switcher (switcher 2 in this case).

Essentially I want the Arduino to act as an RS-232 signal router, listening for commands and using (I'm guessing here) a lookup table or similar to translate the incoming command to the correct output command, and to the right RS-232 output port. Alternatively I can send the signals out to the video switchers using serial over IP, but the incoming signal from the audio processor will always be hardwired RS-232.

I have an Arduino Mega, and a few premade MAX232 breakout boards with DB9 sockets.

I need this completed in a short time space (eg ASAP!) as i've just had confirmation that the project is going ahead, and I just don't have the time to learn the coding to the depth that I will need to make this work reliably.

I have attached the table of outgoing commands that we will need to be able to send to the video switchers as a text file to hopefully make things a little clearer.

If any interested parties could reply or drop me a PM i'd be grateful.

Thanks in advance

Rob :slight_smile:

RS232 Codes (4x4 and 8x8).txt (4.31 KB)

Do you have control over the input? "Input 7 to Output 1" is harder to parse than "I, 7, O, 1".

Hi Paul

The output command from the audio processor into the Arduino can be in Hex or ASCII format, and we can literally make the string anything we want. The only limiting factor is that the processor (source device) can only handle 32 characters per outgoing string - however if we have to, we can make it fire off more than one string in succession.

The shorter the string the better for me, as I will have to type each command into the audio processor's software during programming!

Thanks

Rob

Hi Rob,

Are those all the codes, or just an example?

Pat