Halloween Candy Machine | Part 7 of 8

Troubleshooting

A grab bag of techniques to address a frequently misunderstood and overlooked part of the design journey

An-Lon Chen
9 min readApr 19, 2022

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

The kid-powered Halloween candy machine I had designed and built was mostly working. In the video below, my daughter Nora manually pulls a string to release the candy from the tower. The string runs through two pulleys to a water bottle weight, which resets the mechanism for the next piece of candy.

Getting to the proof of concept was a big milestone, but I was only halfway through the project. I still needed to make the mechanism reliable.

The candy jams caused by Nora’s careful, measured pulling of the string were subtle in contrast with the candy flinging caused by my husband Jeremy’s brute force.

This first round of testing also revealed some design possibilities that hadn’t previously occurred to me. Jeremy had managed to launch the candy at a much higher velocity than I had anticipated, but the downward tilt of the seesaw masked the projectile effect. My notes indicate that I considered this a feature rather than a bug.

Slider mechanism alone would allow you to build a Kit Kat machine gun. No Fun Mom doesn’t want that, hence the mechanism that tilts the candy into a slide. I guess Mark Rober would be disappointed.

I still needed to build the stand, the foot pedal, the full-sized version of the candy tower, and the final slide that would deliver the candy to the kid. Much as I wanted to focus on the candy jam immediately, to the exclusion of all else, I realized that building the stand and foot pedal would both speed up and inform the candy jam testing.

Troubleshooting is notoriously difficult to teach or write about, because no two problems are the same. What I offer here is a case study, with a few different methodological approaches. Sometimes the solution is to go back to the drawing board. Sometimes the solution is to do research. Sometimes the solution is play around with physical components. And sometimes the solution is to walk away and come back with a fresh eye.

Trigonometry Break

I am not usually a fan of math for the sake of math. However, I was accumulating a pile of increasingly esoteric rejected sketches.

I knew that the foot pedal would operate a lever to pull the string, but I was losing track of how long the lever needed to be and which way the string needed to run.

Sketch of the foot pedal for the candy machine.
A half inch dowel serves as the axel for the foot pedal, running through the pictured holes.

So I jumped back into Adobe Illustrator and worked out the trigonometry to scale.

There’s a bit of fake precision to these diagrams. My main purpose to see if the dimensions were within a reasonable ballpark. Once I was satisfied that they were, I headed to the garage and with the intent of figuring things out as I went along. Banging together something rough with 2x4s and construction screws is much easier than doing the more precise detail work of building the candy tower.

Adobe Illustrator orthogonal diagrams of the stand, slide, and foot pedal.
Jeremy, proofreading: “That should be 10” downward displacement, not force.” Me: “See? Fake precision.”

Despite the numeric specificity of the above diagram, I wasn’t completely sure where I was going. The design of the stand, the arm, the square brackets for the slide, and the foot pedal was governed more by the scrap materials I happened to have on hand than any larger guiding principal.

Candy Jams and Cartoon Physics

Having built the stand and foot pedal, I could finally proceed to another round of testing. The annoying thing about the candy jams was that I wasn’t usually the one who caused them. Nora and Jeremy were the Goldilocks extremes that kept me honest.

Nora pulls slowly and in odd directions, causes odd wedging.
Jeremy pulls too hard and sends things flying.
A Hershey’s bar causes a candy jam inside the tower.
The Hershey’s bar on the bottom got wedged at a weird angle.

A first step was getting rid of the Hershey’s bars, which were slightly smaller than the Kit Kats. This helped, but didn’t entirely get rid of the candy jams.

I figured that I needed some sort of weighted “lid compressor thing” to address both the wedging caused by slow pullers and the flinging caused by fast pullers.

Design sketch of a “lid compressor thing.”

I don’t remember what search terms finally led me beyond stock image sites of boxing gloves on a spring, but I finally found what I needed in Kyle Hepworth’s blog post about constructing a gag gift. His photos clearly show where I would need to put the springs on a scissor arm in order to turn it into a “lid compressor thing.”

Though I did a quick Illustrator workup of how a scissor arm might sit within the candy tower, I was very leery of the extra work it would take and continued to search for ways to avoid it.

As a first stab at weighing down the candy stack, I tried putting a plumb bob on top of the candy. The idea wasn’t terrible, but the plumb bob wasn’t really the right shape and it sometimes got wedged. Hex nuts on a string made for a more workable solution. My notes indicate that I should credit Jeremy for this innovation. I caught him sneaking around trying to fix the candy machine while I was out running errands.

In the picture above, the string of hex nuts sits loose within the candy tower.

Here is a testing video that shows how the candy machine behaved with and without the weights.

The weights mostly served their purpose, but I couldn’t guarantee that they wouldn’t get flung out or dislodged. I also didn’t want a kid to physically reach in and walk off with them. (Software engineers are paranoid about security. Why a kid would walk off with the weights rather than the candy, I have no idea. But I didn’t want it to happen.)

I tried various ideas that involved tethering the weights to the sides of the tower, but they all failed in the same way. Unless I tied the string so loosely that it defeated the purpose, the weights never reliably made it to the bottom of the tower without getting snagged.

A string of weights mysteriously maintaining its position on the side of the candy tower.
The string of weights mysteriously maintains its position halfway up the side of the candy tower.

I was convinced that the reason for this had something to do with the pole-climbing scene in Disney’s Mulan.

Source: Disney’s YouTube Channel

Unfortunately, clever camera angles and quick cuts between shots helped fudge the actual pole-climbing mechanics. After several consecutive Youtube viewings of I’ll Make a Man out of You, I emerged with nothing more than an incurable earworm.

I eventually figured out from empirical testing that putting weights on both sides of the tower column solved the problem.

Weights on both sides of the candy tower wall

Later, Jeremy helped me work out an intuitive understanding of the physics. Friction causes the initial snagging. When the string is weighted on only one side, it hangs at a slight diagonal. The diagonal orientation causes the string’s tension force to have both an upwards and a horizontal component, and the upwards component is enough to counteract gravity.

On the other hand, when both sides of the string are weighted, all the tension is in a horizontal direction with no upward component, and the friction alone is not enough to counteract gravity.

There was one more class of candy jams I still needed to address: the contrived ones. I discovered while wearing my Quality Assurance hat that if I went out of my way to push a piece of candy almost the entire way way out and then retracted the slider, I could manufacture a candy jam that could not be fixed simply by trying again. The slider got stuck against the diagonally wedged piece of candy and was not capable of dislodging it.

A candy jam caused by a diagonally wedged piece of candy

The diagonally wedged piece of candy at the bottom of the stack can’t be pushed forward by the slider, because the almost-freed piece of candy occupies the opening. Unfortunately, the almost-freed piece of candy can’t be pushed forward either, because the diagonally wedged piece of candy is resting on top of it rather than sitting next to it.

Even though it took effortful precision to achieve this somewhat artificial state, I felt the need to address it. Here are my testing notes, lightly edited for clarity:

It’s possible to inch up on the candy in the tower and wedge the next piece.Solutions: - Slightly narrower tower width.- Mount it low enough that a taller kid can reach in and un-wedge it by hand.- Foot pedal should help tentative kids. It’ll be a lot more difficult to push the slider halfway.- Can place the chute such that it’s almost a requirement to stand on the foot pedal to catch the candy.

When I built the final version of the tower, I did reduce the amount of clearance between the candy and the two sides of the tower. That made it considerably more difficult to create an artificial candy jam, but I couldn’t really guarantee that it would never happen. The same could be said of the foot pedal: it helped, but it wasn’t an ironclad guarantee.

In the end, I decided that it was an acceptable final backstop to mount the apparatus low enough that an older kid could reach over and remove the offending piece of candy by hand. I’m curious whether any of the kids would have done such a thing, but the problem never came up so I never had a chance to observe it.

A final, important design note: The need for the weights to slide all the way down the sides of the tower meant that I couldn’t add any horizontal crosspieces to the middle of the tower. They crosspieces needed to be at the very top and very bottom.

Minor Tweaks

With the big problems solved, I still needed to make a few minor tweaks. One was to glue a square dowel to the seesaw base to prevent candy from sliding off to the side prematurely. Because our driveway slopes forwards slightly and the weight of the apparatus also tilts the machine forwards slightly, the seesaw base needed that slight rim.

Spring clamps holding down a square dowel that will serve as a lip for the seesaw base

Last but not least, my two-year-old son Elias got quite upset when he saw that I’d poached his water bottle and left it dangling on a string. He immediately demanded that I give it back so he could have something to clutch while helping out with the yard work.

Elias always gets what he wants.

--

--

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.