Designing FireWire applications

FireWire interfaces and connectors offer a flexible, high-bandwidth connection technology that is a good fit for many vision/imaging applications.

Th 118855

By Jerry Fife

In traditional machine-vision and image-processing applications, industrial analog and digital cameras are connected to frame-grabber add-in boards installed in the host computer using a dedicated cable for each camera. As a result, typical industrial inspection systems involve multiple cameras, sensors, actuators, and boards all connected with different types of cables.

To solve this multiple-cable problem, FireWire (IEEE 1394) camera interfaces and connectors enable a flexible networking bus environment that can support different types of peripheral devices, substantially decrease and simplify the cabling, and reduce system cost. FireWire-compatible products, such as cameras, add-in boards, computers with an embedded FireWire interface, hubs, and software- development tools, are now available in quantities to meet a range of system requirements.

The key advantages of FireWire interfaces and connectors for industrial vision and imaging systems are

  • Standard high-speed network that connects multiple compatible devices
  • Lower-cost cabling and computer interfaces
  • Simplified cabling with power, control, and image data on a single cable
  • Deterministic performance
  • Operation with compatible slotless or notebook computers
  • Connection distances ranging up to 72 meters, with shielded twisted-pair cables; up to 200 meters with optical repeaters.

Design considerations

Despite the advantages of FireWire, systems integrators and developers must still carefully analyze their image-processing system requirements. Because FireWire interfaces and connectors support network connectivity, special design considerations need to be given to the allocation of the shared bandwidth, type of FireWire-compatible cameras used, synchronization of multiple components, and network configuration. Bandwidth planning and management are critical parameters for a successful image-processing system.

Initially, the available bandwidth for a FireWire-based application must be properly allocated. FireWire uses asynchronous transfers to deliver content and critical information (control, status, and file transfers) and isochronous transfers to provide bandwidth for time-critical information (image transfers with deterministic performance).

Asynchronous transfers are typically one-to-one with an acknowledgement from the receiver to confirm correct delivery. Isochronous transfers are broadcast on an assigned channel, and any device connected on the FireWire bus can capture and use the image data. This, of course, is the way traditional video cameras work; image data are transmitted and any device connected on the video cable can use it. Also, multiple isochronous channels can be opened simultaneously so that multiple independent image streams can occur on the FireWire-enabled network simultaneously. Isochronous transfers get first priority on the use of the FireWire bus but are limited to 80% of the total bandwidth so that asynchronous transfers can get through as well. Fair-play rules within FireWire ensure that each asynchronous transfer device gets an equal opportunity to use the bus.

Currently, two types of FireWire-compatible cameras are available. One is the IIDC/DCAM-protocol camera, which is the most commonly used camera for industrial and imaging-processing systems. It offers more control of the camera parameters, higher resolution and frame-rate options, triggering, and uncompressed images.

Uncompressed images, however, consume bandwidth. The bandwidth required for a camera is the selected resolution times the selected frame rate times the bytes/pixel. A digital camera (DCAM) operating continuously at 640 × 480 pixels and 30 frames/s with monochrome-8 (8 bits per pixel) needs 9.2 Mbytes/s of bandwidth. Moreover, a camera operating at 1280 × 960 pixels and 7.5 frames/s also needs 9.2 Mbytes/s of bandwidth. Color cameras typically output in a YUV-422 format that effectively takes 16-bits/pixel and, therefore, need twice as much bandwidth.

The other type, AV/C protocol cameras, are consumer video camcorders and cameras with DV (digital video) output. DV types offer limited format options (NTSC, PAL), and have the output that is compressed 5:1. Most camcorders connect to the host computer as digital VCRs (not live cameras) because they support only the AV/C-VCR protocol. Few cameras support the AV/C-Camera protocol, but they offer camera parameter controls and live image outputs in compressed DV format.

The wide popularity and high unit volume of DV camcorders and video editing tools have dramatically driven down the cost of FireWire interfaces. This is why many FireWire ports are embedded on high-end PCs and notebook computers.

Transfer rates

Most FireWire networks today operate at 400 Mbits/s. However, only about 32 Mbytes/s of bandwidth are available for sustained image transfers because a maximum of 80% of the total bandwidth is allocated for isochronous transfers. This allocation means that two or three monochrome DCAM cameras running at 640 × 480-pixel resolution at 30 frames/s with monochrome 8-bit output can be connected to the FireWire bus and transmit simultaneously at 3 × 9.2 Mbytes/s or 27.6 Mbytes/s. Similarly, a color camera running at 1280 × 960-pixel resolution with YUV-422 output running at

3.75 frames/s and two 640 × 480-pixel monochrome 8-bit cameras running at 15 frames/s all operating simultaneously need a bandwidth of 1 × 9.2 Mbytes/s plus 2 × 4.6 Mbytes/s or 18.4 Mbytes/s.

In another application, four triggered 1280 × 960-pixel monochrome 8-bit cameras operating at 3.75 frames/s continuously need 4 × 4.6 Mbytes/s or 18.4 Mbytes/s. The key parameter is open and transmitting simultaneously. As many as 63 cameras can be connected to a single FireWire bus, and the imaging control software will be able to open, run, and close the cameras as needed.

Imaging-system designers must evaluate the image resolution and type, such as monochrome, color, and bit depth; the time to acquire and process the images; and the number of images that need to be acquired simultaneously. They need to examine how and when the images are acquired and processed by the system. In traditional frame-grabber-based imaging systems, the cameras are transmitting continuously to the frame grabber. However, most of the images are discarded (overwritten) in the frame grabber, and few images make it to the application.

Applications

To illustrate some important FireWire design parameters, consider the following. An inspection system uses a camera on a moving gantry (see Fig. 1). The system must inspect several small areas of a large printed-circuit board (PCB) using a high-resolution color camera. The gantry positions the camera above a portion of the PCB, triggers the camera to collect the image, and then moves to the next position while the acquired image is processed. The time to move and settle the gantry is typically 200 ms. This imaging system uses a Sony Electronics (Park Ridge, NJ) DFW-SX900 1280 × 960-pixel progressive-scan color camera running at 7.5 frames/s. This FireWire-compatible camera is cable-connected to a single FireWire interface board in the host computer. When the camera is in position, the software triggers the camera to start a short exposure. After the exposure is completed, the image is transmitted to the computer and processed within the 200-ms gantry move time.

Th 118855
FIGURE 1. Using a FireWire-compatible camera mounted on a moving gantry, a vision-inspection system checks several small areas on a large printed-circuit board (PCB). The gantry's CPU and motion controllers position the 1280 × 960-pixel, progressive-scan, color camera running at 7.5 frames/s above a particular PCB area, trigger the camera to collect the image, and then move the camera to the next position while the acquired image is processed within the 200-ms gantry move time.
Click here to enlarge image

null

For this system application, the high-resolution progressive-scan capture and image-acquisition cycle time must be carefully designed. In this regard, the FireWire interface can easily handle the 18.4-Mbytes/s of bandwidth needed by the camera. The image is transmitted to the computer in 133 ms immediately after the end of the exposure. The gantry move can be overlapped with the image transfer since the progressive-scan camera captures the full image at one time and transfers it from storage area in the camera.

Th 118857
Click here to enlarge image

FIGURE 2. An inspection system uses four FireWire-compatible monochrome cameras and strobe lights to image a large printed-circuit board (PCB) at a high resolution (one camera per quadrant) with a minimum time between image captures of 300 ms. A sensor detects when the PCB to be inspected is in position and outputs a trigger to activate the strobe lights and to start the cameras exposing at the same time. The four 1280 × 960-pixel progressive-scan cameras run at 3.75 frames/s with a bandwidth of 4.6 Mbytes/s for each camera. The four acquired images are transmitted simultaneously to the computer in 266 ms via a FireWire hub, a single FireWire cable, and a built-in FireWire interface board in the laptop computer.

In another example, an inspection system uses four monochrome high-resolution triggered cameras (see Fig. 2). Because this system needs to image a large device at a high resolution, it incorporates strobe lights and four cameras to image the full device (one camera per quadrant) with a minimum time between image captures of 300 ms. To meet these requirements, four Sony XCD-SX900 1280 × 960-pixel progressive-scan monochrome cameras are run at 3.75 frames/s. These FireWire-compatible cameras are connected to a FireWire hub in the system enclosure, and a single FireWire cable is connected between the hub and a laptop computer with a built-in FireWire interface board.

During operation, the computer sets the cameras to the 1280 × 960-pixel resolution at 3.75 frames/s and waits for a trigger signal; the bandwidth is 4.6 Mbytes/s for each camera. A sensor detects when the device to be inspected is in position and outputs a trigger to activate the strobe lights and to start the cameras exposing at the same time. The four acquired images are transmitted simultaneously to the computer in 266 ms. The cycle time can be reduced to 150 ms by using a second FireWire interface board. Each independent FireWire bus connects to two cameras that are set for 7.5 frames/s. This configuration shows how the bandwidth of multiple devices can be reduced so that all cameras transmit simultaneously on a single FireWire bus.

Th 118858
Click here to enlarge image

FIGURE 3. Vision-inspection system uses ten or more monochrome and color cameras to check out a large part from several different angles. The analog-camera-based system implements a frame grabber, a digitizer, and a computer-controlled video switcher to route the video from the selected camera to the frame-grabber board. The cycle time for the complete inspection is 10 to 15 s. The system intermixes 640 × 480-pixel, progressive-scan, FireWire-compatible, color cameras running at 30 frames/s and 1024 × 768-pixel progressive-scan, FireWire-compatible, monochrome cameras running at 15 frames/s. All the cameras are connected to a single FireWire bus using multiple FireWire hubs and then to a single FireWire port on the computer. The software cycles through the cameras one at a time to initiate image capture from each camera as needed.

In yet another example, an inspection system uses 10 or more monochrome and color cameras to check out a large device from several different angles (see Fig. 3). The analog-camera-based system implements a frame grabber, a digitizer, and a computer-controlled video switcher to route the video from the selected camera to the frame-grabber board. The cycle time for the complete inspection is 10 to 15 s. The system intermixes Sony DFW-V500 640 × 480-pixel progressive-scan color FireWire-compatible cameras running at 30 frames/s and Sony XCD-X700 1024 × 768-pixel progressive-scan monochrome FireWire cameras running at 15 frames/s. All the cameras are connected to a single FireWire bus using multiple FireWire hubs and then to a single FireWire port on the computer. The software cycles through the cameras one at a time to initiate image capture from each camera as needed.

FireWire-based camera systems substantially lower the number of cables needed to interconnect power, control, and image signals from several cameras. No single FireWire cable is longer than 4.5 meters, but the distance from the farthest camera to the computer can be greater than 30 meters. The distance between any two cameras cannot exceed 72 meters using standard shield twisted-pair cables. For longer distances, fiberoptic FireWire repeaters can connect devices up to 200 meters away.

JERRY FIFE is senior product manager of Sony Electronics Inc. (Park Ridge, NJ; www.sony.com/videocameras).

More in Manufacturing