The STEMpunk Project: Basic Electrical Components

Circuits can be things of stupefying power and complexity, responsible for everything from changing channels on t.v. to controlling spacecraft as they exit the outer boundaries of the solar system.

But for all that, there are a handful of basic components found in very nearly every circuit on the planet. An understanding of these components can go a long way toward making electronics more comprehensible.


Resistors have the charming quality of doing exactly what their name implies, i.e. they resist the flow of electrons in a circuit. This is useful for keeping LEDs within acceptable ranges so they light up but don’t blow out, for creating voltage dividers for use in resistive components like photocells or flex sensors, and for incorporating things like buttons into circuits through the use of pull-up resistors.


  1. Sparkfun’s resistor tutorial is carefully done and is the source of the examples of resistors cited in the above paragraph.
  2. Resistorguide’s thorough exploration of resistors is notable for its discussion of different kinds of resistors and the pros and cons of using each.
  3. This ScienceOnline tutorial carefully walks through how to interpret the colored bands found on most resistors, and demonstrates the effect on an LED’s brightness of running the same current through different resistors. It also notes that graphite is similar to the material used to make resistors, and does two fascinating little experiments with pencil marks on paper acting as a resistor in a circuit.
  4. GreatScott’s resistor video repeats much of the information in the other videos but succinctly explains what pull-up and pull-down resistors are.


Capacitors come in a wide variety of styles — ceramic disk, polyfilm, electrolytic — but all are designed to exploit properties of electromagnetic fields to store electrical charge. They are built by separating two conductive plates either with space or with a nonconducting material called a dielectric. When current is applied to a circuit with a capacitor, negative charge piles up on one plate. The dielectric won’t conduct electricity but it can support an electric field, which gets stronger as electrons accrue on one side of the capacitor. This causes positive charges to gather on the other plate, and the electric field between the positively- and negatively-charged plates stores a proportional amount of power, which can later be discharged.


  1. Collin Cunningham elucidates capacitors by ripping one apart, delving briefly into their history, and then constructing one from a pill bottle and some aluminum foil.
  2. HumanHardDrive approaches capacitors and capacitance from a theoretical standpoint, delving into the chemistry and math involved.
  3. Eugene Khutoryansky offers an even more granular look at what’s going on inside capacitors.


Like capacitors, inductors store electrical energy. A typical inductor will be made up of metal wire wrapped around something like an iron bar. When current is applied to an inductor a magnetic field begins to build and when current is cut off it begins to disintegrate. As a rule magnetic fields don’t like changing, so the generated field resists the initial increase in current and the later decrease in current. Once current levels off, however, the inductor will act like a normal wire for as long as the current doesn’t change.

As I wrote about in “The STEMpunk Project: Literally Reducing a (Black) Box“, inductor motors exploit these electromagnetic properties to generate torque for applications like spinning fan blades.


  1. Eugene Khutoryansky does another fantastic job in his video on the behavior of inductors in a circuit.
  2. Afrotechmods spends a lot of time demonstrating how current changes in response to different inductance values.


Diodes are small semiconductors whose purpose in life is to allow current to flow in one direction only. If a negative voltage is applied to a diode it is reverse-biased (“off”) and no current can flow, but if zero or positive voltage is applied it is forward-biased (“on”) and current can flow from its anode terminal to its cathode terminal. If enough negative voltage is applied to the diode, it is possible for current to begin flowing backwards, from the cathode terminal to the anode terminal.


  1. Sparkfun’s very thorough introduction to diodes.
  2. Collin Cunningham of MAKE magazine returns to explain the basics of diode function.

The STEMpunk Project: Literally Reducing a (Black) Box

I have described The STEMpunk Project as “an exercise in black box reduction”, by which I mean the project’s bread and butter is making sense of the previously mysterious inner workings of the objects which make up daily life.

Recently I took this phrase more literally by ripping apart a malfunctioning box fan. As it had sputtered to a stop in the heat of a June day I thought I might try my hand at fixing it, or at least divining how it worked. After pulling the coverings off the motor I took one look at its components and, not seeing any belts or pulleys, immediately thought “magnets are involved somehow”.

Some quick googling confirmed my suspicions. The blades in many types of fans are spun via induction motors, remarkably clever devices which utilize rotating magnetic fields to generate torque. There are different types of induction motors, but one common variant is comprised of three pairs of coiled copper wire which generate a magnetic field when current is applied to them. Applying current to the next pair generates a new magnetic field with a new north pole a few degrees away from the previous north pole. The same process is repeated over and over again in each of the three pairs, causing a disk or cylinder positioned at the center of the apparatus to spin along with the magnetic field.

I have found this process of gradually discovering the intricacy of things I’d previously taken for granted to be enormously gratifying. Learn more about induction motors here:

Learning Engineering’s “Electrical Machines” playlist.

The STEMpunk Project: My First Solder

I spent almost the whole of last Tuesday morning doing a soldering kit from Elenco toys which, when completed, results in a circuit that produces a siren noise similar to the one on European police cars:


The bottom of the kit, complete with all my soldered connections.


The top view of the kit. Note the resistors, the capacitors, and the integrated circuit!

This is my second Elenco kit, and they continue to be a bit of a mixed bag. On the one hand their kits do a great job of encouraging experimentation by having you complete a small project and then suggesting ways you might, say, make the pitch of a sound higher by routing current through different resistances. On the other, I have been repeatedly struck both by how poor the editing in their documentation is and by how sparse their explanations are, even for projects which are fairly advanced from a beginner’s perspective.

But I did enjoy this kit, and especially appreciated that it had special practice sections of the printed circuit board on which I was able to take my first halting steps in soldering before trying to complete the actual project. This is definitely something you could get for the little Feynman in your life!

The STEMpunk Project: Beginning Schematics

As of today I am excitedly in the middle of stage I of the electronics module. I have been working with the Sparkfun Inventor’s Kit and the Elenco Electronics Playground, learning a ton along the way.

One of the first problems I ran into was trying to figure out how to read the schematics that accompany so many electronics projects. Here is an example of one:


Both kits include wiring diagrams which make reading the schematic unnecessary, but this step can’t be skipped if you really want to understand the circuit and get as much as possible from the exercise. Plus, once the training wheels are off schematic reading becomes indispensable.

I started with learning the basic symbols for electrical components like resistors, capacitors, and so on. These three tutorials helped:

  1. Sparkfun’s “How to Read a Schematic”.
  2. An Instructable on How to Read a Circuit Diagram.
  3. Make’s tutorial contains a nice summary near the end to which you might want to refer in the future.

But I still couldn’t figure out how to translate the symbols and wire connections to an actual circuit. What I really needed was to see someone walk through a schematic while illustrating their process and building the physical device. Luckily some people have done just that, and I’ve compiled a list of some of the better videos I found:

  1. Collin’s Lab: Schematics Collin Cunningham patiently lays out the basics of reading a schematic in his own oddball, funny way.
  2. Principles of Schematics Follow along with Ben Heck as he builds a touch plate LED circuit. Pay special attention to his method for laying out and keeping track of all those little components.
  3. Reading Electronics Schematics Very thorough explanation of schematic reading by Youtuber Cold Redd. Near the end of the video there are a number of close-up shots of the circuit he’s built. Pause the video and make sure you can see where power is coming from and how it gets to the various pins on the Integrated Circuit. Hand draw the schematic for easy reference if needed.
  4. How to read an Electronic Schematic Paul Wesley Lewis walks you through a simple breadboard, carefully illustrating how each connection corresponds to a part of the schematic.
  5. How to Read a Schematic RimstarOrg’s video contains the simplest circuit and explains symbols for connections like a chassis ground which aren’t contained in the other videos.

One of the difficulties in planning something like The STEMpunk Project is the simple fact that I just have no way of telling in advance when some essential, basic skill is going to be required and I’ll have to spend several days figuring it out.

But then exactly this sort of adaptability will be required in anything else I’ll want to do in the future, so it’s a skill worth building!

The STEMpunk Project: Third Month’s Progress

Normally I include an image in these summary posts, but since I spent pretty much all of May working on Mike Meyers’ “CompTIA A+” the picture would look nearly identical to last month’s.

That book was much more formidable than I thought it would be, but I have to say that it was well-written, thorough, and extremely informative. In order to finish before the month was over I had to skip some less important chapters, which I plan on revisiting when all of this is over.

I managed to get five STEMpunk-relevant blog posts published:

While I’m happy with this list there are still three or four posts which I didn’t have time to finish. The biggest one is “How Computers Work, II”, which I’m still planning on writing and which will hopefully be done some time this month. I chose to put it off in favor of diving into the Electronics module, which so far is off to a very strong start!


The STEMpunk Project: Adventures With The Sparkfun Inventor’s Kit

The electronics module of The STEMpunk Project began early this week when I excitedly tore open my Sparkfun Inventor’s Kit (SIK) and plugged the Redboard into my computer.  The instructions for installing and configuring the SIK have six parts: download the Arduino IDE appropriate to your OS (OSx Yosemite 10.10.5, in my case), connect the RedBoard to the computer via the supplied USB cable, install the Arduino FTDI drivers, uninstall the native FTDI VCP drivers if you’re running OSx Yosemite (10.9) or later, select the correct board and serial port, and then download the SIK code from the supplied URL.


All seemed well when I built out the first project circuit — just a simple blinking LED — but when I tried to upload the code for the second circuit to the Redboard I discovered that the Arduino IDE I was using simply couldn’t interface with it.


There were three places where I ran into trouble. The first and biggest was getting the right Arduino IDE installed. For whatever reason the latest install, v. 1.6.9, just doesn’t work because it just can’t upload the code to the RedBoard. I tried uninstalling it and installing 1.6.8 and had no better luck. Finally, I opted to install 1.6.5, the last known fully-functional version, which worked.


During each of these installs I re-ran the FTDI driver install and the uninstall script for the Mac FTDI drivers. It seemed like sometimes when I skipped this step the IDE couldn’t see the SIK code file, though I have no idea why.


When I finally installed IDE v. 1.6.5 and re-installed the drivers I ran into an issue with the USB port. Evidently v. 1.6.5 doesn’t recognize the same ports, because I had to go in and select a different one. Further, for some reason the IDE wouldn’t recognize my SIK code file either; when I re-downloaded the exact same file and I tried to upload the SIK code for the second circuit, everything worked.


I mention all this because throughout the process I repeatedly found myself getting annoyed that I even had to go through this much effort. Hadn’t I paid money for this equipment? Shouldn’t it work out of the box?


Then I realized that I was being silly, for two reasons. First, a lot of the software upon which the SIK relies is free, open source, and actually very good. Unless I can produce something better then I have no right to complain about the fact that I have to spend a morning or two getting it to work. Second, even with million-dollar programs and state-of-the-art computers, troubleshooting is a fact of life[1]. The STEMpunk Project is about building serious technical skills, and if I loathe the process of tinkering with hardware and software then I stand no chance of succeeding.


But once I did get the SIK working I knocked out all sixteen project circuits in about three days! I realize they won’t mean much out of context, but I took some pictures as I went along:


This is circuit one, just a simple little LED light:




Circuit two contains a potentiometer — basically a knob for adjusting voltage — which gave me the power to brighten or dim the LED:




Circuit eight powered a small servo motor with a propeller attached:




Circuit fifteen displayed a ‘hello world’ message on the tiny LCD screen:




The final circuit, number sixteen, coded a simple memory game where I had to use the buttons to replay a pattern produced by the LED lights:


[1] One of my friends who already has a lot of technical skill told me that my phrasing here wasn’t strong enough. Troubleshooting isn’t just a ‘fact of life’, it’s the core technical skill.

The STEMpunk Project: Reflections On The Computing Module

Today marks the completion of the first module in The STEMpunk Project. To review, here is a truncated version of my original goals for the opening salvo of this year-long attempt to become a techie:

  • Stage I: Read books about building PCs. Put a parts list together, check with my smarter friends, and then order them. Wait around while the parts arrive, and finish the module by building a computer out of them.
  • Stage II: Read “The Elements of Computing Systems” and build the simulated computer described therein.
  • Stage III: Read the CompTIA A+ book and take the certification test. Do the same with CompTIA Network+ and CompTIA Security+, take the relevant tests if time allows.
  • Stage IV: Profit and/or drop mic on stage, as appropriate.

There are a few reasons that I chose to lead with computing. Of the four modules it’s the one I’m the most intrinsically interested in, so I reasoned that completing it would build enough momentum to carry me through the rest of the project. It’s also the subject I’m most likely to continue studying after the project is finished, so any mistakes I make in the planning and execution stages are more likely to be remedied later through followup work.

And there have been plenty of mistakes. The most obvious is that my goals for the this module were wildly, laughably over-ambitious. With the benefit of hindsight it’s astonishing to me that I thought I would be able to complete stages II and III in six weeks. Worse, I had originally planned on doing programming tutorials for about an hour everyday, though I had the sense to realize that that would be overreach before I even started.

A major reason for the time crunch is that The STEMpunk Project got off to a slow start and stage I ended up taking longer than I originally thought it would. I’m not too bothered by this; after all, developing the ability to undertake projects of this magnitude has been my single biggest motivation from the outset, so there was bound to be some growing pains while I stretched the relevant cognitive muscles.

Another mistake is that I completely forgot to factor in the taxes I’d have to pay in April when budgeting for the project. Though I went ahead and researched the kind of system I want, building it would’ve stretched me too thin. I’m hopefully going to order the parts and assemble them later in the year.

All this having been said I’m mostly happy with my layout and choice of materials, with one exception: because I did not have the time required to do many of the implementation exercises in “The Elements of Computing Systems” it probably would have been wiser to focus instead on Stallings’ “Computer Organization and Architecture”. The latter book covers much of the same material as the former, but in more detail and with the benefit of study questions at the end of each chapter.

To other aspiring techies:

The three stages of this module cover a cross-section of computing knowledge that has both breadth and depth. Taken together they are an excellent foundation for further study, and would be even more so if I had actually managed to do all the things I said I would do. My advice to anyone wanting to tread the same path is to remember taxes and other large, fixed expenses when developing a budget, and give yourself closer to half a year if you want to get everything done at a comfortable pace.

If any of you do this and have useful insights, I hope you’ll share them with me.


The STEMpunk Project: Second Month’s Progress

Throughout the STEMpunk Project I’m going to try to take a picture each month of the books I’ve read and projects I’ve completed, as sort of a visual metaphor for my progress.

Here’s what I got done in April (minus the little model engine, which I forgot to include this time):


I’ll admit that the table is still pretty sparse, and I had hoped to have a Desktop PC to include in the photo by this point. But I did manage to make the following additions to the “object” stack on the left:

  1. Nisan and Schocken’s “The Elements of Computing Systems”
  2. Ron White’s “How Computers Work”
  3. William Stallings’ “Computer Organization and Architecture”

My focus in Stage II of the Computing module was mostly on “The Elements of Computing Systems”, so I only read sections of the works by White and Stallings which were most relevant to that book. These three volumes, when read together, are a very thorough introduction to computing and its foundations. While I never took the relevant classes in college, I imagine that if you threw in a discrete mathematics textbook and a few programming tutorials you’d have roughly the equivalent of a minor in computer science.

I also added Thomas Sterner’s “The practicing Mind” to the “meta” stack on the right. Sterner’s book read like a version of “The Art of Learning” that had been stripped of most of the biographical content. They complement one another nicely with their similar content, presentation, and style.

The rest of May is going to finishing the CompTIA A+ book and prepping for the Electronics module. I’m also toying with the idea of continuing to study my CompTIA material lightly in the background after the Computing module is done. Stay tuned!

The STEMpunk Project: How Computers Work, I

Because I didn’t have time to do all the coding implementations while reading “The Elements of Computing Systems” by Nisan and Schocken, I wanted to test my understanding of the material by typing up an explanation of how a simple high-level program makes it to binary in the computer built in the book[1]. Posting it here will allow anyone with actual expertise to critique it if they so choose.

I have also produced a fictionalized version of this essay called “The Emperor’s Garden“, in which a young Chinese girl is chosen for the task of running a spell from one end of a garden to another, passing through various abstraction layers which correspond to those found in actual computers.

So let’s say we have an extremely simple program written in .js:

for (var i = 0; i < 10; i++){
    return (i * 2);

We’re going to gloss over the function of the OS and instead skip straight to the translation process, which can be divided up into the compilation, virtual machine implementation, and assembler layers.

First, during syntax analysis the example code will be converted into a series of terminals, or language primitives like ‘for’ and ‘(‘. Whenever a non-terminal like a variable is encountered the process works recursively until a terminal is reached. The result is a token stream of atomized input characters which can be read by a recursive descent parser to yield a parse tree.

In the code generation stage, which together with syntax analysis makes up the compilation[2] layer, the parse tree is converted into a series of commands for a virtual machine implementation. These consist mostly of elementary operations to be performed by a stack data structure. The code might, for example, push instructions from a certain location in memory onto the top of the stack, have the stack perform a calculation on them, and then pop the results off the stack so they can be shuttled back into memory.

From there a program called the VM translator changes the VM code into Assembly. Assembly languages come in symbolic and binary flavors, with the symbolic versions allowing for the use of terms like ADD instead of the binary equivalent. This is useful to human programmers who happen to be programming in or reading Assembly.

At this layer we’re only one step above machine language, i.e. binary. A program called an Assembler takes the Assembly code and changes it into machine language, which consists of instructions for manipulating memory and registers, as well as for performing calculations on binary data. In our example program we would need a memory location for the variable, and register locations to store the intermediate and changing value of i as the CPU iterates through the for loop calculations.

With that we have gone all the way from javascript to 1’s and 0’s!

It’s worth pausing and reflecting on how amazing it is that human beings have invented all this and gotten it to work together almost seamlessly. More than anything else, The STEMpunk Project has begun to give me a deeper appreciation for the magnificent inner workings of the technology powering modern civilization.


[1] It’s important for me to specify that this essay only covers the computer built in “The Elements of Computing Systems”, which by design is extremely simple. There are many topics, like the difference between compiled and interpreted languages, which I haven’t discussed.

[2] From what I’ve read “Compilation” can have two meanings. Either it can mean the entire process of translating a high-level program into binary, or it can refer to the combination of syntax analysis and code generation at the very beginning of this translation process. Here, I’ve chosen to use the latter interpretation.

Peripatesis: E-Governance; Lighting Up The Dark; Regulating Superintelligences.

Nestled in the cold reaches of Northern Europe, Estonia is doing some very interesting things with the concept of ‘e-governance‘. Their small population, short modern history, and smattering of relatively young government officials make experimenting with Sovereignty easier than it would be in, say, The United States. The process of starting a business and paying taxes in Estonia has been streamlined, for example, leading to the predictable influx of ‘e-residents’ wanting to run their internet-based business from Estonia.


There are some truly fascinating advancements happening at the cutting edge of farming and horticulture. Some enterprising researchers have discovered a way to channel natural light into unlit places, and there are talks of using this technology to set up a public garden in the abandoned Williamsburg Bridge Trolley Terminal beneath New York City. It’s not really clear from the linked article whether or not all of this light is natural or whether or it’s a mix of natural and artificial light, but it’s still interesting.

I would love to see a variant of this technology utilized far and wide to foster localized farming and the greening of urban centers. Plenty of buildings have rooftop gardens now, but with a means of gathering and arbitrarily distributing sunlight it would be possible to have, say, one floor in ten of a big skyscraper devoted to a small orchard or garden space. Advanced greenhouses could be both heavily insulated and capable of showering their interior with photons, making farming at high altitudes and in colder climates more straightforward.


The BBC has a piece on ‘anti-languages’, slangs developed by insular communities like thieves or prison inmates to make their communication indecipherable to outsiders. They share the grammar of their parent language but use a plethora of new terms in place of old ones to achieve something akin to encryption.

These new terms — such as ‘bawdy basket’, which meant ‘thief’ in the English anti-language used among Elizabethan criminals — are generated through all sorts of techniques, including things like metaphor and reversing the spelling or meaning of terms from the parent language.


An essay by Marc McAllister at The Babel Singularity argues that laws enforcing human control over superintelligences are tantamount to slavery, and won’t be of much use any way because these beings will have moral concepts which we baseline humans simply can’t fathom with our outdated brains.

He seems to be missing the point of the arguments made by groups like MIRI and the Future of Life Institute. To the best of my knowledge no one is advocating that humans remain strictly in control of advanced AIs indefinitely. In fact, the opposite is true: the point of building a superintelligence is to eventually put it in charge of solving really hard problems on behalf of humanity. In other words, ceding control to it.

To that end, the efforts made by people who think about these issues professionally seem to be aimed at understanding human values, intelligence, and recursively improving algorithms well enough to: 1) encode those values into an AI; 2) Predict with an acceptably strict level of confidence that this human-compatible goal architecture will remain intact as the software rewrites itself; 3) reason, however dimly, about the resulting superintelligence. These are by no means trivial tasks. Human values are the messy, opaque result of millennia of evolution, and neither intelligence nor recursion are well understood.

But if we succeed in making a “Friendly” AI then control, in a ‘coercive sense’, won’t be necessary because its values will be aligned with our own.


Somewhat related: Big Think has published a very brief history of Artificial Intelligence. With the increasing sophistication and visibility of advancements in the field, understanding its roots becomes ever more important.


Vector Space Systems is a new player in an arena long dominated by Blue Origins, SpaceX, and Virgin Galactic. Their goal: to be to spaceflight what taxis are to terrestrial modes of transport. According to their website they have been quietly working on a micro satellite launch vehicle designed to carry payloads in the 5 – 50 kg range into orbit.

If they succeed this will allow companies wanting to develop new space technologies to launch more frequently and less expensively, driving faster growth in space commerce, exploration, and tourism.