Introduction: 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.