Using a Nano Pi, a POE splitter, and a custom project box to create a mobile UDP to RS485/VISCA shading rig

Awhile back, I wrote about how we created a network based VISCA shading rig for our Marshall CV503 cameras we use on stage, to control their various exposure settings. The cameras themselves can only do this via RS485 serial, and our system sends UDP from Bitfocus Companion (we use the Sony VISCA module/connection) over the network, converts to serial at a Raspberry Pi, and then using custom cables, we can send the signal to our cameras over the patchbay.

We’ve been using that system ever since and it works great. We have even recently taken the steps to create custom cable looms that have SDI, CAT6, and power all in one loom to make it a breeze to set up.

Recently, we set up one of these cameras at the back of our auditorium where it’s impractical to run a cable all the way to our patchbay in the rack room at the stage side for a serial connection. We still need to control the exposure, so a solution was needed.

It’s also impractical these days to buy a Raspberry Pi. They have gotten quite expensive, and difficult to find in stock.

A few months ago, I bought a Nano Pi NEO and started playing around with it to see what it could do, since it’s easy to get ahold of and very affordable.

This is the Nano Pi NEO single board computer.

It has an ethernet port, a full size USB A port, and is powered via micro USB. It runs Armbian quite well, so it was very simple to install my existing udp-to-serial nodejs script.

I bought a project box and modified it to fit all the parts. I started with a dremel but I should have just used a hacksaw from the beginning, because that gave me much cleaner cuts. I didn’t want to do any soldering or make custom internal cables, so my box had to be a little larger.

The entire rig is powered by a single POE to USB adapter. This provides the ethernet data to the Nano Pi, and then micro USB power to the Nano Pi’s power port. I also figured out awhile back that you can use a USB 5V to 12V step-up cable to power these cameras, so I put one of those in the box as well.

POE to USB adapter, RS485 cable, and two keystone jacks for serial out. Blue/White-Blue pins for +/-.

We put RJ45 keystone jacks on the box to provide the serial out connections, and we also hot glued the POE to USB adapter to the lid of the box so the connection could be flush with the edge.

It’s certainly crammed in there! The Nano Pi is glued to the bottom, and the rest of the cables are tucked into the box. The USB splitter, the USB to RS485, and the USB 5V to 12V DC cable.

Here are the parts I used:

  • Nano Pi Neo
  • POE to USB adapter – to pass network to the Nano Pi and to give USB power
  • USB 5v to 12v DC step-up adapter – to power the Marshall CV503 instead of using the stock camera power supply
  • USB splitter cable – to split the POE USB power to both the Nano Pi and the step-up cable that powers the camera
  • Micro USB cable – to power the Nano Pi
  • USB to RS485 adapter – this is what sends the received UDP data out to serial
  • Keystone jacks used for the serial connections. We then have custom RJ45 to Phoenix connectors that plug into the cameras. This method allows us to use any standard CAT5/6 patch cable to make the connections in between.
  • Project box to hold it all

These are Amazon purchase links. As an Amazon Associate I earn from qualifying purchases.

One single POE connection provides all the power and data needed.

Overall, pretty pleased with how it turned out! I like that it’s just two cables – one for the SDI video signal off the camera, and one ethernet to power it all and provide the data connection.

What project ideas do you have for a Nano Pi?

Using a Stream deck and a raspberry pi to create a remote control panel to adjust marshall cameras over ip with rs-485 control

At my church, we have 4 of these cameras: Marshall CV503

Marshall CV503 Miniature Camera

We use them during services to capture shots of the instruments (drums, keys, etc.) and whatever is happening on stage. They are great little action-style cameras, and they have SDI out on them so they are super easy to integrate into our video system.

They have a lot of adjustment options to them via a local joystick-style controller at the camera, but obviously, that’s challenging to use during a service if we needed to adjust the camera’s exposure. The menu is OSD and shows up on the live output. Plus they’re all over the stage and we can’t walk there during the service!

While I wish they were IP-controllable directly, this particular model does not have that option. They do, however, come with RS-485 serial connectors.

So we decided to create a remote shading system using a stream deck running Bitfocus Companion. The Marshall cameras support the VISCA protocol over RS-485. In fact, if you’re a Windows user, Marshall provides free software to control the cameras over RS-485.

Marshall provides this program to control, if you have Windows and want to connect your cameras directly to that computer.

We don’t use a lot of Windows computers around here, and that program requires that the computer running their software be the one physically connected to the cameras via serial. Not ideal for us because the cameras are on a stage and our computers typically are not. Marshall also actually makes a nice hardware RCP – but we didn’t want to pay for that.

So we did what you probably already guessed – put in a Raspberry Pi with a USB to RS-485 adapter that we could control remotely.

We have several wallplates across the stage with network tie lines on them that feed back to the rack room in a patchbay. So we made cables that connect to the RS-485 ports at each camera that then go back to a wall plate into a RJ45 port. We utilized the blue/white-blue pair on CAT6 cable. We used that pair because these are data pins in a normal network connection, which means if someone ever accidentally connected it straight to a switch or something, there would not be any unintended voltage hitting the cameras.

Each camera is set to its own camera ID (1-4), and the matching baud rate of 9600 (the default). Then in the rack room, we made a custom loom to take the 4 connections and bring them into a jack, which then feeds into the USB to RS-485 adapter on the Pi.

The Pi is a 4 model with 4GB of ram. Honestly, for what this thing is doing, we probably could have just run it off of a Pi Zero, but I wanted it hardwired to my network, and the bigger Pi’s come with ethernet ports built in.

I bought this adapter off Amazon:

DSD TECH SH-U10 USB to RS485 Converter with CP2102 Chip

When connected, it represents itself as serial port /dev/ttyUSB0. We originally planned to use the socat program in Linux to listen for UDP traffic coming from Companion:

sudo socat -v UDP4-LISTEN:52381 open:/dev/ttyUSB0,raw,nonblock,waitlock=/tmp/s0.locak,echo=1,b9600,crnl

To actually send the UDP data, we’re using the Sony VISCA module already built into Companion. The Marshall cameras use the same protocol over RS-485.

Using the socat method, we quickly found that it would only listen to UDP traffic coming from one instance of the module. We need 4 instances of the Companion module because we have 4 cameras, each with a different camera ID.

However, nothing a small Node.JS program can’t solve. So I wrote a program that opens the specified UDP port, opens the specified serial port, and sends any data received at that UDP port straight to the serial port. You just configure a new instance in Companion for each camera with the same IP of the Pi running the udp-to-serial program, and the camera ID that you configured at the Marshall camera.

Here’s a video that shows it all in action:

If you want to try this out for yourself, I’ve made the udp-to-serial repository available here:

http://github.com/josephdadams/udp-to-serial