Hacking When It Counts: Churchill’s Toy Shop

Nothing brings out the worst in humanity like war. Perversely, war also seems to exert an opposite if not equal force that leads to massive outbursts of creativity, the likes of which are not generally seen during times of peace. With inhibitions relaxed and national goals to meet, or in some cases where the very survival of a people is at stake, we always seem to find new and clever ways to blow each other to smithereens.

The run-up to World War II was a time where almost every nation was caught on its heels, and the rapidity of events unfolding across Europe and in Asia demanded immediate and decisive response. As young men and women mobilized and made ready for war, teams of engineers, scientists, and inventors were pressed into service to develop the weapons that would support them. For the British, these “boffins” would team up under a directorate called Ministry of Defence 1, or MD1. Informally, they’d be known as “Churchill’s Toy Shop,” and the devices they came up with were deviously clever hacks.

Continue reading “Hacking When It Counts: Churchill’s Toy Shop”

How Current Shunts Work

Current. Too little of it, and you can’t get where you’re going, too much and your hardware’s on fire. In many projects, it’s desirable to know just how much current is being drawn, and even more desirable to limit it to avoid catastrophic destruction. The humble current shunt is an excellent way to do just that.

Ohm’s Law.

To understand current, it’s important to understand Ohm’s Law, which defines the relationship between current, voltage, and resistance. If we know two out of the three, we can calculate the unknown. This is the underlying principle behind the current shunt. A current flows through a resistor, and the voltage drop across the resistor is measured. If the resistance also is known, the current can be calculated with the equation I=V/R.

This simple fact can be used to great effect. As an example, consider a microcontroller used to control a DC motor with a transistor controlled by a PWM output. A known resistance is placed inline with the motor and, the voltage drop across it measured with the onboard analog-to-digital converter. With a few lines of code, it’s simple for the microcontroller to calculate the current flowing to the motor. Armed with this knowledge, code can be crafted to limit the motor current draw for such purposes as avoiding overheating the motor, or to protect the drive transistors from failure.

In fact, such strategies can be used in a wide variety of applications. In microcontroller projects you can measure as many currents as you have spare ADC channels and time. Whether you’re driving high power LEDs or trying to build protection into a power supply, current shunts are key to doing this.

Continue reading “How Current Shunts Work”

Quantum Searching In Your Browser

If you’ve made it through the last two posts on quantum computing (QC), then you’ve seen the Quirk simulator, a little of IBM’s web-based offering, and how entanglement and superposition can do strange and possibly wonderful things. However, the superdense encoding I showed you didn’t really feel like a real computer algorithm. This time we will look at Grover’s algorithm which is often incorrectly billed as an “unstructured database search.” In reality, it is an algorithm for making a state — that is a set of qubits — match some desired state without simply setting the state.

By analogy, consider a web service where you guess a number. Most discussions of Grover’s algorithm will tell you that the service will only tell you if the number is correct or not. If the number was from 1 to 16, using traditional computing, you’d have to query the values one at a time to see which is correct. You might get lucky and hit the first time. Or it might take 16 times. With qubits you can get the same result in only four attempts. In fact, if you try more times, you might get the wrong answer. Of course, what you really get is an answer that is probably correct, because that how QC works.

Continue reading “Quantum Searching In Your Browser”

Quantum Communications In Your Browser

Quantum computing (QC) is a big topic, and last time I was only able to walk you through the construction of a few logic gates, but you have to start somewhere. If you haven’t read that part, you probably should, because you’ll need to understand the simulator I’m using and some basic concepts.

I like to get right into practice, but with this topic, there’s no avoiding some theory. But don’t despair. We’ll have a little science fiction story you can try by the end of this installment, where we manage to pack two bits of information into a single physical qubit. Last time I mentioned that qubits have 1 and 0 states and I hinted that they were really |1> and |0> states. Why create new names for the two normal binary states? Turns out there is more to the story.

What’s the Vector, Victor?

In Dirac notation, |1> is a vector. So is |hackaday> and |123>. You can get into a lot of math with these, but I’m going to try to avoid most of that. This is also called ket notation (the last part of the word bracket) so you’ll hear people say “one ket” or “hackaday ket.” Either way, the vector can represent one or more qubits and there are several ways to represent them.

Continue reading “Quantum Communications In Your Browser”

Jill Tarter: Searching For E.T.

What must it be like to devote your life to answering a single simple but monumental question: Are we alone? Astronomer Jill Tarter would know better than most what it’s like, and knows that the answer will remain firmly stuck on “Yes” until she and others in the Search for Extraterrestrial Intelligence project (SETI) prove it otherwise. But the path she chose to get there was an unconventional as it was difficult, and holds lessons in the power of keeping you head down and plowing ahead, no matter what.

Endless Hurdles

To get to the point where she could begin to answer the fundamental question of the uniqueness of life, Jill had to pass a gauntlet of obstacles that by now are familiar features of the biography of many women in science and engineering. Born in 1944, Jill Cornell grew up in that postwar period of hope and optimism in the USA where anything seemed possible as long as one stayed within established boundaries. Girls were expected to do girl things, and boys did boy things. Thus, Jill, an only child whose father did traditional boy things like hunting and fixing things with her, found it completely natural to sign up for shop class when she reached high school age. She was surprised and disappointed to be turned down and told to enroll in “Home Economics” class like the other girls.

Doing “boy things” with Dad. Source: SETI Institute

She eventually made it to shop class, but faced similar obstacles when she wanted to take physics and calculus classes. Her guidance counselor couldn’t figure why a girl would need to take such classes, but Jill persisted and excelled enough to get accepted to Cornell, the university founded by her distant relation, Ezra Cornell. Jill applied for a scholarship available to Cornell family members; she was turned down because it was intended for male relatives only.

Undeterred, Jill applied for and won a scholarship from Procter & Gamble for engineering, and entered the engineering program as the only woman in a class of 300. Jill used her unique position to her advantage; knowing that she couldn’t blend into the crowd like her male colleagues, she made sure her professors always knew who she was. Even still, Jill faced problems. Cornell was very protective of their students in those days, or at least the women; they were locked in their dorms at 10:00 each night. This stifled her ability to work on projects with the male students and caused teamwork problems later in her career.

No Skill is Obsolete

Despite these obstacles, Jill, by then married to physics student Bruce Tarter, finished her degree. But engineering had begun to bore her, so she changed fields to astrophysics for her post-graduate work and moved across the country to Berkeley. The early 70s were hugely inspirational times for anyone with an eye to the heavens, with the successes of the US space program and leaps in the technology available for studies the universe. In this environment, Jill figured she’d be a natural for the astronaut corps, but was denied due to her recent divorce.

Disappointed, Jill was about to start a research job at NASA when X-ray astronomer Stu Boyer asked her to join a ragtag team assembled to search for signs of intelligent life in the universe. Lacking a budget, Boyer had scrounged an obsolete PDP-8 from Berkeley and knew that Jill was the only person who still knew how to program the machine. Jill’s natural tendency to fix and build things began to pay dividends, and she would work on nothing but SETI for the rest of her career.

From the Bureaucratic Ashes

At Arecibo. Source: KQED Science

SETI efforts have been generally poorly funded over the years. Early projects were looked at derisively by some scientists as science fiction nonsense, and bureaucrats holding the purse strings rarely passed up an opportunity to score points with constituents by ridiculing efforts to talk to “little green men.” Jill was in the thick of the battles for funding, and SETI managed to survive. In 1984, Jill was one of the founding members of the SETI Institute, a private corporation created to continue SETI research for NASA as economically as possible.

The SETI Institute kept searching the skies for the next decade, developing bigger and better technology to analyze data from thousands of frequencies at a time from radio telescopes around the world. But in 1993, the bureaucrats finally landed the fatal blow and removed SETI funding from NASA’s budget, saving taxpayers a paltry $10 million. Jill and the other scientists kept going, and within a year, the SETI Institute had raised millions in private funds, mostly from Silicon Valley entrepreneurs, to continue their work.

Part of the Allen Telescope Array. Source: SETI Institute

The Institute’s Project Phoenix, of which Jill was Director until 1999, kept searching for signs of life out there until 2004, with no results. They proposed an ambitious project to improve the odds — an array of 350 radio telescopes dedicated to SETI work. Dubbed the Allen Telescope Array after its primary patron, Microsoft co-founder Paul Allen, the array has sadly never been completed. But the first 42 of the 6-meter dishes have been built, and the ATA continues to run SETI experiments every day.

Jill Tarter retired as Director of SETI Research for the Institute in 2012, but remains active in the SETI field. Her primary focus now is fundraising, leveraging not only her years of contacts in the SETI community but also some of the star power she earned when it became known that she was the inspiration for the Ellie Arroway character in Carl Sagan’s novel Contact, played by Jodie Foster in the subsequent Hollywood film.

Without a reasonable SETI program, the answer to “Are we alone?” will probably never be known. But if it is answered, it’ll be thanks in no small part to Jill Tarter and her stubborn refusal to stay within the bounds that were set for her.

Quantum Weirdness In Your Browser

I’ll be brutally honest. When I set out to write this post, I was going to talk about IBM’s Q Experience — the website where you can run real code on some older IBM quantum computing hardware. I am going to get to that — I promise — but that’s going to have to wait for another time. It turns out that quantum computing is mindbending and — to make matters worse — there are a lot of oversimplifications floating around that make it even harder to understand than it ought to be. Because the IBM system matches up with real hardware, it is has a lot more limitations than a simulator — think of programming a microcontroller with on debugging versus using a software emulator. You can zoom into any level of detail with the emulator but with the bare micro you can toggle a line, use a scope, and hope things don’t go too far wrong.

So before we get to the real quantum hardware, I am going to show you a simulator written by [Craig Gidney]. He wrote it and promptly got a job with Google, who took over the project. Sort of. Even if you don’t like working in a browser, [Craig’s] simulator is easy enough, you don’t need an account, and a bookmark will save your work.

It isn’t the only available simulator, but as [Craig] immodestly (but correctly) points out, his simulator is much better than IBM’s. Starting with the simulator avoids tripping on the hardware limitations. For example, IBM’s devices are not fully connected, like a CPU where only some registers can get to other registers. In addition, real devices have to deal with noise and the quantum states not lasting very long. If your algorithm is too slow, your program will collapse and invalidate your results. These aren’t issues on a simulator. You can find a list of other simulators, but I’m focusing on Quirk.

What Quantum Computing Is

As I mentioned, there is a lot of misinformation about quantum computing (QC) floating around. I think part of it revolves around the word computing. If you are old enough to remember analog computers, QC is much more like that. You build “circuits” to create results. There’s also a lot of difficult math — mostly linear algebra — that I’m going to try to avoid as much as possible. However, if you can dig into the math, it is worth your time to do so. However, just like you can design a resonant circuit without solving differential equations about inductors, I think you can do QC without some of the bigger math by just using results. We’ll see how well that holds up in practice.

Continue reading “Quantum Weirdness In Your Browser”

Space Escape: Flying A Chair To Lunar Orbit

In the coming decades, mankind will walk on the moon once again. Right now, plans are being formulated for space stations orbiting around Lagrange points, surveys of lava tubes are being conducted, and slowly but surely plans are being formed to build the hardware that will become a small scientific outpost on our closest celestial neighbor.

This has all happened before, of course. In the early days of the Apollo program, there were plans to launch two Saturn V rockets for every moon landing, one topped with a command module and three astronauts, the other one containing an unmanned ‘LM Truck’. This second vehicle would land on the moon with all the supplies and shelter for a 14-day mission. There would be a pressurized lunar rover weighing thousands of pounds. This wouldn’t exactly be a Lunar colony, instead, it would be more like a small cabin in the Arctic used as a scientific outpost. Astronauts and scientists would land, spend two weeks researching and exploring, and return to Earth with hundreds of pounds of samples.

With this, as with all Apollo landings, came a risk. What would happen if the ascent engine didn’t light? Apart from a beautiful speech written by William Safire, there was nothing concrete for astronauts consigned to the deepest of the deep. Later in the Apollo program, there was a plan for real hardware to bring stranded astronauts home. This was the Lunar Escape System (LESS), basically two chairs mounted to a rocket engine.

While the LESS was never built, several studies were completed in late 1970 by North American Rockwell detailing the hardware that would return two astronauts from the surface of the moon. It involved siphoning fuel from a stricken Lunar Module, flying to orbit with no computer or really any instrumentation at all, and performing a rendezvous with an orbiting Command Module in less than one Lunar orbit.

Continue reading “Space Escape: Flying A Chair To Lunar Orbit”