Troubleshooting problems when running multiple USB 2.0 cameras on the same bus

Last Revision Date: 9/16/2015

This article discusses some common issues that may arise when running multiple USB 2.0 cameras on the same bus, and offers suggestions for troubleshooting them. 

Note: Although the USB 2.0 standard allows for multiple devices on a single bus, we does not currently support these configurations. We have not performed any rigorous qualification of the ability of various hardware platforms, operating systems, software and drivers to handle multiple USB 2.0 image streams. The following information is provided only as a service to our customers, and does not indicate an endorsement of a multiple-USB configuration. Wherever possible, FireWire cameras should be used for applications that require multiple cameras running simultaneously on the same computer.

Determining Bandwidth Requirements for Isochronous Transmission

The USB 2.0 specification allows transmission of 512 bytes per packet, up to 13 packets per isochronous transmission (iso) period. For proper camera operation, however, expect a maximum of 9 to 11 packets per iso period. Faster PCs may allow closer to 11 packets, while slower PCs will be less.

For example, consider nine cameras that are grabbing images on the same bus at 1280x960 resolution, in 8 bit/pixel format, at 1 FPS. This configuration transmits 2.7 packets per iso period, well below the maximum limit:

1280x960 x 1FPS x 1Bpp x 9 cameras = 11059200 bytes/second

11059200 / 8000 cycles/second / 512 bytes/packet = 2.7 packets/iso period

Troubleshooting Asynchronous Transmission Issues

When triggering multiple USB cameras, the camera driver may be unable to poll each camera fast enough to transmit triggered images. In this situation, the camera FIFO buffers overflow, and corrupted images may be transmitted. The more cameras on the bus, the less frequently each camera is polled. To troubleshoot, try the following:

    1. Reduce the frame rate.
    2. In your application, invoke the flycaptureLockNext() function, which locks the camera buffers, allowing you to process the triggered image. Note thatflycaptureUnlock() must be invoked prior to the onset of each trigger in order to discard the last locked image from the buffer. If software triggering, callingflycaptureUnlock() is straightforward. If triggering externally, you must be able to time the unlock with the onset of the trigger. For an example of a multiple camera application that uses flycaptureLockNext() andflycaptureUnlock(), see the MulipleCameraEx sample program installed with your FlyCapture2 installation. For additional information about these functions, refer to the FlyCapture SDK Help.

Providing Adequate Power

Problems can arise in your setup if the cameras are not receiving adequate power. Additional power can be provided to cameras externally through GPIO and/or using powered hubs.