Another auto-power-off project
Since the last auto-power-off project went well, I decided to go for another problem hunting me for a while. Our satellite receivers are capable to work as PVRs when a USB disk is added. First I tried a plain USB flash stick, but its write speed was not fast enough (and with the switch to HD TV you need about 1GB per 10 minutes recording time). So I bought an external hard drive enclosure and put a 250GB drive in it.
The problem which bugged me from the beginning was that the disk stayed always on. This is not so much an issue about power consumption, but more about durability. Most disk not specifically designed for servers don’t really like to powered on always. Also, the case got noticeably warm, which also reduces the life-time of the disk.
I’m still not sure why this happens. When the drive enclosure is powered on, the disk will power off itself after a while (I configured it on my Linux box before putting it into the enclosure to a sleep time of 10 minutes). But when the receiver got switched on, the disk will never power off even when the receiver itself is switched off. So either the receiver configures the disk not to sleep for some reason, or maybe something else confuses the USB-to-SATA converter so it prevents powering the disk down.
Auto-power-off to the rescue
So the idea is to add some circuitry to the drive enclosure to switch if off when the receiver. I could use a master-slave power cord. But first this is kind of clunky, and second it might nor reliably given that the receiver doesn’t consume so much power at all. (And third these things tend to be expensive here…).
So I measured what happens with the receivers USB output when it gets switched off. It turns out that then the 5V line on the USB port also gets switched off - so this looked like a good source for signaling the enclosure to power itself off.
Getting the USB voltage was simply a matter of soldering a wire to the USB connector on the converter board:
Unfortunately there seems to be a large capacitor connected to this power line (in the receiver), since its voltage took about 10 seconds to drop below 2 volts.
A proper switch is in order
So when using simply a transistor connected to Vusb to power on and off the drive enclosure, this slow ramp down will also lead to slowly powering off the hard disk, which might have unwanted effects on the drive. So some kind of comparator is needed to have a fast and hard power down on the drive enclosure. This lead me to a simple circuit:
The TLV809K33 is a “Supply Voltage Supervisor” used for creating reset signals for CPUs and MCUs. Whenever its supply voltage rose above 2.93V, its output will go high (this is the 3.3V version of this monitor, versions for other voltages have other trigger levels). Otherwise, the output will be pulled to ground. This signal (which normally would be connected to a /RESET line) is used to turn of Q1, which then turns on Q2 (whose gate gets pulled high via R2 when the output from the voltage monitor goes low). I needed two transistors because I needed a high-side switch - I could not split the ground signal on the drive enclosure. If this would have been possible, I could have used Q1 directly as power switch (Or one would need a voltage monitor designed for active-high reset lines). Q2 can switch loads up to 3.5 amps, with an on-state resistance of only 55 mOhm.
Building it up nice and small
The voltage monitor and both FETs are available in SOT23-3 package, so I mounted them on small breakout boards. The TLV809K33 and Q1 went on one board (designed for two packages), and Q2 got on one half of another board. After that, I simple connected them together with a one-pin-header:
I added some heat shrink to isolate the boards from each other, and to isolate the whole stack itself. Then I split the power wire in the drive enclosure (actually I de-soldered one of them) and added the board in between. It fits nicely into the spare room of the enclosure:
The white blob at the top right is the new circuit. The red heat shrinking on the switch is for the new wire connected to the module.
The whole setup works as expected. The enclosure gets powered on as soon as the receiver is switched on. And it powers off with a delay of about 5 seconds. So the hard disk now stays cool for most of the day, which should prolong its life time significantly.