Monday, November 18, 2013

Can Magnets Hurt Your Electronics? (contains "Breaking Bad" spoilers)

Spoiler Alert

In this article, I make references to AMC's Breaking Bad, Season 5, Episodes 1 and 2.  If that's a problem for you, I have a spoiler free version here.

Article Continues, With Spoilers

On AMC's Breaking Bad, (Season 5, Episode 1, Live Free or Die), Walt and Jesse rigged a monster electromagnet to wipe a laptop from a distance.  It made for great television, but just how realistic was it?  More to the point, are the magnets you're likely to encounter in real life a hazard to the electronics you carry around with you?

The Short Answer: Your credit / debit cards (with a stripe on the back) can be damaged by magnets.  Don't hold one to the fridge with a magnet.  Everything else you've got is pretty safe.

Changes In Personal Information Storage

Not too long ago, we would store our digital data on diskettes, or even floppy disks.  Our music lived on cassette tapes, and our videos on VHS video cassettes (both analog).  These formats had one thing in common: magnetic media.  A thin layer of sensitive material was applied to an inert substrate.  Analog or digital data was recorded by passing the media over an electromagnetic recording head.  Playback was accomplished by a subsequent pass over the same head, with some electronic changes.  You can read more about that here, on Wikipedia and here, on Britannica.

But what can be recorded by a magnetic field can also be erased by a magnetic field.  Careless handling of media and magnets might add hiss to a cassette tape, or make a diskette unreadable.

We don't use much magnetic media anymore.  DVDs and CDs are optical storage devices.  "Flash" drives, music players, cameras and smart phones all use solid state storage.  Optical storage isn't recorded with a magnetic field, and can't be erased by one.  The same goes for solid state storage.

What Makes Hard Drives Different

How about computer hard drives?  Most still use magnetic media.  Can a hard drive be zapped by a magnetic field?

The truth is that computer hard drives are close to magnetic fields all the time.  There are magnets in the motor that spins the drive, and magnets in the motor that moves the drive heads.  Any wire carrying a current generates a magnetic field: the inside of a computer, laptop or desktop, is just full of magnetic fields.

So, why don't computer hard drives erase themselves?  They are designed with this environment in mind.  The internal drive motors isolate their own magnetic fields.  The spinning disks themselves are contained in a metal enclosure that shields them from external magnetic fields.

There's a bit of a happy accident at work, too.  Modern hard drives can hold astounding volumes of data, yet they are no larger than they used to be.  How is that possible?  One way is to make the individual data bits smaller, and pack them more tightly together.  But that presents a risk of adjacent bits bleeding onto each other.  So, high capacity hard drives use magnetic compounds that are actually more resistant to magnetization than older, lower capacity drives.  That means they are more resistant to being demagnetized, as well.  They still work because the read / write heads are incredibly close to the spinning disks: far closer than the diameter of a human hair.  They have to be that close to write to the magnetic media and to detect those changes when reading data.

A Visit to Albuquerque: Erasing a Hard Drive From a Distance

Walt and Jesse would have needed a monster magnetic field to get through the shielding, and still present a field strong enough to erase the stubborn patterns on a modern hard drive.  And they had to do it from a distance; perhaps 40 feet.  Their salvage yard electromagnet is powerful enough to pick up a car.  Would it have gotten the job done?

Well, I don't really know.  But I do know that Vince Gilligan is my hero: He put in a scene where Walt and Jesse tested the rig in the salvage yard.  That's what a real engineer or scientist would have done, and that's what Vince had Walt and Jesse do.  The magnet worked on TV; would it have worked in real life?  How far does the field from an electromagnet travel?

The light from a laser can travel a great distance while losing very little power.  Ditto for the light from a well-focused Lekolite (theatrical spotlight).  But most energy fields lose strength and the ability to do work exponentially with distance from the source.  Double the distance, you measure 1/4 the field strength.  Triple the distance, you measure 1/9 the field strength.  (There won't be any more math in this article.)

You can try this at home:  Take a magnet off of your refrigerator.  Slowly bring it back, closer and closer.  You won't feel any pull from the magnet until you get very close to the fridge: half an inch, or an inch at the most.  Hold a compass in your other hand, and you can see that the magnet will deflect the needle from north at a greater distance. 
The field actually goes out to infinity, but is too weak to do any work beyond a few inches.  And it's a long way from deflecting a compass needle to erasing a hard drive.
 

Magnetic lines of force travel between the two poles of a magnet.  Field strength will be at its strongest between those two poles, and falls off fast with distance.  In the salvage yard electromagnet, one pole is at the center of the drum; the other pole is the outer rim of the drum.  To lift a car, the crane operator puts the magnet in contact with the car roof.  Look at some pictures of this kind of magnet lifting smaller pieces of scrap:



There's almost no lifting strength beyond the diameter of the magnet (five or six feet).

Even with the voltage juiced up, would that magnet be able to reach out 40 feet (eight times its diameter), through the shielding in a modern hard drive, and wipe the magnetic media within?  I have not run the experiment (and don't plan to).  Absent real data, I shouldn't make a firm prediction.  But I'll admit to an experience-driven bias that it would not have worked at that range.

Back to Real Life

The strongest magnetic field that you're likely to encounter close-up might come from an old-style CRT television or computer monitor.  You can operate such a monitor right next to or on top of a desktop computer for years and years, and never see the monitor's magnetic field damage the hard drive.  Many monitors have a feature that you can activate to erase residual magnetic fields within the monitor.  This operation, called "degaussing", generates a rather strong field of its own for a second or so.  Even that won't zap the hard drive.
 

The hard drive in your laptop is safe enough from the magnetic fields you're likely to encounter.  Even if a criminal genius is trying to wipe your files.  The flash memory in your camera, cell phone, tablet and portable storage devices were never vulnerable in the first place.  Your CDs and DVDs are likewise safe.

The magnetic stripes on your credit and debit cards are vulnerable.  But, the way magnetic field strength falls off with distance, you really have to do something like sticking it to your fridge with a magnet to damage one.

If you've still got precious family memories on videocassette: well, you should transfer them to DVD while it's still possible to find a videocassette player.  In the meantime, keep them in a steel file cabinet, in a climate controlled area, and away from electronic devices.  Even weak magnetic fields, when present for year after year, will produce some deterioration in their analog signal patterns.

Magnetic Fields That You're Not Likely To Encounter

I can't end this article without saying that the magnetic field within a hospital's MRI machine is strong enough to damage your electronics, either by erasing the hard drive, or by inducing damaging eddy currents in the metal components of any of your gadgets.  There's good reason that hospital staff don't let you bring metal or electronics anywhere near such a machine.


One Last Breaking Bad Reference

It's never made clear whether Walt's salvage yard electromagnet did the job.  In the next episode (Madrigal), Hank says that he had looked at the laptop before checking it into the evidence room, and found that it had been encrypted.  Well, yeah.  As disciplined as Gus was, as smart as Mike was, one of them would have thought of doing that.  Mike was Gus' security guy; he surely would have known about the encryption.  He probably installed it himself, perhaps with a product like TrueCrypt.  Did he not tell Walt and Jesse about the encryption?  Why?  Mike was the kind of guy who never revealed everything he knew.  Or, perhaps he didn't trust the encryption.  I like TrueCrypt, but, after reading so many stories about NSA "backdoors" in various products and services, I'm a little less confident in it than I used to be.

Breaking Bad fans, what do you think?


-- Joe Levy
Next article: Are You Still Using Windows XP?

 

Can Magnets Hurt Your Electronics? (no "Breaking Bad" spoilers)

No Spoiler Alert

Fans of AMC's Breaking Bad who have seen Season 5, Episodes 1 and 2 might prefer the full version of this article, here.  This is the "no spoilers" version.

Article Continues, No Spoilers

Are the magnets you're likely to encounter in real life a hazard to the electronics you carry around with you?

The Short Answer: Your credit / debit cards (with a stripe on the back) can be damaged by magnets.  Don't hold one to the fridge with a magnet.  Everything else you've got is pretty safe.

Changes In Personal Information Storage

Not too long ago, we would store our digital data on diskettes, or even floppy disks.  Our music lived on cassette tapes, and our videos on VHS video cassettes (both analog).  These formats had one thing in common: magnetic media.  A thin layer of sensitive material was applied to an inert substrate.  Analog or digital data was recorded by passing the media over an electromagnetic recording head.  Playback was accomplished by a subsequent pass over the same head, with some electronic changes.  You can read more about that here, on Wikipedia and here, on Britannica.

But what can be recorded by a magnetic field can also be erased by a magnetic field.  Careless handling of media and magnets might add hiss to a cassette tape, or make a diskette unreadable.

We don't use much magnetic media anymore.  DVDs and CDs are optical storage devices.  "Flash" drives, music players, cameras and smart phones all use solid state storage.  Optical storage isn't recorded with a magnetic field, and can't be erased by one.  The same goes for solid state storage.

What Makes Hard Drives Different

How about computer hard drives?  Most still use magnetic media.  Can a hard drive be zapped by a magnetic field?

The truth is that computer hard drives are close to magnetic fields all the time.  There are magnets in the motor that spins the drive, and magnets in the motor that moves the drive heads.  Any wire carrying a current generates a magnetic field: the inside of a computer, laptop or desktop, is just full of magnetic fields.

So, why don't computer hard drives erase themselves?  They are designed with this environment in mind.  The internal drive motors isolate their own magnetic fields.  The spinning disks themselves are contained in a metal enclosure that shields them from external magnetic fields.

There's a bit of a happy accident at work, too.  Modern hard drives can hold astounding volumes of data, yet they are no larger than they used to be.  How is that possible?  One way is to make the individual data bits smaller, and pack them more tightly together.  But that presents a risk of adjacent bits bleeding onto each other.  So, high capacity hard drives use magnetic compounds that are actually more resistant to magnetization than older, lower capacity drives.  That means they are more resistant to being demagnetized, as well.  They still work because the read / write heads are incredibly close to the spinning disks: far closer than the diameter of a human hair.  They have to be that close to write to the magnetic media and to detect those changes when reading data.

Strong Magnetic Fields: Erasing a Hard Drive From a Distance

There are magnetic fields around us 24 / 7.  Every AC adapter "brick" or "wall wort" charger generates a magnetic field.  Every desk lamp, portable fan, or table radio generates a magnetic field.  Are these fields dangerous to your laptop?

The light from a laser can travel a great distance while losing very little power.  Ditto for the light from a well-focused Lekolite (theatrical spotlight).  But most energy fields lose strength and the ability to do work exponentially with distance from the source.  Double the distance, you measure 1/4 the field strength.  Triple the distance, you measure 1/9 the field strength.  (There won't be any more math in this article.)

You can try this at home:  Take a magnet off of your refrigerator.  Slowly bring it back, closer and closer.  You won't feel any pull from the magnet until you get very close to the fridge: half an inch, or an inch at the most.  Hold a compass in your other hand, and you can see that the magnet will deflect the needle from north at a greater distance. 
The field actually goes out to infinity, but is too weak to do any work beyond a few inches.  And it's a long way from deflecting a compass needle to erasing a hard drive.
 

Magnetic lines of force travel between the two poles of a magnet.  Field strength will be at its strongest between those two poles, and falls off fast with distance.  To get a laptop inside of a really strong magnetic field, you'd have to get it between the poles of a magnet.  There just aren't that many ways to do that in real life.

The strongest magnetic field that you're likely to encounter close-up might come from an old-style CRT television or computer monitor.  You can operate such a monitor right next to or on top of a desktop computer for years and years, and never see the monitor's magnetic field damage the hard drive.  Many monitors have a feature that you can activate to erase residual magnetic fields within the monitor.  This operation, called "degaussing", generates a rather strong field of its own for a second or so.  Even that won't zap the hard drive.
 

The hard drive in your laptop is safe enough from the magnetic fields you're likely to encounter.  The flash memory in your camera, cell phone, tablet and portable storage devices were never vulnerable in the first place.  Your CDs and DVDs are likewise safe.

The magnetic stripes on your credit and debit cards are vulnerable.  But, the way magnetic field strength falls off with distance, you really have to do something like sticking it to your fridge with a magnet to damage one.

If you've still got precious family memories on videocassette: well, you should transfer them to DVD while it's still possible to find a videocassette player.  In the meantime, keep them in a steel file cabinet, in a climate controlled area, and away from electronic devices.  Even weak magnetic fields, when present for year after year, will produce some deterioration in their analog signal patterns.

Magnetic Fields That You're Not Likely To Encounter

I can't end this article without saying that the magnetic field within a hospital's MRI machine is strong enough to damage your electronics, either by erasing the hard drive, or by inducing damaging eddy currents in the metal components of any of your gadgets.  There's good reason that hospital staff don't let you bring metal or electronics anywhere near such a machine.


-- Joe Levy
Next article: Are You Still Using Windows XP?