UART over USB for Raspberry Pi

Out of the box connecting the RVR to a Raspberry Pi requires connecting both the USB cable (for power) and the UART pins to the Pi’s GPIO for communication. Communication over USB is possible, however, since the RVR is able to communicate with Arduino Unos with just the USB cable.

What hardware would I need to power and communicate with a Raspberry Pi with just a USB cable?

AFAICT Arduino Unos use custom firmware on an ATmega8U2 for converting the usual 2 wire TXD, RXD <> USB’s D+, D- (No idea what protocol is used on the USB side. Is there some standard?). Is there a standalone board that provides this functionality? Or will any FTDI/CP210x/PL2303 board work? Maybe Adafruit’s PiUART https://www.adafruit.com/product/3589 ?

For context, I have a Picon Zero “HAT” (https://4tronix.co.uk/blog/?p=1224) that doesn’t expose the Pi’s UART pins so I’m looking for alternatives. Currently I’m stacking it on top of a Perma-proto HAT to get access to those pins, but it would be nice not to have to plug in two cables at all.

Super-long term it would be neat to create my own PCB based on the Picon Zero (without the motor driver stuff) that includes this ability (single USB for power & UART).

2 Likes

Hello @c13,

As far as I understand, it is not possible for any device to communicate with the Rapsberry Pi through the USB power port. The data pins on that port are disconnected.

RVR is capable of communicating with Arduino through the USB, but we have not tried it with the Raspberry Pi. There might be a way to design a cable that splits the USB pins to 2 USB ports, but we cannot recommend you do that as you risk damaging both the RVR and the Raspberry Pi.

I hope this helps,

Quentin

1 Like

Correct, any solution would not be able to use the USB port on the Pi itself. My request was for recommendations for additional hardware (a HAT or something) with its own USB port that would provide power to the Pi via the 5v GPIO pins as well as provide UART to pins 14 and 15. I’ll probably give the mentioned Adafruit PiUART a try, especially since it’s open source and so could be integrated into a custom PCB.

1 Like

@c13 It looks like the PiUART uses a CP2104 for the USB interface. That is not tested with RVR, but may work if our USB stack happens to already support it. I’ve actually got a CP2102* breakout on order for internal testing, but if you beat me to it, please let us know your findings. Currently, we have only verified Arduino Uno and Micro:bit for USB to serial functionality.

Jim

*Edit: I originally stated I’ll be testing CP2104, it’s actually a CP2102, which is at least similar.

1 Like