Total eclipse

September 3rd, 2017 Comments off

I watched this year’s total solar eclipse from the path of totality, near Douglas, Wyoming, with my friends Tyler and Masaru. Rather than try to photograph the event, I chose to simply observe.

My 1250mm f/10 telescope with a solar filter cap gave us an up-close view as the moon slid across the disc of the sun. At first, there were no noticeable changes to the fields and hills around us, but gradually we became aware of the dimming light. Masaru mentioned how it looked like the world was underexposed by a stop or two.

I had a light meter out to track the progress of the eclipse in percentage terms. Before the eclipse started, with a very light haze from wildfires in Montana, the meter indicated 95,000 lux. At the halfway point, it read — not surprisingly — 48,000 lux. The numbers continued to drop as more of the sun was obscured. 40,000 lux. 20,000 lux. 10,000 lux. 5,000 lux. Soon, the meter indicated 1,000 lux — a 99% eclipse, about as bright as a well-lit lab bench, but still relatively normal outside. It was still impossible to look at the sun without a solar filter. The light kept dropping, 500 lux, then 100 lux — a 99.9% eclipse, and still too bright to look the sun unprotected. Between glances at the light meter, I watched the sun slip away through the telescope.

Only a small sliver of the sun’s disc remained, then just the pearls of light that are called “Bailey’s beads” (the last bits of light peeking through valleys on the moon’s surface), and then: it was gone. Totality!

I looked up at the now totally eclipsed sun. The brilliant white corona of the sun stretched satin fingers away from the now-occluded solar disc. Three red solar prominences danced away from the sun’s surface. The stars were out; the land was as dark as a full-moon night; a strange sunset circled us in the distance.

It was one of the most beautiful things I’ve ever seen. (No exaggeration; I’m getting misty-eyed just thinking about it as I write this.) The 99.9% partial eclipse and the 100% total eclipse were profoundly different experiences. Totality was a million times better than even the 99.9% partial eclipse.

Total eclipse sequence (Photo: NASA/Aubrey Gemignani)

Total eclipse sequence (Photo: NASA/Aubrey Gemignani)

Two minutes and twenty seconds passed in totality. The moon moved on, and the sun popped back into view. We could no longer look skyward, so we watched daytime return to the land.

Then we sat in a 9-hour traffic jam as 500,000 people tried to drive from Wyoming back to Colorado all at the same time. Completely worth it.

Pura Vida

August 29th, 2017 Comments off

We were having dinner when the flashes of lightning started.

Though early August, it was still technically the rainy season in Tamarindo, Costa Rica. Verdant, lush foliage surrounded our rented mansion of a house. The 18 of us were there to celebrate Kameron’s 30th birthday — or so we thought —  and it was our first night together as a complete group. Three sides of the giant kitchen/dining/living area in the house had expansive panoramic folding glass walls that we left open during the rain. There was enough overhang that we did not get wet.

Infinity pool at Casa Alang Alang

Looking out over one of the two infinity pools towards the beach at Casa Alang Alang, our rented house in Tamarindo, Costa Rica.

The lightning’s pace became quicker and its menace deeper. Water poured off of the Tahitian-style roof of the house, some into one of the house’s several “infinity” pools, and some careening down the hill towards the beach a few hundred meters away. Soon, the sky was almost continuously lit by white flashes, and the closest ones were only a fraction of a Mississippi ahead of their stout BANGs.

I was sitting with Kameron, Casey, and Kyle, and we were enjoying the fruits of the house’s chef’s labors. Naturally, the discussion centered on Nature’s show and its ramifications. “At least the power hasn’t gone out,” Kameron observed.

Five seconds later, the power went out.

In theory, the house was supposed to have a standby generator for exactly such occasions. In practice, it did have a generator — but it refused to start. Candles were lit; ice cream was served. The lightning was all the more impressive when it had no meaningful competition from artificial lights.

Several hours later, the storm died down and the electricity came back.

Over the next week, we went surfing several times at the break in front of Tamarindo, lounged around the pools, and explored the area.  Costa Rica seemed relaxed whether we were in tourist traps or far away from any signs in English.

One exception was a delivery truck we encountered while driving back from Playa Negra to Tamarindo. The dirt road was narrow, rutted, and deeply potholed. We seldom exceeded 40 km/h in our rented Land Cruiser, but this guy seemed to be doing double that. He was all over the road; sometimes in his lane, sometimes in the oncoming lane, sometimes hugging the very edge of the shoulder. At first it seemed random, perhaps even suicidal, but gradually it became apparent that he was driving with intent. His route cleverly avoided the road’s faults, and his journey was much smoother than our own.

The biggest surprise of the trip came the morning of our second full day.

I got out of bed around sunrise and stumbled upstairs to the kitchen, half asleep and making a beeline for the coffee pot. Before I could get there, Casey and Kameron handed me a card in an envelope. “Should I open this now?” I asked, and they gave a warm response in the affirmative. The card told the story: the theme of the day was not to be a birthday celebration, as we had been expecting, but rather, a wedding! Instantly, I was awake; happiness is a powerful stimulant. I gave my congratulations to the two of them with a smile.

After spending the morning sailing on an 80ft schooner, including a stop for playing in the water in a secluded cove, we returned home for the lovely, simple, gracious, poolside wedding ceremony. In hindsight, I suppose a wedding made sense, since both sets of parents for the grooms were part of the group of 18, as was a grandmother, an aunt and uncle, a brother, and a close family friend — plus all of us who were the grooms’ more direct peers.

A delicious multi-course dinner followed, and joy abounded. A celebration of good living, past, present, and future.

How long can you run a car without an alternator?

July 16th, 2017 Comments off

A “clang-scrape-grind” noise coming from the engine bay is never a good sign; it’s even worse when it appears suddenly on a freeway off ramp. In our case, on Tyler’s 1970 MG Midget, the proximate cause was that the pulley had become very loose on the alternator’s shaft. Although we were able to resecure the pulley with a new Woodruff key and a new nut, that got us thinking:

Just how long would the Midget run without the alternator?

Rosie the MG Midget gets a bath from Tyler after enduring a lost alternator nut

Rosie the MG Midget gets a bath from Tyler after enduring a lost alternator nut

Some Googling produced no satisfying answers, so Tyler brought his Midget over to my garage and I brought out a variety of electronics test gear. Our plan: we’d carefully isolate and measure the current consumption of various subsystems in the car, we’d combine those numbers, and then we’d compare that to the charge held in the battery. Although these measurements were specifically for the Midget, they should be somewhat similar for other non-computerized, distributor-based ignitions systems.

Experimental setup

We assumed that we’e become aware rather quickly that the alternator had died and that we’d turn off any unnecessary gear. No radio, no electric fans, and certainly no headlights. No turn signals or brake lights, either.

Also, not all alternator failures are the same. With our lost bolt, the answer to “how far could we drive” would have been “a few miles,” since without the alternator there’s no tension on the belt to turn the water pump, and without the water pump, you have an overheating MG. (You might have an overheating MG even with a working water pump, but that’s what the cockpit heater is for.) Thus, for the sake of argument, let’s say that the alternator breaks in such a way that the rest of the car remains functional but the alternator is completely electrically disconnected from the rest of the car.

With all of the accessories switched off, and no computer in the picture, the current consumption is dominated by two subsystems: the ignition and the fuel pump.

Ignition

The ignition system consists of the coil, the condenser, the ignition module, the distributor, and the spark plugs. Originally, these cars came with points instead of an electronic ignition module, but they’re functionally identical for the purposes of this investigation.

A quick overview of the ignition cycle:

  1. One side of the coil is always connected to +12 V
  2. The ignition module (or points) connects the other (low) side of the coil to ground about halfway between the time of the previous spark and the time the next spark should happen
  3. Current flows through the coil
  4. The ignition module (or points) disconnects the low side of the coil
  5. The coil “doesn’t like” its current being interrupted, so it “tries” to keep it going by increasing the voltage, up to several hundred volts
  6. The secondary coil has this rising, higher voltage coupled into it (like a transformer)
  7. Since the secondary coil has more windings/turns than the primary coil, the resulting voltage on the secondary is much higher than it had been on the primary (tens of thousands of volts)
  8. The high voltage is directed to a particular spark plug by the distributor
  9. The high voltage jumps across the gap in the plug, creating a spark in the cylinder
  10. The voltage has dissipated, so the cycle repeats

A great visual explanation of this is on YouTube.

The key to understanding the current consumption of the ignition system is thus monitoring the current into the primary on the coil during the charging phase of the spark cycle.

To start, we checked the DC resistance of the primary side of the coil and found it to be 3.9 ohms. We then measured the inductance of the primary coil at 1 kHz using an LCR meter and found it to be 9.3 mH.

Next, we measured the current into the coil and ignition module by monitoring the voltage drop across a precision 10 milliohm shunt. Since we knew the voltage and the resistance, we could apply Ohm’s law to find the current through the shunt, i.e., 100 milliamps per millivolt, and thus the current being consumed by the ignition at a particular moment in time. If we observed the shunt voltage drop on an oscilloscope, we could see how the current consumption changed over time while the engine was running at, say, 1000 RPM:

Current consumption by the MG Midget ignition system at 1000 RPM

Current consumption by the MG Midget ignition system at about 1000 RPM (click to enlarge)

Notice how the current consumption does not immediately jump to its maximum level. Instead, it slowly rises in an exponential curve. This is because the primary coil is an inductor, and inductors oppose changes in current. (The rise time turns out to be roughly what we’d expect based on our earlier measurements of the primary’s inductance and series resistance.)

To compute the average current consumption of the ignition at 1000 RPM, we’ll compute the discrete integral of the current with respect to time during one spark cycle and then multiply that by the number of spark cycles per second. The result will have units of amperes and will be the average current.

To do that from the scope shot, we’ll use an approach called the “trapezoid rule” to estimate the integral over one cycle:

3.3 A * 5.4 ms / 2 + 3.3 A * 14.1 ms = 54.4 mC

We can see that each spark cycle consumes 54.4 millicoulombs of charge — most of which is wasted as heat, since the only requirement for the discharge phase of the cycle is that the current has reached its maximum value. Knowing the charge per cycle, and the cycle period, we can find the average current:

54.4 mC * 1000 / 30.4 ms = 1.8 A

Thus, the average current consumed by the ignition system at 1000 RPM is 1.8 A.

How does that change at higher engine speeds? Let’s take a look at the current consumption at 3000 RPM:

Current consumption at 3000 RPM

Current consumption at about 3000 RPM. Note how the charge consumed per spark period is lower than it was at 1000 RPM. (click to enlarge)

At 3000 RPM, the current in the primary coil just barely reaches a full 3.3 A before being discharged to create a spark. Let’s compute the charge per cycle:

3.3 A * 6.9 ms / 2 = 11.4 mC

…and then the average current:

11.4 mC * (1000 ms / s) / 10.1 ms = 1.2 A

It’s lower! Yes, the mean ignition current decreases as engine speed increases.

However, you might notice a problem. If the engine speed were to increase even more, there would no longer be enough time for the coil to reach its nominal maximum current. That would mean less current change during the discharge phase of the cycle, which would mean a lower voltage at the spark plug. Eventually, with a high enough engine speed, there wouldn’t be enough voltage for a spark — but that speed would likely be far above the point where there would be other mechanical problems, such as the valves floating.

A related problem occurs when the battery voltage diminishes. The maximum current in the coil is a function of the coil resistance and the system voltage, so as the system voltage decreases, so too will the current in the coil. As with the high engine speeds, there will eventually be a point where the current change during discharge is insufficient to generate a voltage that will jump the spark gap, and the engine will no longer run.

One more observation: the current consumption of the ignition system is independent of anything happening on the secondary/distributor side of the system. The spark plug gap, plug wires, fuel mixture? None of that matters when it comes to the current consumption of the system.

Fuel pump

The fuel pump on the MG does not run all of the time. Instead, it runs only when the fuel line pressure has dropped below a particular threshold. When the car is idling, it won’t be using much fuel, so the fuel pump will run relatively rarely. When the car is under hard acceleration, it will be using a lot of fuel, so the fuel pump will run very frequently.

To measure the current consumption of the fuel pump, we put the current shunt in series with its supply wire in the wiring harness in the passenger footwell. When the pump was active, it made a “bloop” noise, and since we’re not sure exactly what the fuel pumping rate was, that will be our unit of measure. Here’s a scope shot of the charge consumed by one bloop:

Current consumption during one 'bloop' of fuel pump run time

Current consumption during one ‘bloop’ of fuel pump run time (click to enlarge)

The approximate definite integral of the current consumption with respect to time was:

3.5 A * 42 ms + 3.5 A * 37 ms / 2 = 212 mC

At idle, there was one bloop every 6.9 seconds:

Period between fuel pump 'bloop' run times with engine at idle

Period between fuel pump ‘bloop’ run times with engine at idle (click to enlarge)

As a result, the average current consumption of the fuel pump at idle was:

212 mC / 6.9 s = 31 mA

Unfortunately, we did not directly measure the current consumption of the fuel pump while we were zipping down the highway. Fuel consumption, and thus fuel pump current consumption, depends on the load on the engine and the efficiency of the engine at the particular rotational speed. Moreover, to use the idle values as a reference point, we’d need to know the power being produced by the engine at idle and the power required to maintain a particular speed.

After some investigation, we decided that a reasonable upper bound for traveling at highway speeds would be 10 times the fuel consumption at idle. That means the fuel pump would need to bloop ten times as often, which would make the mean current consumption:

31 mA * 10 = 310 mA

Given the scale of the fuel pump current consumption relative to the ignition, this is likely to be a sufficient estimate as long as we believe we’re within an order of magnitude of the actual number.

Other

In theory, the ignition and the fuel pump should have been the only things drawing power with the lights, electric fans, and radio off. However, when we checked the overall current consumption of the car by placing the ammeter in series with the battery, with the fuel pump and ignition disconnected and the car’s key in the “run” position, we found an additional average load of 600 mA.

At the time, we didn’t have an explanation for that. However, upon further reflection, I now believe it was an artifact of our experimental setup.

You see, we didn’t actually disconnect the alternator during these measurements. That wouldn’t matter for most things (other than keeping the voltage slightly higher and more stable than it otherwise would be), but it would matter when measuring the overall quiescent current drain of the car. The reason is that the alternator requires a non-trivial amount of current to keep its field coil energized. In our experimental premise, we stated that the alternator would be completely disconnected from the rest of the car’s electrical system, so the field coil current wouldn’t be a factor.

However, in a real-world situation, depending on the nature of the alternator failure, it would be possible for the alternator to fail to produce usable current but still be drawing current for its field coil. If you think that’s important, feel free to add it back in to the battery-life calculations below.

Combined average drain

Since a motionless running car isn’t much good, let’s assume that we’re going to drive on a highway with an engine speed of 3000 RPM. We simply sum the average ignition current for that speed and our estimated average fuel pump current to find our overall average:

1.2 A + 0.3 A = 1.5 A

Great! That equates to about 20 W, or less than a turn signal bulb.

Battery

Now that we know our average current drain, we need to figure out how long the battery can sustain that level of current without being charged by the alternator.

The battery in a 1970 MG Midget is a Group 51R lead-acid battery. Most brands in that size seem to have similar performance, so let’s use a Duralast for our calculations. The Group 51R Duralast has a specified “reserve capacity” of 75 minutes. That’s the amount of time that a fully charged battery will support a 25 A load before dropping below 10.5 V. We need amp-hours, which we can find using:

75 min * (1 hr / 60 min) * 25 A = 35.1 A-hr

Under the light loads we’re considering here, a 12 V lead-acid car battery’s voltage is “falling off a cliff” by the time it hits 10.5 V, so 35.1 A-hr really is about the most usable charge we can expect to extract.

Putting it all together

With those calculations done, we can find how long we can drive! Simply divide the amp-hour capacity of the battery by the current being drawn by the ignition and fuel pump to determine the number of hours of run time:

35.1 A-hr / 1.5 A = 23.4 hours

Wow, almost a day!

That’s assuming, of course, that you don’t have your headlights on, which is going to be tough if you want to drive that long. With the headlights on, your current consumption will increase by about 10 A, so your overall average consumption would be:

1.5 A + 10 A = 11.5 A

…and thus the amount of time you could run on battery alone with your headlights on would be:

35.1 A-hr / 11.5 A = 3 hours

Still lots of time, but a good incentive to take a direct route home.

Improvement in PCB skills

July 7th, 2017 Comments off

About a year and a half has gone by since I wrote about my experience making a cheap PCB, and I’m happy to report that I’ve progressed considerably in the art since then. In fact, when I go back now and look at that design and read that post, I can’t help but cringe a little bit. A part of me finds it difficult to believe that I was so naive so recently. However, I’m glad I wrote that post, and I plan to leave it up, because seeing it serves as a reminder that I am still learning, and moreover, it acts as a check on my ego: I don’t know everything.

As with most things in life, the hardest part was doing it the first time. The half-dozen or so PCBs I’ve designed since then have become increasingly capable and yet more straightforward. They have gained a certain elegance (to my eye) that was completely lacking from my first attempt. I’m beginning to understand what makes a PCB beautiful, and I’m starting to get a handle on creating beautiful designs myself.

The design I am most pleased with at the moment is a board for my project making the old NES game Duck Hunt work on modern LCD TVs. The board matches the form of the board originally found in the Nintendo Zapper (the “light gun”), except with more computing power than the NES itself possesses. The old PCB is removed from the Zapper, and this one is installed in its place.

Replacement board for the NES Zapper to make Duck Hunt work on an LCD TV

Replacement board I designed for the NES Zapper to make Duck Hunt work on an LCD TV

The board features mostly surface-mount construction, some fancy analog circuitry to condition the signal from the photodiode, and a microcontroller to do all of the heavy lifting. The output is a signal that appears to the NES like the one that came from an unmodified Zapper.

As I’ve said before, I like to look back at myself on a rolling six-month basis and see improvement. If I don’t think that my old self from six months prior was at least a little naive and stupid, relative to my present-day self, then I haven’t been learning enough. I’m happy to say that I’ve met that standard in my circuit design and PCB skills.

Elk hunt

October 28th, 2016 Comments off

I’ll admit: when Tyler and I went elk hunting last year in western Colorado, we were a bit under-prepared. It’s probably a good thing that we didn’t harvest an elk then. Even the mule deer buck that we saw — but didn’t take, lacking a deer tag as we were — would have been a challenge to handle properly. This year was different.

This year, we had more firepower: two rifles instead of one. This year, we had a better season: “1st Rifle” instead of the much later and higher-trafficked “3rd Rifle”. This year, we had a better spot: near Yampa, Colorado in a game unit (GMU 231) with a history of excellent success rates.

Perhaps most important of all, this year we had more time. Whereas last year had been a quick overnight, this year we spent three days in the country.

That time began with a three hour drive from Denver, lunch at a small-town diner in Yampa that had friendly bad service, and a drive deep into the nearby Routt National Forest. Once we’d set up camp — just a tent, none of that RV nonsense — we set out for a late-afternoon hike.

Rifles in hand, orange on our heads and backs, we began trudging cross-country through the forest. The goal was to reach a series of clearings that had appeared on satellite images of the area, connect with a trail near the Flat Tops Wilderness boundary line, and continue pushing to higher elevations in the wilderness in search of bull elk. Very little snow had fallen that season, and daytime highs were still in the 60s, so we thought the elk were still likely to be up high.

We hiked, and the hours sped by. No elk.

Despite a lack of animals, there was an abundance of elk sign. Scat and tracks littered the ground, much of it appearing to be relatively new. We felt optimistic we were going to find a big bull every time we glassed a new clearing. That optimism continued right up until twilight and the end of legal hunting for the day, but the only woodland mammal we had seen was a porcupine. We began the multi-mile hike back down the mountain and out of the wilderness towards our camp. The increasing darkness was a bad time to discover that my headlamp batteries were nearly dead.

Flat Tops Wilderness at sunset

Flat Tops Wilderness at sunset, about 10500 ft in elevation and several miles into the hunt

Fortunately, Tyler’s headlamp was bright, so he led the way on the trail. As the first hour of the return journey bled into the second hour, I felt myself becoming increasingly drained. That was compounded once we exited the forest on a road and found ourselves still over a mile from our tent. The wind hadn’t been noticeable in the forest, but once on the road, the 30-50 mph gusts were strong enough to send my hat flying off of my head. Oh — and the road to camp was uphill the entire way.

By the time we made it back to camp, elkless and hours after nightfall, I was so exhausted that I didn’t even want to eat dinner. All I wanted to do was crawl into my sleeping bag and shut my eyes. Lucky for me that Tyler had the presense of mind and stamina to make burritos and tea. Hot food and drinks have an amazing way of reinvigorating the body, and I felt immensely better afterward.

It’s probably for the best that we didn’t take an elk that evening; it would have been a very late night, and stamina would have been an issue.

The winds shook the tent through the night, and their howling was punctuated by occasional sharp crashes as nearby trees and branches thundered to the ground. Sleep was minimal.

Yet, once 5:00 a.m. arrived, it was not particularly hard to get going. Yes, we were both sore, but we were also excited for the possibility of a successful hunt. Oatmeal and tea served as a quick breakfast, and then we drove my Outback down the road a ways to try a different spot. We were hiking in before sunrise.

After following a trail through the forest for a couple of miles, we found a multi-acre clearing on a grassy steep hill, so we left the trail to investigate. About 100 yards up the hill from the trail, we sat down on some rocks to glass the area; that location offered not only a view of most of the clearing but also of nearby ponds and more distant fields. Several quiet minutes went by before Tyler quietly yet excitedly whispered “Look!” and pointed to a mule deer. The young buck was about 150 yards away in the clearing and was moving uphill. He stopped for a moment, broadside to us, and then continued. Not long after that, several orange hats became visible in the woods; perhaps the buck had caught wind of those hunters and been pushed away from them.

We hunted some more in the immediate area before starting the hour-long hike back to the car for some lunch. All the way back, friendly sunshine was interspersed with angry dark clouds, but nothing save for a few flurries fell, and the temperature remained pleasantly cool. We took lunch in camp chairs by the car and packed up when the sun seemed unlikely to come back for the day.

Snow began to fall. Warmer jackets came out. We drove to the end of the road, Stillwater Reservoir, to start an afternoon hunt.

On the drive there, we had a brush with calamity. I was taking the washboarded dirt road a little — ahem — quickly, and an unexpectedly large bump suddenly jarred Sam. The TPMS light instantly lit up on the dashboard. A walk around the car showed no obvious problems except for the passenger-rear tire having a somewhat lower pressure than the others. I decided to check it again in a few minutes and drove on.

The snow was starting to accumulate by the time we made it to our trailhead. We decided to take only one rifle, my stainless steel Weatherby .308, since the other rifle, a 7mm Rem Mag, was not stainless and would thus be more vulnerable to rust. Thus equipped, we set off on the trail, which followed the reservoir for a short while before turning uphill into the wilderness.

Tyler looking across a lake during the hunt

It was a really nice hike, and it was easy to explore areas off of the trail, but we saw exactly zero animals of any sort. In hindsight, they were probably hunkered down out of the snow. Just before the Devil’s Causeway, we turned around. The snow was coming down in earnest by that point; our tracks from the hike up were quickly becoming nearly invisible.

Back at the car, Sam’s tire had lost a little more air, but not too much, so I felt comfortable driving back to camp.

It was a properly cold night. Inside the tent, it remained just above freezing, but it was probably in the mid-20s outside. In the morning, Tyler and I lazily let dawn arrive before mustering the courage to get out of our warm sleeping bags and greet the day. Around that time, we heard the sharp crack of a rifle shot. It would be the only one we would hear on the entire trip.

With the temperature low and having hunted the nearby terrain already, we struck camp and headed back into town for breakfast at the diner.

When we walked in, it was obvious we weren’t the only ones with that idea. Pretty much every head in the place was covered with a blaze orange hat. Service was again friendly-bad, and I’m not sure a big-city health inspector would have been thrilled with their methods, but it was a nice change of pace from camping.

On the way out, we struck up a conversation with an older hunter who seemed to have some experience with the area. It seems that we weren’t the only ones to get skunked. According to him, in previous years his friends had filled their tags on the first day in that unit, but something was different this year. He hadn’t seen anything, and while his friends had seen an elk or two, they had apparently missed shots on their only opportunities. I felt a bit better knowing that the problems weren’t unique to us.

Still would have been nice to get an elk though. Next year!