On August 21, 2017, the moon will cast its shadow across most of North America, with a narrow path of totality tracing from Oregon to South Carolina. Tens of millions of people will have a chance to see something that the continental US hasn’t seen in ages — a total eclipse of the sun. Will you be ready?
The last time a total solar eclipse visited a significantly populated section of the US was in March of 1970. I remember it well as a four-year-old standing on the sidewalk in front of my house, all worked up about space already in those heady days of the Apollo program, gazing through smoked glass as the moon blotted out the sun for a few minutes. Just watching it was exhilarating, and being able to see it again and capitalize on a lifetime of geekiness to heighten the experience, and to be able to share it with my wife and kids, is exciting beyond words. But I’ve only got eight months to lay my plans! Continue reading “Get Ready For The Great Eclipse Of 2017”→
Rotary encoders are great devices. Monitoring just a few pins you can easily and quickly read in rotation and direction of a user input (as well as many other applications). But as with anything, there are caveats. I recently had the chance to dive into some of the benefits and drawbacks of rotary encoders and how to work with them.
I often work with students on different levels of electronic projects. One student project needed a rotary encoder. These come in mechanical and optical variants. In a way, they are very simple devices. In another way, they have some complex nuances. The target board was an ST Nucleo. This particular board has a small ARM processor and can use mbed environment for development and programming. The board itself can take Arduino daughter boards and have additional pins for ST morpho boards (whatever those are).
The mbed system is the ARM’s answer to Arduino. A web-based IDE lets you write C++ code with tons of support libraries. The board looks like a USB drive, so you download the program to this ersatz drive, and the board is programmed. I posted an intro to mbed awhile back with a similar board, so if you want a refresher on that, you might like to read that first.
Reading the Encoder
The encoder we had was on a little PCB that you get when you buy one of those Chinese Arduino 37 sensor kits. (By the way, if you are looking for documentation on those kinds of boards, look here.; in particular, this was a KY-040 module.) The board has power and ground pins, along with three pins. One of the pins is a switch closure to ground when you depress the shaft of the encoder. The other two encode the direction and speed of the shaft rotation. There are three pull-up resistors, one for each output.
I expected to explain how the device worked, and then assist in writing some code with a good example of having to debounce, use pin change interrupts, and obviously throw in some other arcane lore. Turns out that was wholly unnecessary. Well… sort of.
It is said that “success has many fathers, but failure is an orphan.” Given the world-changing success of radio in the late 19th and early 20th centuries, it’s no wonder that so many scientists, physicists, and engineers have been credited with its invention. The fact that electromagnetic radiation is a natural phenomenon that no one can reasonably claim to have invented sometimes seems lost in the shuffle to claim the prize.
But it was exactly through the study of natural phenomena that one of the earliest pioneers in radio research came to have a reasonable claim to at least be the inventor of the radio receiver, well before anyone had learned how to reliably produce electromagnetic waves. This is the story of how a Russian physicist harnessed the power of lightning and became one of the many fathers of radio.
Normally, when something explodes it tends to be a bad day for all involved. But not every explosion is intended to maim or kill. Plenty of explosions are designed to save lives every day, from the highway to the cockpit to the power grid. Let’s look at some of these pyrotechnic wonders and how they keep us safe.
Explosive Bolts
The first I can recall hearing the term explosive bolts was in relation to the saturation TV coverage of the Apollo launches in the late 60s and early 70s. Explosive bolts seemed to be everywhere, releasing umbilicals and restraining the Saturn V launch stack on the pad. Young me pictured literal bolts machined from solid blocks of explosive and secretly hoped there was a section for them in the hardware store so I could have a little fun.
Pyrotechnic fasteners are mechanical fasteners (bolts, studs, nuts, etc.) that are designed to fail in a predictable fashion due to the detonation of an associated pyrotechnic device. Not only must they fail predictably, but they also have to be strong enough to resist the forces they will experience before failure is initiated. Failure is also typically rapid and clean, meaning that no debris is left to interfere with the parts that were previously held together by the fastener. And finally, the explosive failure can’t cause any collateral damage to the fastened parts or nearby structures.
Pyrotechnic fasteners fall into two broad categories. Explosive bolts look much like regular bolts, and are machined out of the same materials you’d expect to find any bolt made of. The explosive charge is usually internal to the shank of the bolt with an initiating device of some sort in the head. To ensure clean, predictable separation, there’s a groove machined into the bolt to create a shear plane.
Frangible nuts are another type of pyrotechnic fastener. These tend to be used for larger load applications, like holding down rockets. Frangible nuts usually have two smaller threaded holes adjacent to the main fastener thread; pyrotechnic booster charges split the nut across the plane formed by the threaded holes to release the fastener cleanly.
“Eject! Eject! Eject!”
Holding back missiles is one thing, but where pyrotechnic fasteners save the most lives might be in the cockpits of fighter jets around the world. When things go wrong in a fighter, pilots need to get out in a hurry. Strapping into a fighter cockpit is literally sitting on top of a rocket and being surrounded by explosives. Most current seats are zero-zero designs — usable at zero airspeed and zero altitude — that propel the seat and pilot out of the aircraft on a small rocket high enough that the parachute can deploy before the pilot hits the surface. Dozens of explosive charges take care of ripping the aircraft canopy apart, deploying the chute, and cutting the seat free from the parachuting pilot, typically unconscious and a couple of inches shorter from spinal disc compression after his one second rocket ride.
There’s little doubt that airbags have saved countless lives since they’ve become standard equipment in cars and trucks. When you get into a modern vehicle, you are literally surrounded by airbags — steering wheel, dashboard, knee bolsters, side curtains, seatbelt bags, and even the rear seat passenger bags. And each one of these devices is a small bomb waiting to explode to save your life.
When we think of explosives we tend to think of substances that can undergo rapid oxidation with subsequent expansion of hot gasses. By this definition, airbag inflators aren’t really explosives, since they are powered by the rapid chemical decomposition of nitrogenous compounds, commonly sodium azide in the presence of potassium nitrate and silicon dioxide. But the difference is purely academic; anyone who has ever had an airbag deploy in front of them or watched any of the “hold my beer and watch this” airbag prank video compilations will attest to the explosive power held in that disc of chemicals.
When a collision is detected by sensors connected to the airbag control unit (ACU), current is applied to an electric match, similar to the engine igniters used in model rocketry, buried within the inflator module. The match reaches 300°C within a few milliseconds, causing the sodium azide to rapidly decompose into nitrogen gas and sodium. Subsequent reactions mop up the reactive byproducts to produce inert silicate glasses and add a little more nitrogen to the mix. The entire reaction is complete in about 40 milliseconds, and the airbags inflate fully within 80 milliseconds, only to deflate again almost instantly through vent holes in the back of the bag. By the time you perceive that you were in an accident, the bag hangs limply from the steering wheel and with any luck, you get to walk away from the accident.
Grid Down
We’ve covered a little about utility poles and all the fascinating bits of gear that hang off them. One of the pieces of safety gear that lives in the “supply space” at the top of the poles is the fuse cutout, or explosive disconnector. This too is a place where a small explosion can save lives — not only by protecting line workers but also by preventing a short circuit from causing a fire.
Cutouts are more than just fuses, though. Given the nature of the AC transmission and distribution grid, the lines that cutouts protect are at pretty high voltages of 11 kV or more. That much voltage means the potential for sustained arcing if contacts aren’t rapidly separated; the resulting plasma can do just as much if not more damage than the short circuit. So a small explosive cartridge is used to rapidly kick the fuse body of a cutout out of the frame and break the circuit as quickly as possible. Arc suppression features are also built into the cutout to interrupt the arc before it gets a chance to form.
[Big Clive] recently did a teardown of another piece of line safety gear, an 11 kV lightning arrestor with an explosive disconnector. With a Dremel tool and a good dose of liquid courage, he liberated a carbon slug from within the disconnector, which when heated by a line fault ignites a .22 caliber charge similar to those used with powder actuated fastener tools. The rapid expansion of gasses ruptures the cases of the disconnector and rapidly breaks the circuit.
Conclusion
We’ve covered a few of the many ways that the power of expanding gas can be used in life safety applications. There are other ways, too — snuffing out oil field fires comes to mind, as does controlled demolition of buildings. But the number of explosives protecting us from more common accidents is quite amazing, all the more so when you realize how well engineered they are. After all, these everyday bombs aren’t generally blowing up without good reason.
In my particular case I am testing a new output matching transformer design for an audio preamplifier and using one of my go to driver circuit designs. Very stable, and very reliable. Wack it together and off you go to test and measurement land without a care in the world. This particular transformer is designed to be driven with a class A amplifier operating at 48 volts in a pro audio setting where you turn the knobs with your pinky in the air sort of thing. Extra points if you can find some sort of long out of production parts to throw in there for audiophile cred, and I want some of that.
Lets use some cool retro transistors! I merrily go along for hours designing away. Carefully balancing the current of the long tailed pair input. Picking just the right collector power resistor and capacitor value to drive the transformer. Calculating the negative feedback circuit for proper low frequency cutoff and high frequency stability, and into the breadboard the parts go — jumper clips, meter probes, and test leads abound — a truly joyful event.
All of the voltages check out, frequency response is what you would expect, and a slight tweak to the feedback look brought everything right into happiness. Time to fire up the trusty old HP 334A Distortion Analyzer. Those old machines require you to calibrate the input circuit and the volt meter, tune a filter to the fundamental frequency you are applying to the device under test and step down to lower and lower orders of distortion levels until the meter happily sits somewhere in the middle of a range.
Most modern circuits in even cheap products just go right down to sub .1% total harmonic distortion levels without even a thought and I expected this to be much the same. The look of horror must have been pronounced on my face when the distortion level of my precious circuit was something more akin to a clock radio! A frantic search began. Was it a bad jumper, or a dirty lead in the breadboard, or an unseated component? Was my function generator in some state of disrepair? Is the Stephen King story Maximum Overdrive coming true and my bench is going to eat me alive? All distinct possibilities in this state of panic.
At this point, the internet is crawling with butt-kicking homebrew 3D printers made with extruded profiles, but it’s easy to underestimate the difficulty in getting there. Sure, most vendors sell a suite of interlocking connectors, but how well do these structural framing systems actually fare when put to the task of handling a build with sub-millimeter tolerances?
I’ve been playing around with these parts for about two years. What I’ve found is that, yes, precise and accurate results are possible. Nevertheless, those results came to me after I failed and–dry, rinse, repeat–failed again! Only after I understood the limits of both the materials and assembly processes was I able to deliver square, dimensionally accurate gantries that could carry a laser beam around a half-square-meter workbed. That said, I wrote a quick guide to taming these beasts. Who are they? What flavors do they come in? How do we achieve those precision results? Dear reader, read on.
Neon lights are that kind of nostalgic item that everybody seems to love. The neon lamp is a type of gas discharge lamp, they generate light when an electrical discharge travels through an ionized gas, or plasma. When the voltage between the electrodes exceeds certain threshold, the gas ionizes and begins conducting electricity. The basic process that generates light is the return of the ions to the ground energy state, with the emission of a photon of light. The light color depends on the emission spectra of the atoms in the gas, and also on the gas pressure, among other variables. Gas discharge lamps can be classified by the pressure of the gas:
Low pressure: includes the neon lamp, fluorescent lamps and low pressure sodium lamps.
High pressure: such as the metal halide, high pressure sodium and mercury vapor lamps.
Another classification comes from the heating method of the cathode:
Hot cathode lamps: the electric arc between the electrodes is created via thermionic emission, where electrons are expelled from the electrodes because of the high temperature.
Cold cathode lamps: In these, the electric arc results from the high voltage applied between the electrons, that ionizes the gas and conduction can take place.
High intensity lamps are another type of gas discharge lamp where a high power arc is formed between tungsten electrodes. Power levels of several kilowatts can be easily produced this type of lamp. Of course we can’t forget to mention nixie tubes, which are a type of cold cathode neon lamp, popular for building retro clocks. Fortunately, they are now in production again.