Usby. Hdd Connector for Raspberry Pi

16K8317

Intro: Usby. Hdd Connector for Raspberry Pi

Since a few years we have used a Raspberry Pi B with an external Hard Disk Drive as backup/torrent/intranet server for the things we develop at Hormiga Azul but in recent times it became evident that we needed to upgrade the storage for something bigger. The original HDD was a 180 GB laptop drive we had lying around and we put inside a case to turn it into an external drive. Those cases usually have a cable with 2 USB plugs and that was excellent. We connected one to the RPi and the other one to a USB power supply and it worked smoothly.
The new HDD is a USB 3.0, 1TB external drive we bought specifically for this task and as all external drives, has a USB cable with only one plug. The spec sheet says it runs on 5V, 2A which is by far bigger than the 500 mA that the RPi can provide.

So we had 2 options, getting a powered USB hub or building something to inject the power to the disk that would let us to continue using our power supply. As makers, we didn't had to think it at all.

STEP 1: Required Materials

  • 1 x USB type A female connector
  • 2 x USB type B female connector
  • 12 mm MDF
  • 6 mm MDF
  • 2 x 1/8" x 1/2" screw (optional)
  • 2 x 1/8" nuts (optional)

STEP 2: PCB Design

We designed this really simple PCB on KiCad. Basically all you have to do is connect the power and data lines of the 3 USB ports. Although the original design uses a 2 layer PCB design, a single layer PCB is enough to have a working device.

STEP 3: Case Cutting and Engraving


For the case, we used a CNC to hollow a 12 mm MDF block with the contour of the PCB hollowing also the space for the USB connectors. To optimize the job, the hollowing is done considering the circuit is inserted upside down in the case. This reduces the cutting time and also holds the circuit in place. Because this was still a prototype, the case also has holes for screws in case we need to open it to make adjustments. This holes are not necessary as the case can be glued.

For the lid we used a piece of 6 mm MDF and the same basic layout.

The two OpenSCAD files show how the case and lid look. We used a tool called openscad2cnc to produce the gcode from the OpenSCAD files. You can download the tool here: https://bitbucket.org/kosme/openscad2cnc

Once it was cut, we used a laser cutter to engrave the case with our logo and figures showing where each thing should be connected. (Raspberry Pi, power supply, hard disk drive)

STEP 4: Evolution

Here the different iterations of the project are shown. Left to right it is a merely functional device, a version with text labels for the connections (power and Raspberry Pi are exchanged), and the current version with icons instead of text labels.

STEP 5: Aftermath

We could have done some things differently. We could have used a barrel connector instead of a USB connector for powering the HDD but we wanted to only use one power supply for both HDD and Raspberry Pi. Our current power supply can do that but required the USB connector. Besides, we already had the USB connectors laying around. Also, we discovered that having the data lines perpendicular to each other between the layers of the PCB renders the device useless so we only left the wire bridge that connects the Vcc pins. Also, doing it like that gives more sense to the drawings engraved on the case.

17 Comments

While its nice to make stuff, I thought I might point out that Western Digital actually make a cable to do this. It allows the hard drive to connect to the PI USB and so you can power both the Pi and Drive from one USB power supply. its called a PiDrive, they do a whole kit with a Hard drive too.

I think a useful addition to this might be a different sort of power in connector so you could add a universal type power supply. I have a server with an Rpi at home that runs on 12v for the hard drive, but I have 2 little buck converters that provide 12v for the HD and 5v for the Pi, but you can plug in any power supply thats 2a+ 12V+. At the moment I use a 16v laptop adaptor, I think this approach might work well on your little device :)

We were unaware of the existence of the cable, we only knew of the 314GB kit which is quite difficult to get here in Mexico. We appreciate the info.

Indeed it would be a nice addition. We mention at the last step that we could have used a different power connector but we already had the power brick which required USB ports.

Yeah I only found out about the cable and the 1tb hard drives kits when I was half way through building something myself, what was annoying is that WD had a sale making it about 30% cheaper and their website wouldnt let you buy it, by the time the problem was fixed suddenly back to full price!
nice build!
may I ask why the thing didn't work with the perpendicular traces?
also, if I understand correctly, you just etched/carved the bottom layer and used the top layer as placeholder for the wire bridges?

Exactly, also known as the poor man's way of prototyping 2 layer PCB's.

As of the perpendicular traces, we are not quite sure why they didn't work but our guess is that we were getting too much cross-talk because they were perpendicular. Or maybe our power brick is sinking the data lines to ground.

We think that particular option would be riskier as there are now two different power supplies involved, the one feeding the Raspberry Pi and the one feeding the HDD. Or they share the same power supply and you are feeding the Raspberry Pi through the USB port, bypassing the fuse which is not such a good idea.

The way we propose, the brick is powering both the Hdd and the Raspberry and the fuse is not bypassed.

Oh, I got your usage now, with only one brick, it is fine then!

To make it safer though, you could disconnect data1 and data2 from the brick port.. :D

As you may know, USB has 4 connections, 5V and Ground for Power and D+ and D- for data.

Connecting the Ground of both inputs is fine, it is the 0V reference anyway. Connecting the 5V might cause issues as each input may actually vary between 4.4V and 5.25V according to the USB specification. If the difference is larger than a few mV the current will flow INTO one output, possibly even damaging both.

The data lines may only connect two devices at any time. Connecting two hosts will result in a conflict, as their send data will "overlap".

as an electronic engineer, this was clear to me. :)
but I see what I misunderstood: I thought, you plug in both USB cords into the same machine with 2 limited ports to get enough power for the HDD. like: 2 powerlimited USB = 1 powerful USB.
but it seems you use an own, external power brick to power the thing.
yesv in this vase you only need to connect the reference aka 0V aka GND from both USBs.
5V from power brick, D+ and D- from USB.

It is interesting that you mention that we should not plug both USB cords into the same machine to get enough power. The cable from our previous external HDD was exactly like that and we never had any kind of issues with it.

If you use the same machine all outputs are often powered by the same regulator, so voltage differences won't be an issue. The "Y-cable" is only used to pput the PPTC fuse of each output in parallel to allow for twice the current :)

you may get away with a low power HD like the blue series without any power adapter. the green series of WD should take even less...
http://www.tomshardware.co.uk/forum/252217-32-lowest-power-consumption-hard-drive

Yes, we probably should have made a little bit of research before getting the drive, but since it was a gift we couldn't really complain.

jepp. 1.7w average for read/write. add a big cap as peak-puffer and you should be golden :)

Very nice! I like the simplicity of it!