I’ve said it before, and it should surprise no one here, but Halloween is catnip for makers. Some of us will make amazing costumes, others will create incredible experiences in their yard for trick-or-treaters. Starting last year, however, a new reason to get creative for Halloween has been introduced - social distancing. Last year, many neighborhoods cancelled trick-or-treating altogether, or made suggestions regarding how to get candy to the kids while keeping a distance of at least six feet. So this year, instead of an amazing costume or an amazing display at my house, I’m going to spend my energies focusing on how to deliver candy to kids while keeping a safe distance. And of course, making it much more complicated than it needs to be.
There are several homes in my neighborhood that have added PVC tubing down the handrail of their porch steps, and these are simple and effective. Kids stand at the bottom of the stairs, yell “trick-or-treat!” and the homeowner puts candy into the PVC tubing, it slides down the tube and into the recipient’s candy sack, and they head on their way to the next bounty. While “simple and effective” is great, I’m looking for more of a “complicated, possibly effective, potentially dangerous, definitely ridiculous” type of build.
My first step was to figure out what was needed for this project. First, of course, it needed to deliver candy over a distance of at least six feet (or about two meters). Second, its delivery should be consistently accurate - kid stands on the X, kid receives candy. Those are the big ones. Also on the list for me, I wanted to use electronic and mechanical components, and I wanted to somehow involve the kids and let them be an active part of receiving the candy. I decided that using a pair of ESP32 boards, in my case our ESP32 Thing Plus boards, would be a good way to let the kids take an active part in the candy delivery process. Kid pushes button, something magic happens, kid gets candy. Easy-peasy!
For the actual delivery system, the obvious choice for me was a trebuchet. I’ve built them and I’ve received them as gifts, and their design seemed perfect for long distance candy delivery with consistent accuracy. However, I had a hard time figuring out how to pull back the beam and engage the hook, set the pouch, insert the candy bar, and release the arm without using half a dozen motors and servos. So then I moved on to other possible siege engines. Thoughts of a mangonel, the tension-based style catapult, came to mind, but there were similar issues. A ballista, which is basically a giant crossbow, seemed like it might be perfect. The system to pull back the drawstring and trip the release pin could be side by side, it would probably be fairly simple to drop the candy bar onto the slider, and like most siege engines, it should be quite consistent. I started thinking seriously about this, but realized that parents, especially of younger kids, might not be comfortable with their child staring down the business end of what most would see as a home-built crossbow, even if it only delivered delicious candy bars.
The next idea that came to mind was based on a fast build I had previously done to demonstrate one of our distance sensors. I called it the Peep-shooter, and was pretty much just a downsized baseball pitching machine. A peep was fed in between two spinning wheels, which would propel the marshmallow treat forward. My concern here was that to achieve enough friction to shoot the candy bars far enough, I would risk crushing the chocolate shell, leaving the kids with a sticky mess of caramel, nougat, or whatever else fills the candy bar. Finally, I settled on the less used but more optimal for my needs design: the arm-style pitching machine. This could potentially be operated from a single motor, and once built, I could dress it up in humanoid form - robot, zombie, ghost if I run out of time, cute anime character, whatever. Definitely better than staring at a siege weapon, hoping that the projectile turns out to be more treat and less trick.
I based the size of the design on nothing more than the structural components I had on hand. As a lover of mechanical design, I never miss a chance to add components to my collection when I find them cheap, or (better yet) when they show up on the free table at work. It’s my hope that I can create a bot capable of launching full-sized candy bars, because who doesn’t like to be the neighborhood hero at least one day out of the year? However, I'll probably take an impressive throw of a small-sized candy bar over a weak, pathetic toss of a full sized candy bar, if it comes to that.
For the final (?) design, I’m going with a pair of SparkFun Thing Plus ESP32 WROOM boards (actually, one of them is our limited edition Thing Plus Skeleboard ESP32 WROOM, because it is a Halloween build), a Big Red Dome Button, a SparkFun ProDriver Stepper Motor Driver (TC78H670FTG), and a Stepper Motor - 68 oz.in 400 steps/rev. I probably could have gone with a direct drive system, but not being sure of how much torque would be necessary, I went with a chain drive setup to give myself a little mechanical advantage. And of course, I designed a few 3D printed elements where necessary.
Since we don’t have a Bluetooth peer-to-peer example in our hookup guide that uses a pair of ESP32 modules (our Bluetooth P2P example uses a phone on one end), I thought that I would communicate that way, to give a quick look at how easy it is. Using the ESP-NOW protocol allows for one-way communication, two-way communication, sending data to multiple modules, receiving data from multiple devices, and full communication between multiple modules. And while the message payload is limited to 250 bytes, that’s plenty for our needs on this (and many other) projects.
The code has been tested and communication seems fine, but it will require a little more clean-up and fine tuning. I still need to build a hopper to feed the candy bars to the arm, test the tension along with the throwing distance and trajectory, and do all of the troubleshooting to make sure everything is kid-proof (always a challenge!). I’ll follow up with another post one it’s all completed, and include the Arduino sketch I'm using, but the fact that it’s at this stage before October 30th puts me well ahead of most previous years!
If you’ve got a good Halloween build underway, we would love to hear about it. Drop a note in the comments and let us know about it! And of course, Happy (Haunted) Hacking!
No comments:
Post a Comment