Pi GPIO, extra USB and micro-controllers


#1

I was wondering if there was a specific micro-controller that any one has successfully hooked to GPIO or UART of a pi and can access the USB on the MCU or create a new MCU device input that it could relay to the GPIO.

I know directly you cannot realistically add a USB port to a Raspberry Pi GPIO, but you can add an arduino or other MCU via uart/gpio as an input.
I would like to use the MCU as an inbetween creating another device input.
this would be very helpful in alot of these retropie device hacks where we see people directly wiring to the GPIO from a raw button(s). I would much rather use a USB device to a MCU then have that translate it to be an output from the MCU to a input on the Pi GPIO.
I am assuming UART would be best but really any mode (i2c 1-wire etc…) that works I would impliment. Even as abstract or indirect as say GPIO to wifi tranciever to esp8266 to usb or esp GPIO to usb device (like usb SNES style gamepad). I don’t see why I would need such an excessive Chain of devices but hopefully you get the idea. If a uart-to-ttl device could work this way i would think I would have seen somewhere (as an USB input o GPIO).

The whole point is to add USB HID to gpio on things like the pi zero W to avoid occupying the onboard USB. It is much easier to leave the pi zero OTG port left alone, have a make footprint without a hub if a tiny MCU pcb from the GPIO could be used.

One project in mind for this is the NES controller embedded with a pi zero Retropie system. Most people scratch the PCB near the buttons and by pass the internal usb controller. I am not keen on such button population of my GPIO (or use of shift reg.)
when I could 3 or 4 wire a MCU with a usb port to gpio. This could also allow for more of the software that enables it to be on the MCU more then the pi. This makes it easier for some one gifted this to pop in a fresh retropie image and it work with little to no extra software to hardware configuration. also makes multiple builds much easier and the over all build more repair friendly.
Would love to hear some ideas.


#2

Is there any particular reason that you can’t simply use a normal USB hub on the USB data port of the Pi?
That would give you almost unlimited USB expansion potential - with full support for whatever USB device you’re plugging in AND have all the local GPIO pins to play with as well.
Or am I missing something?


#3

all I want is the original otg USB open and exposed and un populated on a hacked usb NES controller I 3d printed a bottom for that exposes the ports. I want to just run the controllers USB output directly to a MCU that is on the GPIO that can translate it.
i would use this mode in many makes because I may already be using a MCU. it frees more GPIO i can say use for blinkts on a arcade cabinet build. it also reduces expense and issues. the right hub for a pi at a low cost seems to be a gamble when purchasing. keeping a build low cost is very important because quite often I will create improved versions.
Plus a hub is quite a size increase to handheld builds.