Improving USB reliability

Open Hardware – Programmable USB Hub

© Lead Image © lightwise,

© Lead Image © lightwise,

Article from Issue 226/2019

The Programmable USB Hub promises to resolve common issues with USB reliability in the short term, making way for future open hardware testing and debugging.

Capable Robot Components (CRC) [1] is a company that is only 18 months old. According to founder Chris Osterwood (Figure 1), the goal of the company is "enabling robotic systems to get to market faster by allowing engineers to focus more on application-specific development, instead of building underlying infrastructure. On sites like and Adafruit Industries, CRC has already gained attention with SenseTemp [2], an open hardware precision temperature sensor. More recently, it has been fundraising for the Programmable USB Hub [3], a multipurpose device designed specifically for improving the reliability of embedded devices, but it also includes a variety of other functions.

Figure 1: Chris Osterwood, CRC founder and CEO.

Osterwood has a decade of experience in robotics companies. "I've designed everything from five-degree of freedom robot manipulators and 3D vision systems to autonomous sewer inspection robots to monocular cameras and autonomous industrial floor scrubbers. I've loved the breadth of electrical and software experience I've had." Much of his experience has involved bug fixing, code contributions, and testing in such projects as CircuitPython, CadQuery, cqparts, and Field Programmable Gate Array (FPGA) development frameworks such as Migen and LiteX. "I've benefited from open source software throughout my professional career," Osterwood says, "and I'm thrilled to be contributing back to the community here at Capable Robot Components."

The idea for the Programmable USB Hub came from Osterwood's own experience with USB in mobile robotic systems, as well as from conversations with roboticists developing warehouse and autonomous picking robots. Osterwood explains that "USB is used in many robotic systems due to the high-bandwidth and the ubiquity of USB on embedded computers and sensors. It's generally faster to initially integrate a USB sensor into a system than an Ethernet-based one, and USB sensors are generally lower cost because they have a lower implementation cost. But USB has poor reliability in industrial and commercial environments, especially over long-term operation. It's relatively common for USB devices to disappear from the bus from time to time, and sometimes they don't come back. I've also seen instances where a USB device fails in a way that prevents other devices on the same USB bus from performing normally – as all bus bandwidth is shared."

A Multipurpose Tool

Primarily, the Programmable USB Hub (Figure 2) is designed to resolve such common issues. Via the hub, unreliable devices can be reset by disconnecting and reconnecting power and/or data flow. A failed device can be removed by disconnecting the data lines. "All this can be done with software controls," Osterwood emphasizes. "No access to the USB ports is needed."

Figure 2: The Programmable USB Hub is already becoming known as a time-saving testing tool.

LEDs are mounted on the front of the case to show the state of each of the Hub's four ports. White, green, and blue LEDs tell whether the connected device is operating at high, full, or low speed respectively, while an orange LED means that the power and data lines are disabled for a port, and a red one means that a port has been intentionally turned off. However, these LEDs are simply indicators (Figure 3).

Figure 3: LEDs indicate the status of each connected device.

Rather, control of the Hub is through a connected computer. In keeping with its modular design philosophy, the computer's connection to the Hub is a CircuitPython circuit board. Such boards are popular, easy to use, and widely available on sites like Adafruit for under $25, depending on the model. In addition, the use of a CircuitPython board means that the Hub can serve as a development board that can be easily connected to a variety of devices. To aid in this connectivity, the Hub supports both 12V and 24V nominal power input, voltages that are common in embedded devices, as well as rubber bumpers and mounting flanges to aid in customizing different physical hardware configurations.

No matter how the connected hardware is arranged, the board's USB microcontroller (MCU) gives access to the internal Serial Peripheral Interface (SPI) flash memory. The SPI flash contains the operating files that are run on the microcontroller. Because these files are written in Python – and therefore compiled each time they run – they can be edited in any file editor. From a connected computer, devices attached to the Hub can be monitored and controlled individually, with both power and data lines disconnected and reconnected as needed. When the modified files are saved, the microcontroller automatically reboots and starts to use the modified code. "No special flashing software is needed, no special editor, nor special hardware," Osterwood emphasizes. "The zero friction of changing MCU code is one of my favorite features of CircuitPython." Should connected devices include open source Python drivers, which is increasingly common these days in embedded devices, the opportunities for further control become even greater.

As Osterwood notes, the ability to program the Hub "allows for some interesting use cases." For example, enumeration can be delayed so that devices do not immediately come online. Similarly, it allows switching between several identical USB devices. Power and data can also be disconnected automatically if a connected device stops communicating or an error occurs, which helps to ensure that other devices are not affected.

However, these are only the Hub's main features. Among the Hub's other features is the ability to serve as a USB to TTL serial adapter and as a power supply that provides 5V/6A and 13mA resolution monitoring to connected devices. Yet another feature is the power to switch USB data pairs individually, which can be used to emulate the removal and addition of devices entirely through software.

In fact, the Hub's features are so numerous that Osterwood says that "the biggest challenge with [developing the Hub] was integrating all of this functional flexibility into a small device. The numerous high-speed differential pairs must be kept away from noise sources, and that's difficult to do given the amount of power being regulated and distributed in the Hub. Even seemingly easy things like putting connectors and 10 RGB status LEDs on the front and rear panels become an integration challenge when there are so many, especially when trying to minimize trace length and signal coupling."

Osterwood continues, "additionally, there are a few exclusive signal options that I wanted to present to the end user in a clear way. For example, the UART RX/TX pins and the SPI chip select pin on the internal mikroBUS header can be jumpered to either the USB Hub chip or the internal microcontroller – there are valid reasons for both configurations." Similarly, resetting power quickly was a function that was at odds with the Hub's communication with SPI devices and had to be disabled as soon as possible.

But this is only a high-level overview of the Programmable USB Hub. A more technical description of the Hub's engineering is available in a series of Jupyter Notebooks on GitHub [4].

Advance Interest

As I write, the Programmable USB Hub is a few days into its crowdfunding campaign on Crowd Supply. It is already at 70 percent of its modest goal of $10,000, so the campaign seems certain to succeed. At Crowd Supply's Teardown conference in late June 2019, Osterwood found that what excited most attendees about the Hub was the idea of using the Hub to develop and test embedded electronic devices. As Osterwood notes, "flashing, testing, and debugging microcontrollers and embedded processors generally requires a number of different hardware devices to be connected or disconnected at different times. The power and data disconnection of the Hub allow you to automate those changes – instead of physically plugging and unplugging cables."

Another popular use case according to Osterwood is the continuous integration testing of embedded electronics. "The Hub allows power and data to the device under test and device stimulus hardware to be controlled and sequenced as you need. This makes it easy to flash software, power cycle, test, and repeat with different software builds in a completely automated way."

The Programmable USB Hub is unlikely to find its way on to the average user's desktop. However, due to its potential to aid other open hardware development, it seems certain to ensure that a number of other open hardware devices will.

The Author

Bruce Byfield is a computer journalist and a freelance writer and editor specializing in free and open source software. In addition to his writing projects, he also teaches live and e-learning courses. In his spare time, Bruce writes about Northwest coast art ( He is also co-founder of Prentice Pieces, a blog about writing and fantasy at

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • New products and updates

    Professional users are always searching for an edge. Whether you work with Linux as a webmaster, programmer, system administrator, or security consultant, you know the best solution depends on finding the right tool for the job. We thought you might be interested in the following new products and updates.

  • Free Software Projects

    Building robots is an expensive hobby but too interesting to leave to a small group of elite researchers. Peekabot saves you the investment in hardware and simulates a brave new robot world. Also, we’ll look at Gbrainy, a program to train your gray matter.

  • Free Software Projects

    Free/​Open Source isn’t just about software, it’s also about hardware. Open hardware projects are proliferating, and just like open source software, you can get started inexpensively. Here are three projects that are fun, useful, and suitable for beginners to embedded programming, robotics, and building electronic devices.

  • Tasmota

    Flashing IoT devices with new firmware lets you wield control and keep them out of the cloud.

  • Web Serial API

    Upgrade your computer with LEDs, buttons, or sensors to control a microcontroller board over USB from your web browser.

comments powered by Disqus