Halloween Candy Machine | Part 5 of 8

The art of the narrow deep dive

How rapid acculturation into unfamiliar domains leads to conceptual breakthroughs

An-Lon Chen
15 min readApr 19, 2022

This is a standalone article within a multi-part series.

Back in 2020, my daughter Nora and I spent a lot of pandemic downtime watching the Joseph’s Machines Youtube channel. We even followed the Grape Feeder tutorial and built one for ourselves.

Nora and I had fun following the tutorial, but I can’t take credit for any of the creativity.

When Halloween rolled around, I searched the Internet for a do-able Rube Goldberg candy dispenser but didn’t find much more than candy chutes.

Nora and I ended up going low-tech. We hung little bags of candy out on our garden trellises along with the spiders, bats, and unharvested squashes. This turned out to be a complete usability failure because no one realized they were supposed to walk up and take the candy. We later course-corrected and set all the candy out on some upended milk crates on the driveway while we went trick-or-treating ourselves.

Halloween decorations and candy hanging from garden trellises.
Life lessons from low-stakes projects.

When 2021 rolled around, the idea of building a contactless candy dispenser still intrigued me. At that point, I wasn’t too worried about making it contactless, but I still wanted a fun solution for the leave-a-bowl-of-candy-out problem. With two little kids to take out, we were going to have an empty house greeting trick-or-treaters for years to come.

The Domain Expert

At this point, I tried to drag my husband Jeremy, a mechanical engineer, into the design process. Even though we’d never built anything together before, I was hoping we could collaborate.

It didn’t work out that way, mainly because woodworking isn’t really his thing. Most of his suggestions involved gears, springs, linkages, belts, ratcheting mechanisms, and other elements that don’t really lend themselves to being built from scrap wood. I wasn’t necessarily unwilling to order machined parts, but I would have shelved or postponed the project the moment it became too complicated for a 6-year old to grasp. A vending machine is not terribly interesting in and of itself. Like all the other gadgets in in a little kid’s life, it’s powered by magic, but magic is commonplace to the point of being utterly mundane.

There were two directions I could go in order to build something more interesting than a vending machine. One was to decorate and customize it to make it uniquely ours. The other was to strip away the layers of magic and turn it into a self-explaining gadget. Once this second goal started taking hazy focus in my head, I started swatting away all suggestions that involved difficult-to-find or difficult-to-understand parts.

Nonetheless, having a domain expert on board was invaluable. If I hadn’t literally had one in-house (perpetually in the house, thanks to the pandemic), I would have gone out of my way to find one. Like that nameless Home Depot shopper, an early source of human expertise usually provides an outsize contribution.

Jeremy contributed in two distinct ways. First, and rather unexpectedly, he led me on a tour through our kids’ Kiwi Crates. This helped me see them in a new light and gave me a basic vocabulary of design options. He supplemented the tour with one of his old engineering textbooks, which got waved around frequently and occasionally cracked open.

Jeremy’s second contribution was as a translator. A familiar stage in the requirements gathering phase of many a software project is when the engineers, designers, and domain experts struggle to establish a mutually comprehensible pidgin. For purposes of designing the candy machine, it was very useful to have a mechanical engineer on hand to translate the thingies and doohickeys found on common household objects into useful search terms.

To give a small example: We’re all familiar with this thing.

A boxing glove on a spring
source: iStock

But googling for “boxing glove on a spring” leads only to stock image sites.

It takes some effort to land on “DIY scissor arm” or “scissor lift” and gain useful information about how to build one. (At one point, I thought I might need one to prevent candy jams in my tower.)

The Internet Search

I didn’t take photos of my early whiteboard ideas, so I’ll use a few YouTube videos to summarize. I started out with the vague idea of a pinwheel-ish, Pac Man-ish mechanism for pushing candy out a small amount at a time, like in Steve Ramsey’s build video below. (For anyone who’s wondering, “pinwheel-ish” and “Pac Man-ish” are not useful Internet search terms.)

But I ran into the same problems that Brent and Marsha Barker did in their Halloween candy dispenser build. I’ll use a few screenshots from their video to illustrate, but the entire video is well worth watching.

Like me, they wanted a better way to leave candy out for other kids while they went trick-or-treating with their own kids. They quickly realized that a standard candy machine doesn’t lend itself to wrapped, single-serving candies.

Three candy dispensers.
source: Barkers Random Projects, via Youtube

Here are their design requirements, which were mostly the same as mine. Like them, I wanted a fully automated system that could handle wrapped, non-spherical candy. The main difference was that Nora had already deemed Kit Kats to be her candy of choice, so I was willing to jettison variety.

Critical: Automated, Wrapped, No Jamming. Ideal: Consistent Servings, No Crushing, Variety.
source: Barkers Random Projects, via Youtube

We both had an initial idea that resembled the screenshot below, which was ultimately put aside in favor of a better idea.

Rough sketch of a candy dispenser
source: Barkers Random Projects, via Youtube

Their solution involved an ingenious conveyer belt to pull candy out of a cardboard hopper, and a sensor to determine when the candy had emerged. It was awesome, but it involved two Arduino boards and a number of motorized parts (build plans here).

I found a number of extremely clever motorized solutions. Noel Portugal’s machine from 2010 was a full-blown multimedia production that began when the user texted a code to a phone number on a screen. The key component of his setup is a rotating gate that’s fundamentally similar to the revolving door in a standard candy dispenser. His machine dispenses a lot of candy at a time, and it requires a separate rotating shaker to help prevent candy jams.

The Seesaw

I was stubbornly convinced that I could solve this problem without sensors or microchips. I decided that my goal for 2021 would be to find a kid-powered mechanism. In future years, I could motorize it or add sounds and lights.

I had some plastic sheeting left over from making some tunnel cloches for the garden, and I figured I could use the sheeting make a flexible hopper, like a giant pastry bag (the kind that’s used to squeeze out icing).

A cat playing inside a garden tunnel cloche.
We expect an excellent harvest of cats this year.

Looking through my notes, I never produced a good illustration of this mechanism, so here’s an after-the-fact re-enactment.

A diagram of an idea for a tilting seesaw candy dispenser.

Pulling the red string to get the seesaw from Position A to Position C would result in candy spilling out to the right. The next user could then pull the black string, and get candy to spill out to the left.

This was the first design that I knew with complete certainty that I could build, and that would work as intended. For illustrative purposes, here’s another version of the same design, where instead of a seesaw that resets to two basic positions, I employ a hand crank that continually rotates the revolving door clockwise.

A diagram of a hand-crank-operated, revolving door candy dispenser.

I never solved the following problems with the hand crank model:

  • How do I constrain the hand crank to turn in only one direction? Jeremy confirmed that I needed some sort of ratcheting mechanism, but I couldn’t find an easy way to accomplish this with the woodworking tools I had.
  • How do I constrain the revolving door to neat quarter-turn increments, so the mechanism is always in the “don’t-spill” position for the next kid?

The seesaw solved both these problems. Gravity would force the seesaw into only one of two states, red string up or black string up. It would be trivially easy to constrain the seesaw to the correct range of motion: just put some blocks in the way. (A real seesaw doesn’t spin around forever because the ground gets in the way.)

The seesaw idea was inspired by a Panda Crate toy that both my kids found rather mystifying.

A wooden Panda Crate toy

Drop a ball through the hole on top, and the ball lands on the internal T-shaped seesaw, flips it, and roll out either the right or left hole. Upon being dropped a second time, the ball flips the seesaw again and rolls out the opposite hole. Dropping the ball repeatedly alternates the exit from left to right.

Outside of a dedicated toy, users don’t like this sort of thing. They want the same results over and over again, not an arbitrary pattern to decipher based on a black box mechanism they can’t really see.

So I struggled with my seesaw for a while, trying to think of a way to make it user-friendly. In addition to the usability issue, I also wasn’t thrilled with the unpredictable amount of candy it would need to dispense in order to avoid candy jams.

The Tower

After several whiteboard conversations about the flexible hopper and T-shaped seesaw, Jeremy said, more or less out of nowhere, “You should make it like a Pez dispenser.”

Pez dispensers were for some reason not part of my childhood and I had only a vague idea of what they were. Fortunately, the Internet is fueled by nostalgia. In short order, I learned:

For simple and cheap dispensers of children’s candy, Pez machines are surprisingly complex in their construction. While other small candies sold in stack format require a certain amount of wrapper-ripping and rooting around for the last few, Pez machines are designed to move each candy into a convenient place to be easily grabbed and eaten. This requires a device consisting of a hollow shaft, two springs, a plastic inner shelf, and a small lever.

My eyes glazed over at that point because I quickly realized exactly what I wanted as the candy ejection mechanism: Matthias Wandel’s Jenga Pistol. I had seen it before on his woodgears.ca site and had no trouble finding it again. Rather than firing projectiles, the Jenga pistol pushes a trapped wooden pin forwards an inch, at a high enough velocity to dislodge a Jenga piece from its tower.

From Matthias’s build description:

Matthias Wandel’s Jenga pistol

The pistol works by hurling a wooden captive bolt forward inside the pistol, powered by rubber bands. The bolt has a pin on the front, which protrudes out of the muzzle of the gun by about 2 cm at most. This is enough to transfer the momentum of the bolt to the Jenga block in front of the gun, not unlike how the game of croquet works.

I had finally obtained all the pieces of the puzzle. I could use some sort of “captive bolt” to push candy out from the bottom of of a tower and then use some sort of spring, like the rubber band in the Jenga pistol, to retract it.

For better or worse, I never let go of my original seesaw. I figured that a giant, tilting Pez-like tower atop a seesaw would provide visual excitement, and I also thought that the rotating mechanism might help free the slider from underneath the candy tower. Jeremy said that I didn’t need the seesaw. He turned out to be correct, but I didn’t realize until I started the build that freeing the slider wasn’t going to be much of a problem.

I didn’t start documenting my ideas until I reached this point. Everything up until this point was still low-stakes armchair chitchat, easy to abandon.

A whiteboard containing a lot of different diagrams and scribbles
Perishables: Broccoli, Cabbage. Slider to eject instead of Pacman + Hopper.

Here is a closeup of the above whiteboard that reveals the first recognizable design sketch of the candy tower.

The first recognizable design sketch of the candy tower

Springs, Linkages, and Pulleys

The picture above shows a black spring to the left and a dark red string to the right, with orange candy sliding out from a tilted green tower. Interestingly, newly-literate Nora was extremely adamant about having the candy move from left to right.

Extracting the candy was easy to wrap my head around: a kid would pull the string, which could both tilt the seesaw and pull the slider. I had a vague idea of attaching the string to a foot pedal, just for the challenge of making the operation contactless, but I filed that away as an implementation detail.

Retracting the slider would be accomplished by the spring on the left. At some point, I realized that a weight could serve the same purpose as the spring, if I could just transfer the energy in the correct direction.

An early sketch of the slider mechanism for the candy machine
An early sketch where I replaced the spring with a sandbag. I still hadn’t figured out my terminology.

The mechanism might well have worked even if I’d let the sandbag pull the string around a 90 degree corner against the wood. But there would have been a lot of friction, and it didn’t feel right. So I added a “spinny thing” to my drawing on the other side, figuring I could make a “spinny thing” out of a dowel axel with a nylon spacer spinning freely around it.

To solve the problem of transforming the sandbag’s downward force into a horizontal pulling force, Jeremy suggested a linkage mechanism like the one found in the Kiwi Crate grabber arm I’d built with Nora. I hadn’t really understood how the grabber arm worked until he brought it back out in this context.

An animated .gif of a Kiwi Crate grabber claw

Suddenly, the grabber arm made sense: When the user pulls the yellow string, the trapped slider moves within the vertical slot to pull the rigid wooden bars, which transform the forwards-and-backwards motion of the slider into the claw’s rotational motion. The green rubber band reverses the direction of the slider, closing the claws.

There’s power in realizing that the system of slots, sliders, and bars is called a linkage. Once I had a name for it, I began to realize the design possibilities. I could use two slots at a 90 degree angle to each other with a connecting slider to transform the downward gravitational force of the sandbag into horizontal pulling force.

An annotated sketch of a linkage mechanism for the candy machine
My original sketch of the linkage mechanism, annotated for clarity.

At this point, I was fairly confident that all the main problems had been solved on paper, and I was ready to start building.

The linkages would have worked, but I realized partway through the build that the “spinny thing” was just a pulley, and that I could use pulleys on both sides if the string ran below the base of the machine rather than sitting on top of it like in the above sketch.

Intuition and Narrow Deep Dives

There are three main leaps of intuition in this story, where I had to upend my mental model of how a candy dispenser is supposed to work.

  • Replacing the hopper and revolving door with a Pez Dispenser tower.
  • Replacing the Pez Dispenser’s spring-loaded, top-dispensing mechanism with a “Jenga pistol” slider to push candy out the bottom.
  • Finding a workable solution to the problem of resetting the mechanism.

These are the “lateral thinking” moments of intuition that companies used to think they could assess via interview brain teasers.

The irony is that much of my own lateral thinking flexibility comes from rapid acculturation into unfamiliar domains, which requires a level of humility that interview brain teasers tended to actively select against. Acing toy problems fosters arrogance, arrogance fosters rigidity, and rigidity stifles innovation.

Very narrow deep dives like my foray into mechanical engineering require several elements to be successful. First, they almost always requires finding a human being as a guide. In this case, finding a guide was trivial. In many other cases, it requires cold calling, which most engineers hate to do.

Second, narrow deep dives require letting go of ego, letting go of preconceptions, and being willing to acculturate rather than dominate. I didn’t force the T-shaped seesaw onto my end users because I knew that its limitations likely stemmed from my own limitations rather than limitations in the design space.

Third, narrow deep dives usually require an early amount of breadth and a willingness to pursue leads like the grabber arm linkage. Without these early forays, which might or might not make it into the final product, it’s difficult to acquire enough context to avoid going the wrong way and digging in the wrong direction.

Fourth, narrow deep dives require a problem that lends itself to a narrow deep dive. Some problems truly do require breadth, and it takes experience and self-awareness to recognize that and walk away.

A Parallel Case Study

I’m going to close with a second example of a narrow deep dive that illustrates these four requirements. It’s a literary example, but the experience shares some design parallels with the candy machine.

Several months ago, I wrote a review of the children’s biography Who Was Sacagawea? on Debbie Reese’s American Indians in Children’s Literature website. I have as little background in Native American Studies as I do in mechanical engineering, but in both cases I possessed just enough experience in vaguely parallel fields to refrain from shooting myself in the foot.

My husband once again deserves credit for the initial moment of lateral thinking. While reading aloud to my daughter, he paused in the middle of a passage and said, “That sounds fake.” I took the bull by the horns and started emailing around to figure out whether it was fake. (In this case, it was very difficult to Google because I was Googling for an absence of source material rather than a presence.)

The Domain Expert: Like many parents, I learned about American Indians in Children’s Literature only after having gotten burned repeatedly by attractive but inauthentic picture books. I emailed Dr. Reese asking about the fake scene in Who Was Sacagawea? but ended up getting a faster response from another source. When I shared what I had learned with Dr. Reese, she asked if I’d be willing to write a review for her website. I was surprised but said yes. I knew I’d make mistakes, but I also knew that her involvement would prevent my mistakes from ending up in the finished product.

Letting Go of Preconceptions: I could have just written up the fake scene and called it a day. But I had a sense that something deeper was wrong, in the same way that traditional Thanksgiving stories about Pilgrims and Indians are wrong — not just factually incorrect, but morally wrong. So I let go of existing preconceptions, dug deeper into the historical record, and wrote a very different piece from what I had originally intended.

Early Breadth: While researching and writing my Sacagawea piece, I alternated between researching and writing my own piece and and reading through the American Indians in Children’s Literature website itself. None of it directly applied to Sacagawea (I’d emailed Dr. Reese precisely because her website didn’t contain the specific information I was looking for), but the website became a map and compass of sorts. Without this foundational lay of the land, similar to what the Kiwi crates provided for the candy dispenser, it would have been very easy to go the wrong way and dig in the wrong direction.

A Solvable Problem: I knew the limits of my research skills. They were adequate for a factual research mission, but I would never write a novel from the point of view of a Native American character. There’s an art to cherry-picking design problems that lend themselves to unexpected solutions rather than problems that are truly out of my depth.

So does my Comparative Literature background make me a better engineer? Yes it does, a thousand times over, but breaking into software engineering required too much happenstance to be repeatable, and I’m now quite sad that I missed out entirely on mechanical engineering as a high school student. We all want our kids to have the things we didn’t, and I want my kids to have a robotics team.

Next in the candy machine series: The first round of design and implementation of the kid-powered candy machine.

--

--

An-Lon Chen

If I had to describe UI/UX in one word, it would be “empowerment.” I use my design and engineering skills to empower my kids in fun and creative ways.