Browse KB Articles
USB 3.1 Multiple Camera Setup
KB Number: 10350
Technical Application Note (TAN2012005): USB 3.1 Multiple Camera Setup
FLIR USB 3.1 machine vision cameras
Application Note Description
This application note explores multiple USB 3.1 camera configurations. The purpose of this document is to provide a reference and a starting point for USB 3.1 camera users who wish to use multiple USB 3.1 cameras in their application.
Preparing for Use
Before you use your USB 3.1 camera, we recommend that you are aware of the following resources available from our Downloads page:
Getting Started Manual for the camera—provides information on installing components and software needed to run the camera.
Technical Reference for the camera—provides information on the camera’s specifications, features and operations, as well as imaging and acquisition controls.
Firmware updates—ensure you are using to most up-to-date firmware for the camera to take advantage of improvements and fixes.
Spinnaker SDK—(for Blackfly S cameras only) contains all documentation, example source code, precompiled examples, and libraries required to develop your application using our Spinnaker SDK.
FlyCapture2 SDK—contains utilities to configure the camera such as Driver Control GUI, update firmware and drivers, and check setup. As well, contains the FlyCapture2 API for use in creating your own applications.
FLIR USB 3.1 Technology
The type of data transfer that our USB 3.1 cameras use is bulk transfer. When factoring in the related overhead, the effective bandwidth is approximately 450 MB/s. Our USB 3.1 implementation uses image buffering to improve multiple camera system reliability and ensure data integrity.
Our USB 3.1 cameras use a type of data transfer called bulk transfer. This type of transfer guarantees delivery and retransmits corrupt data packets, hence recovering from data errors when they occur.
Our USB 3.1 cameras have a data buffer that allows images to be temporarily queued in the camera after readout. The main advantage of the data buffer is that it allows the system to handle momentary slowdowns on the bus without dropping any data. If the overall data throughput drops below requested data rate for an extended period of time, the camera can send entire uncorrupted frames out slower, and drop entire frames cleanly, rather than drop partial frames and cause image data errors.
USB 3.1 link layer IP
We implemented its own USB 3.1 link layer technology in the camera FPGA. This allows us to introduce new functionality and ensure compatibility with third party hardware.
USB3 Vision Standard
Our USB 3.1 cameras comply with the USB3 Vision standard. USB3 Vision is a communication interface for vision applications based on the USB 3.1 technology. All cameras supporting USB3 Vision interact the same way with software also supporting USB3 Vision. The Spinnaker SDK uses GenICam to support the USB3 Vision standard.
For more information on the USB3 Vision standard, visit visiononline.org.
We sell three USB 3.1 host controller cards: two based on the FL1100 chipset from Fresco and the µPD720200 chipset from Renesas. In addition to the manufacturer drivers, we recommend using the PGRUSBCam driver. For a list of compatible chipsets, see TAN2011005 Recommended USB 3.1 System Components.
With SpinView (for Blackfly S) or our driver control utility, you are able to identify the driver you are using and easily switch between them. Select the Point Grey Driver from the driver selection window.
USB 3.1 does not automatically manage bandwidth allocation. To help users accommodate multiple cameras on a single bus, we use a camera attribute which limits peak data bandwidth. This can be used to reduce the amount of data coming from each camera, preventing skipped frames or connectivity issues.
Device Link Throughtput Limit-GenICam
Use the device throughput limit feature to verify your system’s bandwidth limit, ensure your total bandwidth use is within that limit, and adjust your camera’s bandwidth accordingly. Consider the total of all the cameras on the system to calculate the required bandwidth.
We recommend that the bandwidth requirements be divided equally among the number of cameras used, for example—two cameras, each requiring half of the maximum bandwidth; three cameras, each requiring one third of the maximum bandwidth.
In the figure below, we see that the device max throughput is 38768000 bytes per second (384 MB/s). The current device link throughput limit is 18320000 bytes per second (184 MB/s).
Format 7 Packet Size-IIDC
Format 7 packet size provides the user with a mechanism to allocate bandwidth for a particular camera. Reducing the packet size lowers the camera’s maximum frame rate and limits the amount of bandwidth the camera can use. The packet size can be controlled in FlyCapture2 or the IIDC registers.
FlyCap2 can be used to determine the bandwidth allocated for a given packet size. Reduce or increase the packet size to ensure the total amount of bandwidth output by the camera(s) does not exceed system limits.
In the figure below, we see that reducing the packet size to 22624 bytes limits the maximum frame rate to 55 FPS, assuming image size and pixel format stay the same.
Calculating Required Bandwidth
To calculate your bandwidth requirements, use your required resolution, frame rate, and pixel format (bytes per pixel) in the following equation.
Height x Width x Frame Rate x Bytes per Pixel = Bandwidth in MB
Camera model: FL3-U3-13S2M-CS
Resolution: 1328 x 1048
Frame rate: 60 FPS
Pixel format: Mono16
Bandwidth = 1328 x 1048 x 60 x 2 = 167 MB
Multiple camera system configurations
This section documents various configurations and scenarios that have been tested with our USB 3.1 multiple cameras. The hardware and software setup with each configuration is also documented.
Multiple cameras connected directly to a USB 3.1 host controller
The figure below illustrates 4 cameras running on a 4 port USB3 card with Fresco FL1100 host controller.
Multiple cameras connected directly to the host controller
We used a console test application to obtain the test result below. The test application configures each camera to run at high performance mode and verifies that there are no dropped images.
Using the configuration above, a total of 368 MB/s is transferred to the host from multiple cameras. Although the effective USB 3.1 bandwidth is approximately 450 MB/s, peak performance can vary, depending on how the USB3 host adapter card manages bandwidth.
Multiple cameras connected via a USB 3.1 hub
This configuration demonstrates free-running 2 and 3 cameras using a single USB 3.1 hub. A table isprovided to demonstrate the frame rates achieved in each configuration. As shown from the results, the USB 3.1 hub used could not sustain a data rate of greater than 345 MB/s.
Multiple cameras connected to the host via hub
Note: For further recommendations, see TAN 2011005 Recommended USB 3.1 System Components.
Example A - One camera connected to a hub
Example B - Two cameras connected to a hub
Example C – Three cameras connected to a hub
Using the configurations above, the total throughput ranges from 322 MB/s to 373 MB/s. Although the effective USB 3.1 bandwidth is approximately 450 MB/s, peak performance can vary depending on how the USB 3.1 host controller manages bandwidth.
Multiple Cameras Connected to Multiple Host Controllers
The following configuration uses multiple host controllers to share the bandwidth for 15 cameras.
*Bandwidth shared across multiple host controllers
Link Recovery Errors
Skipped Image Frames
Low Frame Rate