0

Background
I do not own a Raspberry Pi yet so I could not test this but I plan to get a 40 watt 5 port USB charging hub and have that power the Pi and a 2.5 hard drive (HDD); yes in this scenario 3 ports of the hub go unused. I will also wire and code a power button to turn the Pi on and off.

Question
In my use case the Pi will turn off (power down) but what about the HDD? If the HDD is directly connected to the USB power hub does it stay on all the time or does the pi send a shutdown signal and the HDD powers down as well?

If the hdd is always on in this use case how can I modify it to not be? Could I run 2 power cables to the pi (one to the pins and one to the normal power input) so the pi has enough power for the HDD but insures it goes off with the pi?

Clarification
I will eventually use another device or hat to truly kill power to the pi. The power button will issue the halt/ shutdown command and then the extra device will kill the power. I fear this will leave the HDD running though unless I power it from the pi directly.

3
  • The Pi does not power down. It used to use about 150 milliamps when "off". That may be wrong for current Pis.
    – joan
    Jun 19, 2018 at 18:19
  • @joan Yes I know really it's in "sleep" mode in this case. I plan to use a hat that actually cuts power though so it will eventually be 100% off. Right now though that's not my focus, I'm more worried about the HDD. I guess a better question is will the halt command halt the hard drive? Let me update the question. Jun 19, 2018 at 18:40
  • Was going to use a 2.5 WD Black. Possibly blues for testing but black in production. Jun 20, 2018 at 2:34

2 Answers 2

1

Modern HDDs consume quite modest current when they stop spinning, so depending on your target power consumption it may be enough to spin down the HDD before you shut down the RPi. This can be done using hdparm, which accepts spin down time with values from 1 to 240 corresponding to multiples of 5 seconds. E.g.

sudo hdparm -S 12 /dev/sda

will the the HDD to stop spinning after 1 minute of idle time. This can be executed before shutdown, or at any time when you think the HDD will likely not be needed anytime soon.

0

I do not know what a "USB charging hub" might be, but a powered hub will supply power to whatever is plugged into it. The Pi (or indeed any other computer) has no control over this.

NOTE hubs are generally not the best way to power a Pi. A standards compliant hub will provide little current, unless negotiated - which the Pi can not; other hubs just provide 5V, many only 500mA.

I do not really understand the desire to power a Pi down (unless it is running on batteries) all models use very little current.

Having said that the Pi3B+ has a new power design. The PEN (next to RUN) on the J2 header (replacing the Gnd on earlier models) is connected to the Global Enable on the power module. Pulling this low should reduce Pi current to a couple of mA. (I have not yet tried this - but this is designed to be used with power HATs.)

1
  • Charging hub is really a power hub the only difference is in advertising, I just used the verbiage from the hub I'm looking at. The hub I'm looking at is meant to charge 5 iPads at a time. I will be using building a production system where the pi will have a touch screen and battery backup. I just need to cover all my bases including users trying to turn it off and power outages. Jun 20, 2018 at 2:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.