I plugged in a molex cable the wrong way and the power supply exploded. Did it kill my hard drive?
Solution 1:
Simply plugging the cable in backwards would not cause what you observed (although it isn't exactly good for the drive).
It should be noted that hard drive circuity has safety resistors on it to protect the logic board should there be an over-volt condition on the power connector. This is standard practice on most low-voltage electronic equipment. Even though the connectors are designed to not allow a backwards connection, the circuits themselves are still designed to handle the situation if someone somehow manages to do it. This is why the ground pins are in the center -- they're still ground no matter what way the connector goes in.
The hard drive is probably OK, but of course there are no guarantees here whatsover.
Here is what likely happened:
The SATA connector was either not crimped properly to the wires, or the components in the brick itself were not soldered correctly. Either way, that's a short circuit, and it's quite possible that not even a drop of power actually made it to the hard drive.
A standard PC AMP (Molex) power connector uses 18AWG wires, which can carry up to 10A of current each. SATA power connectors use 28AWG wires, which can carry only 1.5A of current each. Because hard drives can pull up to 6A of power on the 5V rail (which exceeds the current-carrying capacity of any single 28-gauge wire), each 18 gauge wire on the Molex connector is crimped to three of the 28 gauge wires on the SATA connector so that the current load is spread out over them. In electrical work, this is known as ganging.
Here is a pin diagram of a SATA conector. Note the matching Molex wire color in the right-hand column: (Also note that Molex connectors do not provide a 3V line).
Here is a picture of an un-crimped SATA power connector:
As you can see, the 28-gauge pins are tiny, and they MUST be lined up perfectly. If you've ever crimped an RJ-45 connector to an Ethernet cable, you probably understand how easy it is to accidentally crimp two wires down to the same pin if you don't line them up properly when you push the connector on.
This isn't a big deal with Ethernet, as even with PoE, you're only talking about 500mA of power there. But with SATA, it's literally 10 times that. Accidentally crimping a hot wire to ground creates a short circuit which is a very real fire hazard at those current loads.
I drew up this ugly diagram to show what would happen if the SATA crimp were crooked by just 1 pin.
All that power flows straight back to the brick over one ground wire with no resistance. Pop, sizzle, and fry. It would take a very well-designed, high quality power brick to handle that error safely. This is why you should never trust your electronic equipment with no-name Chinese garbage power supplies. This goes for PC's, phone chargers, and the like.
An improperly designed/built power supply can ruin your electronics at best, and start a fire at worst.
Solution 2:
There's no real way to tell if the hard drive's fine but this shouldn't happen.
Molex cables are keyed - though I suppose if it was truly dodgy the end connecting to the external power supply might be odd. Even then, typically what goes into the device is 'pure' DC.
As for power supplies, you might have a fuse or a blown out component like a voltage regulator but this is before power goes into the circuit board that adjusts the voltages for the hard drive.
So, no promises. From your description, the PSU is probably toast, and hacking it open to see if its a fuse (if there's one) or another component is a diagnostic step you should try. If nothing else, its not particularly trustworthy.
As for the drive, I'd do a visual inspection, sudden death of its enclosure may cause data loss and you MIGHT have burnt something out by doing the impossible and plugging things in the wrong way. There's no way to check short of trying it in a known good enclosure or system.