IMG_0405

Raspberry Pi Zero – USB Hub Mod


 

The Raspberry Pi Zero was launched last week and I managed to get one early!

It’s really compact, but the adaptors and cables required to hook up USB devices or a display are a bit of a pity. To partially remedy this, and because I happened to notice one of my USB hubs (LogiLink UA0160) had the exact same form factor as the Pi Zero, I combined the two. A fun and low cost little project.

This is how I did it …

Power

First thing I did was to make the connections to power the Pi Zero from the USB hub’s power supply.

Removing the hub from its casing was a piece of cake, and it exposed the necessary points to solder to. At the bottom side of the Pi Zero, pads are available. These are ideal for making connections with other components or boards such as the hub.

The connections are:

  • Pi Zero PP1 to hub 5V (middle pin on the barrel jack connector)
  • Pi Zero PP6 to hub GND (side pins on barrel jack connector)

Using the multimeter, I checked for shorts and made sure the connections were correct:

  • the exterior of the USB connectors on Pi and hub made a connection
  • the inside pin of the barrel jack connector and the 5V GPIO pin made a connection

IMG_0388 IMG_0396

USB

The next step was to connect the USB OTG from the Pi to the USB port of the hub. Using some wire, I connected the data lines of the two boards:

  • Pi Zero PP22 to hub D+ (on the mini USB connector)
  • Pi Zero PP23 to hub D- (on the mini USB connector)

IMG_0398 IMG_0400

As you can see from the pictures, I used dabs of hot glue for strain relief on the soldered connections.

Bundle

Finally, I bundled everything together using a thin piece of foam to separate the two boards and avoid shorts, and two elastic bands to keep it together. Combined with small USB dongles, the result is still quite compact! I can now spend some time designing a case to 3D print and give the whole thing a finished look.

IMG_0399 IMG_0401

IMG_0408 IMG_0406

Let me know your thoughts in the comments!

56 thoughts on “Raspberry Pi Zero – USB Hub Mod

  1. Excellent idea.
    I was wondering about the limitations, but this mod retains the small form factor but adds the missing functionality.

    Well done
    Mark

  2. Excellent work. This will likely become the standard hacker configuration for the Zero. Expect this hub to become difficult to find!

    1. I saw someone else piggy-backing only the wifi dongle, but then you lose the possibility of connecting other USB devices such as keyboard and mouse. With a hub, that problem is solved and the entire package remains rather small too!

  3. That’s awesome that you found the USB pins broken out to pads on the back! I am thinking about designing some “backpacks” for the Zero that have spring-loaded pins inside them to access things that aren’t in the 40 pin header, and it’s good to see USB communication is possible 🙂

      1. Yes, please update if you find anything good on those pads! It’s a shame the foundation doesn’t make the detailed schematics showing the Test Points available… at least nothing that a googling can quickly find…

  4. This chip supports self powered mode, you might be able to ditch that extra power cable, if the hub doesn’t support it look at the PSELF pin docs.

  5. Brilliant idea!
    The LogiLink UA0160 is a bit dated now, and begins to get out of stock, but I’m sure that other models with the same form factor would also work and be easily found.

  6. Nice work!

    However I dislike the rubber band attaching. Would it be possible to use the distancing screws usually used with HATs to mount the USB hub panel?

    I’m not thinking about drilling mounting holes, but simply using two nuts to secure the panel between. That way it’s a bit safer, IMHO 🙂

    1. Goals is to have a proper case separating the two parts and keeping everything together in a neat little package. I’ll post an update once I have it 🙂

  7. Nice mod! Since LogiLink UA0160 is dificult to find outside of german (i’m in brazil) i’ll try to find some alternative with same form factor 🙂

  8. I’m trying to replicate this without any success. Can you think of anything I could check? The pi is powering on fine, I just can’t get any devices to connect. They all get power for an instant, then turn off.

      1. It’s some sort of belkin. I got it second hand so I’m not sure the model number. It’s a usb 2.0 hub and I did test it with my computer first and it worked fine. The power supply is 5v/2.6a. Yeah, it’s powering the Pi.

        1. So looking back it appears as though I wired up D+ and D- backwards. I flipped them but it’s still not working. Perhaps I fried the Pi’s USB port or the Hub?

          1. You could try hooking it up with a regular USB cable first and see if it still works. If it does, you at least know the hardware is still fine.

  9. Great article. Does this setup support inserting / removing usb devices from the HUB ? My PI seems to crash when removing a WIFI dongle from the HUB, and reboots when inserting a WIFI dongle. (using a cheap 10 euro usb powered hub).

    Everything seems to be working fine when booting the pi with the usb peripherals plugged in.

  10. HI! Pi noob here, I just got a pi zero and kit from adafruit and I have a raspberry pi 2, I want to make a hub to power my RPi 2 and zero in in a bramble. I was wondering if anyone had any thoughts on how to accomplish this?

  11. Hi Frederick,

    Thank you for your great post. As I really want to make this setup work for me I had a question coming up in my mind: you are powering the pi through the hub’s power input by connecting the ports. Would it be possible to plug it to the pi’s micro usb meaning you power the hub by the pi? I really want to only use micro usb cables and hubs usually don’t get powered by those.
    Would it work?

    1. Hi Andreas,

      I think that would work in my setup, as the input of the HUB is connected to the input of the Pi Zero. So powering the Pi or HUB wouldn’t matter (of course, don’t power both). Keep in mind you’ll need a beefy power supply of about 2A I believe to power Pi and HUB.

  12. So we can’t do all things we were able to do with the USB OTG ? No USB port in the hub keeps the OTG function? (become a mass storage device, or an ethernet adaptater etc…)

    1. I’m not sure how OTG works exactly, and if adding the HUB retains OTG functionality.
      I did see there are USB OTG HUBs available, with built-in ethernet port. So perhaps something like that would be more suitable for you.

      1. Ok thank you Frederick and just one more question: How can I do to connect my raspberry pi zero to my smartphone if there are no USB OTG?

Leave a Reply

Your email address will not be published. Required fields are marked *