Gathering Agility.

How I Fell Down the Arduino Rabbit Hole

Cover Image for How I Fell Down the Arduino Rabbit Hole
Roger
Roger

Stage One: A Door Opens

The first date of my current addiction was January, 2019. I was at a workshop at Accenture’s new Innovation Hub in Atlanta, and I wandered into a room full of breadboards, soldering irons, male-to-male leads. It was a beautiful sight. I picked up a breadboard and realized I had no idea what to do with it. Nothing. I couldn’t even hook up a battery to an LED. Nonetheless, I felt like a kid in a candy store. The possibilities in this room felt endless, even if I didn’t have a clue where to start.

I don’t like not knowing how to do something. To be honest, a feeling of ignorance gives me an almost physical pain in my chest. I start feeling competitive with that thing that’s making me feel stupid. I feel like the dumbest person in the room on a regular basis, partly because I make it a point to seek out really smart people who know something I don’t.

So I looked at the breadboard. I looked at the wires. I felt both elated and a little bit sick. I went back to my workshop, but a small part of me stayed in that room.

Stage Two: A Plan Takes Shape

“Hey Nathaniel, would you like help Daddy build some computer parts?”

My eight year-old’s eyes went wide. He nodded assent. I now had my pretext to open my wallet and start buying stuff.

I searched online, and quickly decided that the friendliest entry-level device for my son was the micro:bit -- a cheap microprocessor that the BBC built to teach STEM to kids in Great Britain. It’s an amazing device, with an onboard LED screen, an accelerometer, two buttons, a USB port, and sensors for light and temperature. And you can program it using Microsoft’s MakeCode, which uses a drag-and-drop programming interface that’s a lot like Scratch.

It is a thing of beauty.

The Blessed Micro:Bit

My son spent many happy hours on the MakeCode site programming his new toy to print out a series of pictures when he clicked a button. I asked him if he wanted to try something new, like code up a Magic 8-Ball that printed out a different message every time you shook it.

He didn’t. He liked the picture buttons. He didn’t want to change the picture buttons. Ever.

Fair enough, I thought. He’s eight.

So I did what any sane father would not: I purchased my own micro:bit, breadboard, LEDs, resistors, switches, etc. It all came packaged in an Inventor’s Kit from SparkFun, and had documentation for about twelve easy projects.

I had a lot of fun hooking up wires. I showed my boys how to make a photoresistor light up an LED when you passed a shadow over it. I was hooked.

And here I learned something about consumer hobby electronics. As with heroin, your first hit is free. Every subsequent hit gets a little more expensive.

Stage Three: The Education of Little Geek

I remember what was so thrilling the first time I took my first computer science class after a lifetime spent studying the humanities. The computer classes felt down to earth. I felt like I was doing something real, something practical. As much as I love Dostoevsky and Immanuel Kant, neither gave me quite the same buzz.

Well, after decades spent toiling in the vineyards of software, playing with wires and batteries gave me that same feeling. This was just as real and practical. Even more so.

In the process of playing around with my own starter projects, I ran into a few hurdles. I needed to learn Ohm’s law. Easy. I needed to buy a multimeter. No problem. Then I ran into something called a voltage divider. As SparkFun cheerily informed me: “If learning Ohm's law was like being introduced to the ABC's, learning about voltage dividers would be like learning how to spell cat.” I froze in my chair. Thank you, SparkFun, for making me feel like the moron who can’t spell CAT.

Clearly, I had to do something to shore up my near-complete lack of education. So, as one does, I watched the first lecture in MIT’s Introductory Electrical Engineering class taught by the ebullient fount of knowledge, Professor Anant Agarwal. It was fun watching him put 120 Volts through a pickle, causing one end to glow bright orange. But even more fun was seeing him square up the simple algebraic concepts like Ohm’s law with the real meat of electro-magnetism: Maxwell’s Equations.

If you’re looking for an introduction to Maxwell’s Equations, look to someone who understands them, because I don’t. They involve things like vector fields, partial integrals, and a whole bunch of other constructs the likes of which I avoided for most of my first twenty years of life because it all seemed so pointless. Let’s just say the joke’s on me for this one. But for a really good overview of the underlying concepts, allow me to recommend this video by 3Blue1Brown.

Agarwal’s lecture showed that you can avoid most of the confusion inherent in dealing with electricity in terms of higher-level calculus if you are able to assume that one side of the calculation evaluates to zero.

For instance, amperage through an object in Maxwell is represented like so:

Really cool Maxwell equation here

That's a lot of Greek, but the integral over S sub A can be read as the amperage into a filament, and the integral over S sub B is the amperage out of a filament. If they happen to be equal (at least within a certain tolerance), then the partial differential del q over del t evaluates to zero, and can essentially be ignored. And when does this happen? I’ll tell you. It happens when the manufacturers of your filaments realize that this needs to happen or else they’re all out of a job. So welcome to the modern age, where you can replace those integrals with the letter I and assume that your current in as measured by amps is equivalent to the current flowing out.

You can do a similar trick with voltage. Simplifying assumptions like this — and the manufacturing processes that support these assumptions — make playing around with circuits possible for someone like me.

I have not yet gone deep into the theoretical parts of Electrical Engineering because I really just want to build stuff. If I miss a few calculations and cause an element here and there to short out, that’s OK. I’m not aiming to go pro here. I’m trying to build a few cool robots and help my children absolutely ace their science fairs. But theory is important, and I’m glad I took some time to wrap my head around some of it. Now back to building.

Interlude: A Modest Proposal

“Nathaniel, would you like to help Daddy build a robot?”

My son’s eyes go wide again. “Yeeeeeeeaaaaaaahhhh…” he says.

“What kind of robot do you want to build?”

He thinks it over.

“I want a robot that can do my homework for me!”

“Okay,” I say. “But you do realize that building a robot like that would take a lot more work than just doing your homework would, right?”

He looks confused. He shrugs.

Later, my wife says to me, “Why did you tell him that? He doesn’t need to know it’s not possible! Let him learn!”

She’s right, actually. Sure, son. You can have a robot that does your homework for you. We will build a camera, wire it up with a development board that can run convolutional neural networks using TensorFlow. We will train it to recognize a sheet of paper. Another deep learning algorithm will recognize math problems on your worksheet, and we will connect that to a system of servos that will reproduce, in readable form, the answers to your homework on a sheet of paper.

Do all this, and I’m reasonably sure some engineering grad school will offer you tenure. But, most importantly, you will get out of having to do your second-grade homework.

Worth it.

A veritable army of Arduino boards

Stage Four: Down the Rabbit Hole

I’ve spent the last few months squirreling away electronic components. I have a plastic sewing box from JOANN Fabrics that holds LEDs, potentiometers, SPDT switches, wires, and a bunch of other fun things. I’m getting a soldering iron and an Arduino Uno for my birthday. And I just priced out all the components for a Udemy class that promises to walk me through the ins and outs of building all sorts of sensors and gizmos. Motion sensor? Check! Barometric pressure gauge? I’ll take five! Digital thermometer and humidity sensor? I’m going to sense every last drop of humidity up in this bitch. Hold my beer.

My favorite as-yet-unpurchased item is this ultrasonic distance sensor that reminds me of the eyes on that robot from the 80s movie Short Circuit. I think I’m going to have fun with that one.

I ran a spreadsheet on what all this additional hardware is going to cost me, and I almost coughed up a lung. It’s not exorbitant, but it’s more than I’d care to spend at one go. It’s a payment on my car loan. Ouch. The kicker is that every item on that list is fairly cheap. It’s just that there are a lot of cheap things to buy. I will be spreading these purchases out to cushion the impact.

What's the Takeaway?

I’m not sure why I’m writing this down, even less why I’m publishing this on a blog, except that I once read that it’s a good idea to write about what currently excites you. That way, you can start internalizing what you’ve learned, and start teaching it to others.

If I want to draw a direct line between my new electronics hobby and either Agile or DevOps, here’s how I would justify it. We are entering the age of the Internet of Things. Just as developers have had to learn more about systems administration, and systems administrators have had to learn more about development, everyone involved in technology should start at least getting familiar with what it takes to create the aforementioned Things. That, for what it’s worth, is my business angle.

But there’s also something to be said about scratching an itch of curiosity just to scratch it. I remember many years ago watching videos by a guy who built an entire computer inside Minecraft using redstone. It was an absolutely preposterous achievement, which is what made it so awesome. In the years since, someone else built a computer inside Minecraft that can itself play Minecraft. There is a certain breed of person who hears about something like this and shrugs. This individual will say something like Some people have too much time on their hands. Then they will go back about their business and think nothing more of it.

I’m not that kind of person. Trying to wrap my mind around an endeavor like that fills me with wonder. I’m struck dumb, seized with a fit of fear and trembling worthy of Kierkegaard. There’s something amazing about pushing the envelope of your own knowledge. There’s something fundamentally empowering about squaring up to your own ignorance and moving it just a millimeter or two into enlightenment. It may not put any money in your pocket, but it will put life into your days.

So over the next few weeks and years, as I’m soldering PCBs together and wondering why my circuits keep shorting out, I’m going to come back here and read this. I’ll remind myself how it all felt at the beginning, when everything was fresh and new. I’ll remind myself that for a brief moment I was Icarus, flying toward the sun. This solder dripping from my iron is the wax melting off my wings. I’m alive, and I’m learning, and this is what I live for.