1

I want to control lots of USB devices from a single Raspberry Pi. So far I have only tested with RPI4 and I could only connect about 5 devices concurrently. The limitation is caused first by the fact that both the USB 3.0 and 2.0 ports are controlled by the same XHCI controller, which supports fewer devices than USB 2.0 controllers, and also the fact that each device takes up more than one "endpoint", and the hubs also take up some endpoints, so the 32 theoretical devices turns into only 5 of the devices that I need to control.

I am waiting for an RPI3 which has USB 2.0 ports to see if the number of concurrent devices is higher, however I also noticed that the RPI has an I2C bus available via GPIO.

Is there some way that I can connect standard USB devices (ie. devices that are not "I2C compatible") to the I2C bus and communicate with them as if they were connected via standard USB/serial ports?

For context I currently use the "cu" command to get a terminal connection to the USB devices to send/receive strings.

If there were some way of addressing the devices over I2C instead, then I could theoretically connect many, many more devices to a single controller (the I2C spec says 1008 peripherals are supported).

12
  • Yes, there are i2c to usb adaptor, and also usb to i2c adaptor. Google is your friend.
    – tlfong01
    Feb 1, 2022 at 5:44
  • @tlfong01 From what I can see, the things that say they are USB/I2C bridges/adapters/converters seem to be focused on allowing a device with an I2C bus (such as a RPI) to connect to another machine's USB port, and communicate with that machine via I2C. I want a USB port into which I can plug a device such that the device will behave as if it is just connected to a standard USB port, then that port connects to the I2C bus and I can write code on the PI (as the controller) to communicate with each individual USB device (as a slave) Feb 1, 2022 at 6:09
  • @tlfong01 just to clarify further: what I want to do is connect USB devices that are not I2C devices, to an I2C bus on the RPI where I can control them. Something like this "serial expansion HAT" but instead of providing multiple serial ports over I2C, I want to allow multiple USB ports over I2C waveshare.com/wiki/Serial_Expansion_HAT Feb 1, 2022 at 6:34
  • 1
    @tlfong01 given the fact that there is such a thing as USB to serial converter, I suppose that would do: I could use the same design as the serial expansion HAT to create serial ports, then use a usb to serial converter so I could plug my USB devices into it. I thought there might be a way to do it that avoided using a USB to serial converter, but if not then that would also work I could just use them as serial devices, thanks Feb 1, 2022 at 22:33
  • 1
    @tlfong01 great resources thanks Feb 2, 2022 at 3:06

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.