Telluric Currents and the Earth Battery

(So it turns out I can pack boxes faster than expected!  Unfortunately that means I’m now just killing time until tomorrow when I load everything into the truck and head off for my new job in Waterloo, Iowa.  But here’s another article, just for you!  I know, I know, it’s not a project or a circuit, but I left my electronics stuff in St. Louis…)

You know what?  The Discovery Channel is right, the world is just awesome.

The other day I was surfing Wikipedia and happened across an article on telluric currents.  Apparently, changes in our planet’s magnetic field induce fairly substantial currents into the surface of the earth (both across lands and oceans).  Now, I’ve heard of the earth’s magnetic field, and I’m familiar with grounding rods acting as current paths.  But telluric currents?  Well, like 99.9% of all Wikipedia articles, it’s new to me.

Global Map of Telluric Currents, Created 1936 - This is likely no longer very accurate by today's standards.  Understandably, collecting such data wasn't so easy in 1936, so a lot of this map came from interpolation.

So what’s the deal with these mysterious earth currents?  Well believe it or not, this is a phenomenon which was first observed way back in the mid-1800s.  In fact, it used to wreak havoc with telegraph and, later, telephone lines.  You see, electrical currents tend to follow the path of least resistance.  So if there happens to be a wire connected between two points on the earth’s surface (e.g. a communications ground line), any current that might normally have flowed through the earth itself will instead flow along the lower-resistance wire.  For example, according to The Earth’s Electrical Environment (Pg. 244), between August 28th and september 2nd, 1859, an enormous geomagnetic storm induced 800V on a 600km wire in France.  Much later, on March 24, 1940, a similar event damaged two communications sites in Tromso, Norway:

“Sparks and permanent arcs were formed in the coupling racks and watch had to be kept during the night to prevent fire breaking out… One line was connected to earth through a 2mm thick copper wire, which at once got red hot, corresponding to a current more than 10amps.”

Now telluric currents aren’t all bad.  In fact, they’ve recently been used to map and explore underground structure.  By taking measurements of voltage and current along an array of points at the earth’s surface, scientists can characterize the conductivity of different areas of the ground.  This method can even be used to identify mineral or petroleum deposits.  For more details on this, see this article on Magnetotellurics.

An example of data produced using the methods of Magnetotellurics

Well as you may have guessed, naturally-occuring telluric currents can even be harnessed to provide electrical power.  Of course, this requires a wire of substantial length.  And this point, combined with the fact that there’s not much energy to be drawn from most telluric currents anyway, makes this an impractical power source.  However, there is one related invention which at least solves the length issue: the earth battery.  Basically, the earth battery works just like any other chemical battery – you insert two electrodes made of different metals into the ground, and the earth acts as your electrolyte.  The ground needs to be slightly wet for this to really work properly.   But with such close spacing, you’re not really deriving energy from the earth’s magnetic field, you’re just making a simple chemical battery (like that potato battery you made in elementary school).  However, earth batteries did work well enough to power some early telegraph stations.  If you’re curious, here’s the patent for an improved earth battery, issued in 1874.

By the way, in researching for this article, I ran across a (seemingly) amazing “patent” for a device that claims to be able to produce 3000W of electrical power from a 500W input.   It says this can be accomplished through a simple high-frequency oscillator and a half-mile antenna which derives energy through resonance with telluric energy.  Now, I’ll let you come to your own conclusions, but I think this is bunk.  For one thing, US Patent #253,765 is for a portable fence, not an electrical power accumulator (and I couldn’t find this “patent” via term searches).   But secondly, how could telluric currents possibly resonate at 500kHz?  Everything I’ve read describes naturally-occuring telluric currents as having periods on the order of, at shortest, minutes.  Which means we’re talking about frequencies in the millihertz, not kilohertz.  In fact, most telluric current oscillations are diurnal, meaning they follow a daily, 24-hour cycle.  Oh and third, the rest of the website hosting that “patent” is unbelievably sketchy…

Anyway, if you’re curious, take a read through this chapter, available for free online, and tell me what you think.   I’d absolutely love to try this out sometime.  Anyone have any suggestions for how to do it?  I’m thinking of just buying the cheapest, longest length of wire I can get from Home Depot, along with a couple of pieces of re-bar.  Then I’ll just go find a field somewhere, set my two electrodes pointing north and south (as that seems to be the predominant direction of telluric current flow in the US), then check it with a voltmeter.  Perhaps nobody would mind if I tried this at a park someplace… 🙂

Job: Acquired

Plus: Why you shouldn’t keep your hotel room key in the same pocket as your phone.

Well, it’s finally happened.  After forty-five applications, twelve weeks, eleven interviews, five hotels, and five offers, I’ve finally accepted a full-time job.  And while I’m very thankful to have received so many nice options, I’ve got to say, job hunting kindof stinks.

If you’ve ever been jobless, you can probably relate to this.  For the past few months, my life has mostly consisted of hours upon hours of mindless internet job searches and lengthy, impersonal applications, punctuated only by the occasional nerve-racking interview or site visit.  Of course, traveling can be fun, especially when someone else is paying your way.  I had a blast traveling down to Austin, TX to interview with National Instruments (NI).  Those guys sure know how to make work fun.  They even paid for an extra day, giving me time to meet up with a good friend from college.

For me though, traveling gets old fast.  Fact: the word travel originates from the Middle English word travailen, which means “to toil.”  And my desire to toil was pretty much satisfied after my third on-site interview.  But of course, people in my line of work (electrical/mechanical engineering), don’t usually get job offers over the phone.  So to Indianapolis, IN I went for Dow AgroSciences.  To Austin, TX for NI.  To Kansas City, KS for Garmin.  To Waterloo, IA for John Deere.  And to St. Louis, MO for Boeing.

Now I’m psyched to say that after every on-site interview, I received an offer of employment.  So, five offers.  Pretty good offers, too (although sometimes that took a bit of negotiation).  And having so many options is great!  Awesome, even.  But it does make the decision-making process a little tougher.

However, after giving it a lot of thought and consideration, I’ve made up my mind.  So who did I choose?  Well, I suspect the image below will answer that:

John Deere 7530 Premium Series Tractor

Yes, I’m now employed by John Deere as an Engine Controls Applications Engineer.  I haven’t started work yet; that’ll happen on Dec. 6th.  But I’m already pretty excited.  I know, I know, they’re probably not going to let me drive the big tractors right away, but eventually.  🙂  For now, I’m keeping myself occupied by packing all my worldly posessions into surprisingly-expensive cardboard boxes.  I do hope the weather holds up next week, as I’ll be driving across I-90 in a big ol’ Penske truck.

Oh and I promised to address the issue of hotel keycards and cell phones.  Well, you probably know that most hotel keycards, like credit cards, have a magnetic stripe down one side which stores the data necessary to open your hotel room door.  You probably also know the this data can be rewritten by a specialized device which contains an electromagnet.  What you may not know is that these magnetic stripes come in two flavors: low-coercivity (LoCo) and high-coercivity (HiCo).  Credit cards normally use HiCo stripes, which last longer and can handle frequent use.  However, hotel keycards are rewritten so often that they are typically made with LoCo stripes.  The problem with low-coercivity stripes is that they’re susceptible to corruption by small magnets.

So why shouldn’t you put your keycard into the same pocket as your cell phone?  Well all phones contain at least one speaker of some kind, and all speakers contain magnets.  So if that speaker happens to get too close to your hotel keycard, it’s gonna wreak havoc with your card’s magnetic stripe.  I learned this the hard way a couple of months back.  So, keep hotel cards away from anything magnetic.  I’ve heard that even credit cards, if they get too close, can cause problems with hotel keys.  Who knew?

Magnetostriction (aka: Why Transformers Hum)

Have you ever wondered why transformers hum?  I have.  And no, it’s not because they don’t know the words.  But seriously, at first thought, it makes no sense.  They’ve got no moving parts, and how can something produce sound without moving a little air?  Well as it turns out, with transformers, there’s more than meets the eye.

Yes, admittedly, I did just make two terrible jokes within the same paragraph.  Tough.

According to Swiss scientists, the low-frequency hum produced by transformers is often due to the phenomenon of magnetostriction.  Basically, when a ferromagnetic material is exposed to a magnetic field, it can actually change shape, albeit very slightly (think microns).  You see, at the microscopic level, such materials consist of individual magnetic domains.  Think of these domains as tiny bar magnets.  Whenever a magnetic field is applied to the material, each domain actually rotates.  This rotation can cause the material to either expand or contract depending on the orientation of the magnetic field.

Fun fact: if you were to “turn off” earth’s own magnetic field, its diameter would expand by 10cm.  That doesn’t sound like much, but it would result in ten square kilometers of new land area.  Can you say earthquake?

So, when you’ve got a transformer connected to a 50/60Hz AC line, it’s dealing with a magnetic field that oscillates at 50/60Hz.  However, the transformer’s core actually undergoes magnetostriction twice during each electrical cycle (see this animation), so the whole thing vibrates at 100/120Hz, thus producing sound.

Now I should mention that there are a few less-sophisticated effects which may also cause transformers to hum.  Quite often, it’s because their windings or laminations (layers of iron sandwiched together to form a transformer’s core) are not held tightly together.  Thus, forces resulting from the oscillation of the transformer’s magnetic field can cause these parts to vibrate (as opposed to magnetostriction, which causes parts to change shape).  According to one article, this effect can be amplified by any DC offset in your AC signal.  This DC offset results in an asymmetrical magnetic field which causes increased vibration, not unlike the vibrations produced by an asymmetrical rotating weight.

Of course, most of the time, the hum or buzz of a transformer is so quiet that it doesn’t much matter.  However, I once worked on a transformer-isolated DC-DC converter that absolutely screamed.  You see, this converter was to be built as part of a class project.  We were given planar E-cores and copper foil with which to create our transformer.  Normally such cores are used with PCB traces, like so:

A Planar E-Core Transformer

However, we were told that we could just cut loops of copper foil and stack them together between the two halves of the core.  Well, it turns out our twenty-one foil windings didn’t quite fit.  And in the process of trying to force the core together, we cracked it.  Badly.  But not so badly that we couldn’t put it back together with superglue and electrical tape.  We then proceeded to wind the core with standard insulated wire.

Amazingly, our cracked transformer worked wonderfully.  The converter even yielded an efficiency of nearly 90% at 100W.  However, at one point we needed to perform a small-signal analysis on the system in order to improve our mathematical models.  Doing this meant introducing a small variation into the duty cycle of our main 50kHz PWM signal.  This small, 1% variation ranged in frequency from 1Hz all the way up to 10kHz.  And I tell you, when we started to hit 1-2kHz, you could’ve heard our circuit through a pair of cinder block walls.  It was uncomfortably loud.  And I’m willing to bet this was because of our cracked transformer core.  Perhaps we hit some sort of mechanical resonance as well.  Regardless, it was a pretty exciting/frightening experience.

The Mechatronics TVIP (+Video)

MechatronicsToday’s post is going to be a trip down memory lane for me.  The TVIP or Thrust-Vectoring Inverted Pendulum was my very first real engineering project in college.  My good friend Alex and I constructed it almost five years ago, during the second semester of our freshman year at RPI.  We actually started designing the system during our very first semester.  However, the bulk of our work was performed for an independent study in the [former] RPI Mechatronics lab during the spring of 2006.  By the way, in case you’re wondering, the RPI Mechatronics lab closed down when Dr. Kevin Craig decided to leave RPI for Marquette University.  Of course, he took most of the lab with him, and now runs the Multidisciplinary Mechatronics Innovations lab at Marquette!

Why do I bring this up now?  Five years later?  Well as I’ve mentioned before, I’ve been doing a lot of job interviewing lately.  During interviews, the TVIP seems to come up pretty frequently.  It’s still a great example of the work I did while employed in the Mechatronics lab.  And I’m still pretty proud of this rickety old thing.  I consider it to be quite an accomplishment, particularly for a pair of college freshmen.  🙂

So what exactly is the Thrust-Vectoring Inverted Pendulum?  Well, like many Mechatronics lab projects, it’s a demonstration of control systems, mechanical dynamics, electronics, and modeling.  To be more specific (and simple), it’s a big aluminum pendulum with a scary-looking propellor attached at the end.  A diagram should help explain:

Thrust-Vectoring Inverted Pendulum (CAD Model)

What you see there is a dual A-frame, about three feet tall, supporting a horizontal shaft to which a pendulum is connected.  That shaft is suspended by a pair of bearings.  An optical encoder is used to detect the angular position (angle θ) of the shaft and pendulum.  At the end of the pendulum, the propellor and motor are attached to a geared DC servo motor, which is used to vary the direction (angle φ) of the propellor’s thrust.  Hence the term thrust-vectoring (plus, five years ago, it sounded really cool).

Now the purpose of this setup was to demonstrate the control of an unstable system.  Thus, our goal was to vary the direction and magnitude of the propellor’s thrust in order to swing up the pendulum and then balance it in its inverted, unstable position.

This was accomplished by using two separate control loops, both implemented within LabVIEW.  The first controller was responsible for swing-up (since the propellor could not produce enough thrust to pull the pendulum straight up).  As you’ll see in the video below, the swing-up algorithm was essentially a proportional controller with an excessively high gain.  This actually caused the system to go into unstable oscillations.  That sounds pretty bad, doesn’t it?  But it’s exactly what we wanted.  Just like a child on a playground swing, our proportional controller caused the pendulum to swing higher and higher.  However, instead of continuing to let the system oscillate unchecked, once the pendulum started to close in on its balance point, LabVIEW switched the output over to a PID control loop.  The job of this second controller was to catch the pendulum and then hold it, as closely as possible, in its verticle, inverted position.  How about a video before I go on?

Now that video was taken at the conclusion of the Spring 2006 semester.  You’ll notice that the pendulum still oscillates slightly (plus or minus about eight degrees) when inverted.  This was due to an improperly tuned PID controller.  We did improve that performance somewhat over the next year or so.  During my later employment in the Mechatronics lab, I wrote up a paper that, unfortunately, never made it to publication.  It contains a bit of the more serious math on modeling and control I didn’t really understand when Alex and I first designed this system.  You’ll find a link to this paper at the end of my post.

The Details

So just what makes this thing tick?  Well, the motor and propellor are pretty standard fare for RC electric planes.  Of course that doesn’t make them any less scary.  Running this thing indoors produced a lot of noise, and you had to keep clear of the pendulum while it was operating (lest you lose a finger).  The propellor and motor were connected to a standard geared DC motor which was actually capable of rotating 360 degrees.  This presented another safety hazard; if the positioning motor rotated too far, the prop would begin biting into the aluminum pendulum.  Amazingly, in two years of operation, this never happened.  But it could have.  Control of this positioning motor was accomplished by a third PD control loop within LabVIEW.  Angular feedback was given by an optical encoder.

Now we really should have bought a commercial, heavy-duty hobby servo in order to vector the thrust of our prop.  This would have likely been safer and easier.  But what did we know back then?  Ultimately we solved the safety issue by replacing the propellor with a ducted fan.  It didn’t quite produce as much thrust, but you didn’t have to worry about how to grab the pendulum in the event of a control/electronics failure.

The New Thrust-Vectoring Inverted Pendulum

And speaking of electronics failures, we did have a couple of frightening moments during our initial testing.  The speed of the propellor motor was governed by a power MOSFET.  Twice, that FET failed during operation; in both cases it failed by shorting.  The result?

Instantaneous full-power thrust.

Pretty scary stuff, particularly since we first powered the prop motor using a 12V lead-acid battery.  However, we also eventually replaced that battery (which you see in the video above) with a dedicated high-current power supply (the box with the RPI sticker).

Now as I started to mention earlier, both the propellor and positioning motors were driven by microcontroller-produced PWM signals wired into power transistors.  We used a microcontroller (MCU) for PWM generation because the NI data acquisition (DAQ) hardware we had available at the time could not generate these signals.  Instead, it produced analog outputs which were fed into the ADCs of our MCU.  The MCU (an AVR ATTiny13) then produced PWM signals whose duty cycles were proportional to those analog inputs.  Fortunately, the DAQ hardware we had could easily process our two quadrature encoder inputs into angular measurements.

Well I’ll leave the rest of the details to the paper linked below.  If you’re interested in how to model this system mathematically, as well as how to implement the various controllers described here, have a read!  I think you’ll find my test in characterizing the viscous damping of the ducted fan rather interesting.  If only I’d had Eureqa back then…  Oh, and I’ve also included MCU source code for the ADC-PWM conversion:

Paper: A Mechatronics Case Study: Thrust Vectoring and Control of an Unstable System
Schematic: GIF Image (Also available in the paper)

Feel free to make comments or ask questions in the comment section.  Thanks!

Fun with Failure

Have you ever come up with a neat idea?  An idea for some really useful sort of device?  And then you find out that it is, at least for now, a physical impossibility?

I had just such a neat idea this week.  At least, I thought it was a neat idea.  You see, for the past few weeks, I’ve been traveling around the country interviewing for various different jobs.  One of these jobs is with John Deere in Waterloo, Iowa.  Now for those of you who don’t know, it gets cold up in Iowa.  Their average January temperature is a mere 16°F.  I was imagining myself leaving work after a long day, going out into the cold, and then shivering in a very cold Jeep Liberty (my car) for the drive home.  So I’ve been thinking, wouldn’t it be nice if I could somehow heat my car while it’s outside?

A Solar-Heated Jeep?

Well, I don’t want to run a heater using my car battery, for obvious reasons.  However, I have this nifty 90W solar panel that I’m not really using at the moment (although it is acting as a glorified cellphone charger, and has been put to good use in the past).  Perhaps I could mount this to the top of my Jeep and use it to run a small heater.  My only question – would 90W be enough power to effect a substantial (20-30°F) temperature rise?

Initially, my gut feeling said no.  For one thing, from experience I know that my 90W photovoltaic (PV) panel will never produce 90W if mounted horizontally on the roof of my car.  Even on a perfectly clear and sunny winter day, it won’t be getting strong, direct sunlight.  So perhaps I could expect 60W at best, but on a cloudy day I might see less than half of that.  But more importantly, on a sunny day, wouldn’t I already be trapping more than 90W via my windows and the greenhouse effect?  Because if so, this effect has never produced a particularly warm interior.

Of course there’s only one way to answer these questions.  Science!  Particularly, the study of thermodynamics.  I’ve taken a couple of courses on the subject, but I still had to refer to my book for this formula, derived from the first law of thermodynamics:

An equation for the rate of temperature change for an object at a given power input/output.

This says that the rate of change of an object’s temperature (dT/dt) is equal to the power (P) absorbed or released by that object divided by its mass and its specific heat.  So for my first experiment, I decided to heat the interior of my Jeep by idling the engine and turning the heat to full-blast.  I then hopped out and remotely measured the interior temperature during cooling.  How did I accomplish this?  I temporarily re-purposed my Doom Box, which now contains both a LM34 temperature sensor and an XBee wireless transceiver.  Here’s a snapshot of the latest PCB revision, powered by an ATMega644P MCU:

Doom Box PCB (Rev3)

So here’s what the temperatures looked like during my first test.  The yellow vertical line below indicates when the engine was shutdown and cooling began:

Test #1 Graph

I should note that the Jeep’s temperature measurement was filtered by a 40 second (eight sample) moving average filter implemented within LabVIEW.  Also, the internal temperature sensor was placed on the floor in front of the back seats.  Exterior temperature measurements were taken manually using a digital thermometer and are represented by a linear trend-line shown in red above.

So during this test, my jeep was outdoors, parked in the shade, from 3-5PM.  You’ll notice that during this time the exterior temperature dropped by about ten degrees as the sun started to set.  However, the temperature inside the Jeep dropped slightly faster, as you would expect.  There was also very little wind during this test.

Now to apply the formula!  The drop in temperature between t = 4000s and t = 6000s is easily determined from the graph: 4.7°F or 2.6°C.  The trick is in determining values for mass and specific heat.  For this first test I decided to simply approximate the mass of air and metal within the car.  I calculated that the Jeep contained about 4kg of air at a cp of 1005J/kg-K as well as about 20kg of steel (e.g. in the seats and wheel) at a cp of 490J/kg-K (it’s pretty interesting to note that air has a higher specific heat than most metals).  I decided to ignore small pieces like plastic and seat stuffing, as well as everything under the hood (an assumption which proved later to be somewhat stupid).

So plugging all of that into the equation above yields a power loss of just about 18W.

Well now, eighteen watts is pretty surprising.  I wasn’t expecting losses to be that low for an interior-exterior temperature difference of 25°F.  This called for a second round of testing.  This time, I moved my Jeep into an insulated, closed garage.  Doing this allowed me to get rid of temperature variations due to solar radiation and wind.  It also prevented rapid changes in exterior temperature.  I then inserted a controllable heat source (an old laptop) into the car, located a few feet away from my interior temperature sensor.  The laptop was configured in such a way as to draw about 46W via a 120VAC inverter.  In theory, this level of power should have raised the Jeep’s internal temperature by about 12°F per hour.  Did it?  Well, I think the graph below speaks for itself:

Test #2 Graph

Yep, that’s definitely a failure.  It turns out that an input of 46W could only raise the car’s interior temperature to about five degrees (F) above ambient.  So the bottom line is my 90W solar panel isn’t going to have much of an effect.

So what went wrong with that first test?  Why did I calculate the need for only 18W?  Two reasons.  First, I didn’t account for all the residual heat in the engine compartment.  This helped keep the Jeep’s interior temperature higher than it would have been otherwise.  I likely also underestimated both the mass and heat capacity of the car’s interior.  In my defense, it’s not exactly an easy thing to determine.  In thermodynamics classes, you get problems about isolated, well-defined blocks of aluminum and ideal, constant heaters.  In reality, you get an ill-defined mixture of materials and variable heat sources.

Just out of curiosity, I used the first few minutes of my second test to make a better guess at the Jeep’s mass and specific heat.  In five minutes (300s), the temperature rose by about 0.7°F or 0.4°C.  Assuming this rise came only from heat input by the laptop, the term mcp = 34,500J/K.  That’s actually not too far from my initial guess for the first test, which worked out to 13,800J/K.  What this likely means then is that in my initial outside test, the Jeep was losing about 45W instead of just 18W.  But I’m also guessing that a lot of heat was still coming in from the engine compartment.

Anyway, I hope these results aren’t too confusing.  I’m not making any guarantees about the correctness or validity of my methods or assumptions.  What I’m really trying to say here is that you’ll need a lot more than 90W of PV panels to heat your car’s interior.  That, I can say with confidence.  I’d love to hear comments on this, particularly if you’re an expert in thermodynamics!  Where have I gone wrong here? 🙂