Ruby - Digital radio link (video, data, control) for airplanes, drones and UAVs

Hardware Setup

Here you find all the information on how to connect all the hardware components and how to setup the optional hardware connections, if needed:

Hardware Components:

All components are regular consumer available components, nothing special is required to build a Ruby configuration.

Note: All hardware components are plug and play; that is, you can add/remove radio cards, extension boards, change cameras and so on, as needed. On the next power up Ruby will detect all the hardware changes and adjust according to them.
The only exception is the Pi itself. When you change the Pi board, you should flash new software images for it (that is, use a fresh install when changing the Pi boards).

Components needed for controller
  • 1 Raspberry Pi (Zero, Zero 2 (W), Pi 2,3,4 or variants);
  • 1 BEC/UBEC or any good 5V power supply;
  • 1 WiFi network card; see the list below of all supported network cards.
  • 1 HDMI display; Or any device that can receive and display HDMI;
  • 4 (+3 optional) Push buttons. This is for the menu navigation on the controller.
 
Components needed for vehicles
  • 1 Raspberry Pi (Zero, Zero 2 (W), Pi 2,3,4 or variants);
  • 1 Raspberry Pi or HDMI Camera (see below the full list of supported camera types);
  • 1 BEC/UBEC or any good 5V power supply (for providing a solid, high current capable, 5V supply to the PI board and network cards);
  • 1 WiFi network card; see the list below of all supported network cards.

Note: You can mix and match hardware as needed. That is, you can use different Pi boards for vehicles and controllers and use different radio modules on the same link (assuming they do support the frequency you will be using).

Supported computer boards
  • Pi Zero, Pi Zero W, Pi Zero 2 (W);
  • Pi 2,3,4 and variants;
  • * Pi compute module compatibility is uncertain. Some changes might be required to make it work;

Supported radio modules

2.4 Ghz band only 5.8 Ghz band
Atheros chipsets AR9271 cards:
(They also support 2.3 and 2.5 Ghz band)
  • TPLink WN722N V1
  • Alfa AWS036NHA
  • Various aliexpress cards
Ralink chipsets cards:
  • Alfa AWUS036NH
  Realtek chipsets RTL8812AU, RTL8811AU cards:
  • Alfa AWUS036ACH
  • ASUS USB-AC56
  • NetGear A6100
  • Tenda U12
  • Various aliexpress cards:
    (for example this or this or this one)

Note: These cards have been tested as working, but any cards with those chipsets will work just fine.

Supported cameras
  • Any Raspberry Pi camera;
  • Veye cameras 290/309/327 variants (http://www.veye.cc/en/);
  • Any digital camera that has a HDMI output (720p or 1080p), using a HDMI-CSI adapter board;

Wiring and connections:

If you are new to electronics and DYI projects, it's recommended you start with the basic wiring and connections as in the pictures below as it's easier and faster to do and have a system up and running:


Basic vehicle wiring
 

Basic controller wiring

If you have critical usage scenarios or you plan to use Ruby in environments with vibrations, the recommended wiring and connections are as in the pictures below. Basically replacing all USB cables and connectors with wires that are soldered at each end. This gives a more robust system in terms of reliability and resilience to vibrations:


Recommended vehicle wiring
 

Recommended controller wiring

Direct wiring of USB connections:

It is recommended that you wire directly the USB connections, from Pi to the radio cards, to not use USB cables and connectors, to avoid vibration issues, using the points on the Pi board that give you direct access to the USB data lanes, as in the pictures below:


USB connection points for Pi Zero/Zero W/Zero 2
 

USB connection points for Pi 2,3 and variants
 

USB connection points for Pi 4


Different USB type connectors pinout


Note: On Raspberry Pi 4, the video output is generated on the HDMI Output Port 0. So you should connect a display to that port. The HDMI Output Port 1 is not used.

Buttons:

On the controller you need to add the 4 navigation buttons as the user interface on the controller is accessible using the buttons.
Remember, you need buttons only on the controller. No buttons are needed on vehicles.

Buttons Wiring:

The user interface on the controller can be accessed in Ruby using 4 push buttons for: Menu, Cancel, Up and Down. There are also some optional buttons, that enable auxiliary functions in Ruby like starting a video recording, taking a picture, changing OSD layouts, changing camera settings on the fly and more. They are not mandatory, but make life easier and the user experience more enjoyable.

Note: The user interface can be accessed and used now also using a rotary encoder. Please see the Peripherals section to see how to setup a rotary encoder.

If you choose to use buttons for interface navigation, you need to wire the buttons as in the pictures below. There is a common rail to all buttons, connected to 3.3v and one individual connection from each button to a GPIO pin on the Raspberry Pi:


Menu Navigation Buttons Wiring
 

Optional Buttons Wiring


You can assign what actions to do when pressing the Quick Actions buttons from the Preferences menu:


Quick Actions buttons


Other hardware connections:

There are few other hardware connections you can make to Ruby, that are optional, but can be used if needed.
They are as follows:
* A LED that will blink when video recording is turned on (on the controller side);
* A LED that will blink when there are major hardware or software issues (on the controller side);
* A GPIO pin that you can use to force a Pi to boot as a vehicle/relay, even if it has no camera (on the vehicle side);

The wiring for those is as in the picture below:

Optional LEDs and buttons


Serial Ports:

Ruby can communicate with external devices using serial interfaces (UART).
The serial interfaces can be used to communicate with a flight controller, with a camera gimbal, a receiver or other devices based on each individual application.
If you need more than one serial interface, to connect to multiple devices, you can add any number of USB to serial adapters and connect them to the USB ports on the Pi, as in the picture below:


Accessing serial ports on a Raspberry Pi

Note: Use only brand name USB to serial adapters or ones with CP2109 or CP2102 chipsets. The USB serial adapters with CH340 chipset are not supported.

All available serial ports will be shown in the Ruby UI interface and you can change the parameters and usage for each individual port.


Most of the times, on the vehicle, you want to connect your flight controller to the Raspberry Pi so that Ruby can receive telemtry info from the flight controller and to send data and commands to the flight controller.
You need to connect the serial interface as in the picture below:


Wiring of flight controller for telemetry data

Note: Keep in mind that Raspberry Pi uses 3.3 volts logic levels. Most modern flight controllers (Pixhawk, Cube, STM32, etc) also use 3.3 volts so nothing special needs to be done. If you have an old or special flight controller that used 5 volts logic levels, you need to insert a level shifter.

Ruby Hardware Peripherals:

You can add optional hardware components to Ruby controller that will extend the functionality with new features.


Optional peripherals that can be attached to the controller


Raspberry Pi Pico Add-on:

To expand the I/O capabilities of Raspberry Pi, to add more UART interfaces, analog inputs, SBUS/IBUS/PPM RC input and other future extensions, a small Raspberry Pi Pico is connected to the Pi controller using the I2C interface.
The add-on Pico is powered directly from the main Pi:


Connecting a Pico Pi to the controller Pi


To add peripherals to the Pico Pi, use the following diagram:


Connecting I/O peripherals to Pico Pi
Note: Raspberry Pi Pico is using 3.3v levels on the GPIO pins, but from the tests done, it can handle just fine 5V IBUS/SBUS input. You should add a 5v -> 3.3v level shifter on the IBUS/SBUS input if your source signal is using 5v levels.

You need to flash the Ruby software on your Pico. See the Downloads section for instructions on how to flash a Raspberry Pi Pico and to get the latest software for the Pico.

I2C Interface:

Ruby can use I2C interface and communicate with external devices.
You can add multiple devices on the same I2C interface and all I2C devices that are detected at boot will show up in Ruby UI interface and you can change parameters for each individual I2C device.

Note: Raspberry Pi uses 3.3 volts logic levels. If you need to connect I2C devices that use 5 volts logic levels, use a level shifter as in the picture above.


Using the I2C bus on the Raspberry Pi