How to run a hard drive from a battery

From time to time I find myself in situations where I think something can’t be done because it just isn’t done, only to find out or figure out that actually it can be done very simply and the only reason it isn’t is probably due to the fact that these situations are rare. One such situation is when I wanted to figure out if I could run a hard drive from a battery.

You should not try to power a hard drive from a battery although technically a hard drive can be powered from a battery however this is only a suitable solution for read-only situations, as battery voltage drops with over time, the risk of the hard drive losing power is significant and data corruption can occur.  

That sounds simple enough and it might be a viable solution in certain situations, before you try it though there are a few things to consider.

Contents

Why would I need to connect a hard drive to a battery?

It’s hard to imagine lots of scenarios where this might be useful. The main one I can think of is to retrieve data from a hard drive that requires a power supply when you don’t have a mains supply available to you. Most 2.5″ drives are either powered by the PSU (Power supply unit) inside the computer or are powered by the connection cable itself via USB or whatever interface you’re using. This is possible because they require a 5v supply that is available via USB. 3.5″ drives typically use 12v power supplies to power the motors inside, this is because they are typically used in desktops or servers where they have a mains power connection.

You will often find that if you buy a large 3.5″ external drive it comes with a chunky looking plug for the wall. This plug is actually a transformer that reduces the wall voltage down to 12v. It can be a real nuisance to need to access data on one of these drives when you are not near a mains voltage power supply.

In fact, this is exactly what happened to me while I was travelling through California in an RV. I was in Joshua Tree national park and was keen to show some local climbers some work I had done on a climbing film. However, the inverted power supply wouldn’t work. Refusing to be beaten I cobbled together a way to power the hard drive so I could access the files. I didn’t actually use it though as just before I tried, someone noticed that the inverter was switched off.

Why you probably shouldn’t connect a battery to a hard drive. 

I hate to say it but if you find yourself in this situation you should have been more prepared. It is far from ideal and will only give you a limited amount of time to access the drive which could prove catastrophic for data transfers. Not only that but any fault in the wiring connection could result in a completely fried hard drive.

  1. Irregular voltage. The voltage will not be regular and as the battery depletes the voltage will get lower causing it to cut out which could easily corrupt the disk and files stored there. 
  2. Alternative options. If you are doing a self-build project and this has become a requirement then you should probably look for an alternative data storage solution. There are plenty of 5V drives out there that can be powered by small boards without the need for additional power. 
  3. Miscalculated voltage. If you have miscalculated the input voltage then you could easily fry the hard drive making it unusable and losing the data stored on it. 
  4. Reverse polarity. Although most consumer electronics are fitted with a full bridge rectifier to mitigate the problems with this, not all of them are and reversed polarity can fry the boards in an instant and even spin up the disk in reverse. This is particularly common when using products from the EU in the USA and vice versa as the schematic standard of numbering the negative terminal is the opposite and not always adhered to.
  5. Irreversable alterations. So you wire it up correctly and it works, you may find that it is now unusable in any other configurations. If you alter the casing of an external drive you should NEVER plug it back into a mains socket.
  6. Safety. Any electornic tinkering should be carried out by a qualified or competent person, even low voltage batteries can give serious electric shocks.
  7. Risk factor. You have to ask yourself is this really worth the risk to your data?

How do you connect a hard drive to a battery?

Ok, so you have looked at the reasons why you shouldn’t do this and you still want to? here goes then…

When it comes to batteries and hard drives, fortunately, we are talking about DC current. DC is typically used at much lower voltage and uses much smaller currents, which is why so many electronics have those chunky transformer plugs, most circuitry doesn’t need nearly as much power as is offered by a plug socket.

This simplifies things a little and we are left with a positive and negative connection that we need to complete correctly to create a circuit. Even though a hard drive has a whole bunch of connections on it, we only need two and we need to match them up to the ones on the battery. Not only that but they have to be an exact match as if they are back to front we can end up with reverse polarity which can destroy the hard drive. So remember, positive to positive and negative to negative.

Step 1 – Determining the input voltage.

Different hard drives use different voltages and you can find out more about this here. What voltage do hard drives use? Essentially we are talking about internal hard drives to be used outside of a computer or external hard drives that use a power supply. These will be invariably 12V. But you need to check this, especially with external housings as they may need different voltages to power different functions like wireless connections.

Internal or external 2.5″ drives can typically be powered by USB using the 5v supply from the port and will be powered by the device itself so there is no need for a battery. This is also true for SSDs and Flash drives. 

Step 2 – Choosing the correct battery.

Finding the right battery is easier than you might think and probably a lot less convenient than you might think. Almost all cars use 12v batteries and in RVs, boats, and solar setups, they use 12V leisure batteries. Apart from that 12V batteries are hard to come by. Most off-the-shelf batteries are 1.5V to 9V maximum and most power banks are usually 5V. 

Batteries run in series multiply their voltage, so 8 x 1.5v batteries could be configured to give a 12v supply. They might not last very long though unless you have lots of them and then you could create let’s say 3 lots of the 12v pack (8 x 1.5v series packs) in parallel and this would give you a 12v supply that would last three times as long.

Here is an example, as you can see the parallel configuration on the left offers 1500mAh (milliAmp hours – How long it will last) for 1.5v, and on the right, the serial configuration offers 500mAh for 4.5v.

img src – http://www.farsens.com/en/2013/11/22/series-introduction-batteries-wireless-sensor-networks/

IMPORTANT – if you intend to use leisure batteries or car batteries, ensure you are using just one! or if there is more than one then ensure that they are run in parallel and not series otherwise the voltage will be way too high and will destroy your hard drive!

Step 3 – Connecting the battery to the drive.

Now you have to figure out how you are going to get the battery, that perfectly matches your hard drive voltage, connected to the hard drive. There are so many variables here that it is very hard to be specific. You need to determine the positive and negative terminals of the battery and the positive and negative terminals of the drive. 

For the best results you will want direct access to the battery itself, this way positive and negative will be identified with a + and – symbol. If you don’t have access to the battery directly then you will need to determine which is which. This might be identified it might not, you can figure it out with a multimeter by seeing which variation of connecting to the terminals give you a positive flow and which gives a negative flow. It will be one of two. Whichever gives you a positive current from touching the positive cable in the positive connector to the multimeter tells you that it is the positive terminal.

NOTE – if you have a cigarette socket in your car you can use that but note that it will need to be tested and don’t use a cigarette socket to USB adapter as that will step the voltage down to 5v.

Once you have established positive and negative from the battery you need to do the same for the hard drive. If this is for a technical application then you will want to know which pin is which on the connector. Luckily for you, this is standardised and is the same for standard SATA connections. See the image below.

img src – https://pinoutguide.com/Power/sata-power_pinout.shtml

If however, you are trying to power an external drive you need to make a choice, open the case… or cut the power cord and connect straight to the cables. At this point, it is impossible to be more specific as every country has their own standards for this. In Europe electronics have to have protection from reverse polarity but the same isn’t true in the US. So, you have to find a way to establish which wire is which.

If you can access the circuit board there is often a symbol denoting which is which but you will have to trace them back to the plug. If the symbols are numbers then it depends on what country you are in again. In some places, 0 is always negative, and in others the highest number is.

Once you can establish which is which then it is a case of making the connection. Whatever your most secure connection is, connect that one last so you don’t run the risk of getting it wrong, slipping or doing it more than once.

I can’t help but imagine the scene from Breaking Bad where their battery dies in the RV while in the desert.

Imagine, a car battery, some cables, and the plug for your hard drive. Provided the plug says 12v output and that you know which is positive and negative you could wire the two together. This is obviously risky and it’s a stretch to imagine a scenario where retrieving data is this important. So unless you are Walter White I’d avoid this.

Conclusion.

There are various ways to power a drive from a battery and various reasons you might need to but there are no doubt more reasons you shouldn’t.

The key steps are as follows…

  1. Determine the input voltage of the drive
  2. Find a suitable battery tht matches the voltage
  3. Determine the required connections 
  4. Source the correct connectors
  5. Check for polarity
  6. Power up. 

There is one thing to always bear in mind when trying anything unusual with a hard drive and that is to ensure that it has been backed up! Do not attempt this on a hard drive that is valuable or has important information on it. you could lose it all!