Step 1: Parts
The parts you need:
– 3.5″ SATA harddrive enclosure
– 2.5″ SATA harddrive
NOTE: This will not work with a 3.5″ IDE enclosure and a 2.5″ IDE drive without a special adapter, they have different connectors.
– LED with resistor to power it from 5 Volts
– 3×4 Matrix keypad
– 470 Ohm resistors (4x)
– PIC 16F628A microcontroller
– 5 or 6 Volt relay, 1 Amp should be enough
– 1N4148 diode (Without this you will fry your USB port)
– BC337 transistor (or similar)
– 2K2 resistor
– Some prototyping board
Step 2: Preparing the USB board.
First you need to disassemble the hard drive enclosure and take out the board.
Then you have to desolder the power connector and solder wires where the connector was.
After you have done that, solder the pin on the back of the power connector to the corresponding wire.
(The one that is now where the pin on the back of the connector used to be)
Last, solder wires to the other two pins of the power connector.
Step 3: Finding a power source for the PIC
Now you need to find a way to power the PIC.
I think the easiest way is to solder wires to the usb connector. If the connector on your board is a SMD type and/or the pins are hard to reach, find a solder connection that is connected to the correct pin of the USB connector.
I chose to solder a wire to a via (a little hole in the board that carries a trace from one side to the other) for the positive connection and another one to the metal shielding of the USB connector for the negative connection.
The second picture shows the connections on the different types of USB connectors.
2: Data –
3: Data +
4: Ground (negative)
Step 4: Build the circuit
Build the circuit that will be controlling the drive according to the schematic.
The design, as well as the code for the PIC are based on this
The circuit is built around the PIC 16F628A microcontroller, which needs to be programmed with the attached HEX file.
Step 5: Cutting the circuit board to the right size
Before we connect all the wires, we need to cut the circuit board to size, it would be difficult do do this afterwards.
Start by planning where you are going to connect all the wires, mark where you are going to cut the circuit board and then cut it.
For more detail: DIY Datalocker
From Schematic to PCB Production, Just Need One Tool
Free Circuit Design Software: learn to use Editor quickly and easily
Cheapest PCB: 10pcs 2-layers 10cm×10cm only $8.21, 3-day build time, 100% E-test
Current Project / Post can also be found using:
- sd card interfacing with pic microcontroller using hitech ckmpiler and Proteus simulation download