Atomic I/O letters column #66
Originally published in Atomic: Maximum Power Computing Reprinted here February 2007.Last modified 16-Jan-2015.
Shiver me timbers, crash me heads
I'm looking for a way to stop hard disk heads from crashing into the platter while a boat is underway in heavy seas. I've yet to test this on a hard disk in operation but I think the disk would die a horrible death very quickly. I know that solid state disks are available, but they're too expensive for the enthusiast to consider.
So I thought - what about a suspension system to take the jolt out of hitting a swell?
Could you use little hydraulic pistons or springs? There is also the problem of sea air affecting the PC, but one hurdle at a time...
Stephen
Answer:
Maybe this can be done, and maybe not. Ordinary desktop drives certainly aren't built to take a lot of vibration.
Laptop drives, on the other hand, expect to be treated more roughly. Ordinary 2.5 inch laptop drives are also enough smaller than 3.5 inchers that if you mount them in a 3.5 inch bay there's plenty of room for padding, rubber-band suspension, or what have you. Obviously, you get more room again for suspension contraptions if you put a 2.5 inch drive in a 5.25 inch bay, or some even bigger enclosure.
If you completely mummify a drive in foam and then run it for extended periods it may overheat. But, again, laptop drives expect worse treatment than desktop drives get, and don't need much cooling.
Laptop drives aren't terribly expensive any more, either, especially if you can make do with a capacity of 80Gb or less.
Off-the-shelf laptop-drive-to-3.5-inch mounting kits aren't likely to be useful to you, because they use rigid trays or rails that won't absorb any shocks. Those kits often come with a pin adapter for the data and power cables, but you can buy those separately - they're all over eBay, and cheap, because they're just passive plug converters. Laptop PATA/SATA drives use the exact same data standards as desktop drives; they just have smaller connectors.
Note that there are a few laptops on the market these days that have their own accelerometer hardware, separate from the drive, which automatically clicks the drive into the parked-head position if the laptop thinks it's been dropped. IBM's had ThinkPads that do this for a while, and the recent Intel-chip MacBooks do it as well.
These laptops aren't, however, necessarily a good choice for boats, because when they're being bumped around all the time they don't let the drive run at all. You therefore have to turn the fall-detection feature off in the one situation where it'd be most useful.
It's also pretty easy these days to build a basic PC with no moving parts but fans, and you don't necessarily have to settle for a Win98 machine any more, either. Gigabyte-plus CompactFlash cards to use as a system drive are now downright cheap.
Note that any shaking that'll bother a drive will also probably bother various other standard PC components. Expansion slots, for instance, aren't made to tolerate constant jiggling. So putting the whole PC in some kind of shock-absorbing mounting could be an idea.
The cheapest version of this would, I think, be to use a standard laptop, but only when you're lying in your hammock.
I recommend a Frankenstein knife switch
I'm looking for software to put to sleep a hard drive and wake it only when needed.
I schedule my backups for the early morning, and I'd like to power up the external drive only when I need to back up my data. I could use Windows' power management, but it manages ALL the disks in my system.
I took a look around even in some programming freaks forums but I cannot get a reply. If the system can do it by itself, surely I can force it manually in some way. Any clue?
Diego
Answer:
Sounds easy, doesn't it?
It isn't.
Doing this in Windows seems to be pretty much impossible even with internal hard drives. You can use the power management settings, which generally work fine, but you can't have a one-button manual spin-down solution.
Powering an external disk up and down with any kind of software is, in contrast, completely impossible.
As I mention in this column, USB and FireWire external drives don't give the PC any way to spin them down. They may have their own timers, which may or may not be configurable with software from the manufacturer, but otherwise you're completely out of luck. Most of them don't even spin down when the computer they're connected to turns off. All you can do is take advantage of their hot-pluggability and just turn the darn things off manually when you're not using them. Which, as you say, is impractical for backups at 0300 hours.
(Incidentally, I note that when you start searching for this kind of stuff, you find a lot more people talking about doing it on Macs than on PCs. I take this as an indication of the relative noise levels to which the two groups of users are accustomed. Most PC users, definitely including me, can't tell by listening whether their hard drives are spinning.)
Putting the toothpaste back in the tube
What are your thoughts on the Viatek ReNu-It Disposable Battery Recharger?
My kids have billions of toys that need AA batteries. Recharging cheap alkalines would be nice.
I have a regular NiMH/NiCad charger. Will alkalines blow up if I put them in it?
Matthew
Answer:
Yes, alkalines will not be happy if you put them in a normal charger. That's why they always tell you not to in the
warning on the side.
(Though when I tried to blow one up by pushing five amps through it backwards, all it did was leak. Darn.)
The Viatek "Recharger", like all other "chargers" for ordinary disposable batteries, is not very useful, and not actually technically a charger at all.
Alkaline batteries have a non-reversible reaction, like any other "primary" cell. You can't charge them. All you can do is thwack them with a bit of voltage to burn off metal dendrites and kick the remaining reagents into reacting a bit more completely. Which isn't worthless, but isn't very interesting either.
(Alkaline cells with a slightly different chemistry actually can be recharged, after a fashion.)
If you "refresh" an alkaline in this manner it'll definitely last significantly longer in low-drain applications, like running a clock or a remote control. For most toys, though, you probably won't even notice a difference in run time, especially if you don't refresh the batteries before the toy runs them flat.
There've been umpteen of these devices before - the ReNu-It is definitely not the first. They're all the same. Some hypothetical nanotechnological wonder could indeed recharge any primary cell, but this is about as easy as it is to turn urine back into beer.
Back in the real world, you can minimise your battery expenses by buying rechargeables for high-drain devices (radio controlled cars, digital cameras), carbon-zinc ("Super Heavy Duty") cells in bulk for low-drain toys, and possibly also off-brand alkalines in bulk for some of the toys in between. Bulk off-brand alkalines are far cheaper than Energizers or Duracells, and although they often have lower capacity (especially if the discount store bought up a bunch that're already three years old...), the price per unit of energy remains far superior.
Of course, the very cheapest and nastiest alkalines, especially old ones, may leak. My easy-to-follow advice: Buy the cheapest cells you can find that don't.
Can't find second gear
I've got three PATA hard drives in my PC (C, E and F; D is the DVD-RW), and one of them is really slow. Burning DVDs, for instance, works fine from C or F, but times out non-stop when the data is coming from E.
The drive wasn't using much CPU time when I accessed it, so I figured that the problem wasn't that it was stuck in PIO mode instead of DMA, but I still first looked in the BIOS setup to see if it wasn't set to DMA any more. But it was set to "Auto" just like everything else, of course.
So I downloaded a SMART data checking program, and that said that everything was OK, and I checked the drive for errors, and there weren't any, and I defragged it, and the problem was still there.
Then I looked in the XP Device Manager and, lo and behold, the Secondary IDE Channel properties said there was a drive in PIO mode, even though the menu item right above it was still set to "DMA If Available".
WTF is going on, and how can I make it stop?
Adrian
I'm sorry if this picture gives you nightmares.
Answer:
A surprising number of Windows XP systems have this problem.
When WinXP's atapi.sys driver clocks up a total of six timeout or CRC errors for a given drive, it knocks that drive's communication speed down by one notch. If the errors are caused by hardware that can't actually run as fast as it says it can (or just a lousy cable), this will solve them. If the errors are spurious, though, you can end up with a fast drive slowly ticking down through the DMA modes, then into the dreaded PIO modes from days of yore. And it will never come back up again, unless you fix it manually.
(You didn't notice much CPU use when accessing the drive, by the way, because modern CPUs are fast enough that non-DMA ATA modes no longer load them up significantly.)
I'm indebted to a couple of readers who've pointed out to me the easy way to fix this problem. Go into Device Manager (Control Panel -> System -> Hardware -> Device Manager), expand the IDE ATA/ATAPI controllers section, right-click the IDE Channel to which the slow drive is connected, select Uninstall, OK your way through that process, and reboot. Windows will reinstall that channel, and it should now be set back to high-speed defaults.
Alternatively - if you don't want to reboot, or if you just like pain - you can run regedit (from Start -> Run...), then go to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E96A-E325-11CE-BFC1-08002BE10318}\
(accept no imitations...), and find the first of the 0001, 0002... entries that contains a "DriverDesc" key whose
value matches the name of the controller channel that's having the problem. In your case, that'd be the first one
called "Secondary IDE Channel".
Now add a key called "MasterDeviceTimingModeAllowed" or "SlaveDeviceTimingModeAllowed", depending on whether the drive with the problem is a master or a slave, and set its hex value to "ffffffff".
Now, when you go to the Device Manager Properties window for that controller channel, set the device mode back to PIO and click OK. Then reopen the properties window and set the mode to "DMA if available" and click OK again, and your drive should be back up to speed.