# Why we keep USB out of our robot cells

TOS Robotics keeps USB out of its robot cells where it can, because a USB device can stop without a clear error and takes seconds to recover. A USB depth camera needs about 19 seconds to start, and five PC reboots did not fix a touchscreen whose fault sat in the monitor's own USB hub. The belt encoders and inspection cameras now run over Ethernet or a fieldbus, and the depth cameras that stayed on USB are hardened.

Source: https://tosrobotics.com/research/why-we-avoid-usb-in-robot-cells/
Last updated: 2026-11-15

## First setup

Each robot in our [pick and place cells](https://tosrobotics.com/products/flowpacking-cell/) has two depth cameras on USB 3, which measure the distance to each point they see. Two Arduino boards read the belt encoders, sensors that count how far a conveyor has moved, and sent plain text over USB serial. The PC stamped the time on arrival. The operator touchscreen hung on the USB hub inside its monitor.

## What went wrong

In July 2026 one depth camera lagged the other by up to 208 ms for five seconds. Images kept arriving, but our check that both cameras stay within 35 ms of each other timed out, and the software stopped the whole line on a run-critical fault. Someone had to restart it, although the cameras had recovered by themselves.

Starting a depth camera takes about 19 seconds, a hardware reset at least 3 seconds. Linux suspends idle USB devices and slows USB 3 links to save power, so we switched that off for the cameras and hubs.

In August 2026 the touchscreen stopped responding while the line kept running. Five PC reboots did not help, because the fault was in the monitor's USB hub. The power was then cut at the mains, which can damage open files, and a long power drain brought the touch back.

Once the line stopped with a message to check the cameras, but the cause was the PC's disk. It froze every process that wrote to it for about 3 seconds, the cameras included.

## What we changed

| Device | Before | Today |
|---|---|---|
| Belt encoders | Arduino boards on USB serial | Robot controller, sent over Ethernet every 4 ms with its clock in each packet |
| Teachbot joint encoders | Research arm on USB | RS-422 cables into an Ethernet server |
| Inspection and overview cameras | Not used | Network cameras |
| Belt encoder, cream dispensing test | Microcontroller over Ethernet | EtherCAT fieldbus, read 1,000 times per second |
| Pick-zone depth cameras | USB 3 | USB 3, hardened |
| Operator touchscreen | USB through the monitor's hub | USB, now watched |

The depth cameras got a 1,000 MB USB buffer. After 10 failed image grabs in a row the software resets the camera. Stopping a camera has a time limit, so a hanging camera does not hang the program. After a clean stop the cameras keep running, which skips the 19-second start. One missed frame skips one cycle with a warning, and only 10 misses in a row, about 20 seconds, stop the run.

Error messages name the cable, RJ45 for the inspection camera and USB for the depth cameras. A touchscreen watchdog writes the loss to disk at once, tries to reconnect the hub, and tells the operator to power-cycle the monitor, not the PC.

## Ethernet is not perfect either

Ethernet had faults too, but they could be measured. The robot's position stream once arrived with a median delay of 338 ms, because our reader took fewer packets per loop than the robot sent. The robot's clock in each packet made the delay visible. The [Teachbot](https://tosrobotics.com/research/why-we-built-our-own-teachbot/) encoders now reach the PC over Ethernet, with no lost frame and no encoder error in about 500,000 frames.

## Keep reading

- [Why we built our own Teachbot](https://tosrobotics.com/research/why-we-built-our-own-teachbot/): Encoders 32 times finer than the off-the-shelf arm we first taught robots with, and joints of 57 g.
- [AI robot control software that runs a robot cell](https://tosrobotics.com/products/ai-robot-control-software/): The software that runs a robot cell. Licence for robots of any brand.

## Questions and answers

### What is a fieldbus?

A network made for machines, such as EtherCAT. Each device is read on a fixed cycle, for example 1,000 times per second, so a device that misses its turn is noticed by the controller.

### What should a buyer of a robot cell ask about this?

Ask which devices hang on USB, what happens when one drops out for a second, and how long recovery takes. Also ask whether the error message names the cable to check and the box to power-cycle.
