The Face-Tracking Confectionery Cannon!

A team of mechanical and electrical engineering students at Olin College came up with a very fun semester project — a pneumatic powered marshmallow cannon that can track faces, and aim for the mouth!

The device — dubbed the Confectionery Canon — is an impressive mechanical build which required many of Olin College’s manufacturing resources such as the laser cutter, the mill, and the lathe. The majority of the device was made out of acrylic, which was chosen for easy laser cutting, and affordability. Specific aluminum pieces provide strength and were made using mostly scrap found in the shop.

Four servos, a webcam, a solenoid and an Arduino Uno make up the electrical system, which uses Python and OpenCV to track faces (GitHub). A PVC tank is used as the pneumatic reservoir, charged with a safety release valve at 30PSI. To fire the cannon, a sprinkler valve is controlled by a beefy solenoid. It currently only has a magazine capacity of 4 large marshmallows, but the team is planning on upgrading soon.

They have put together a great website with tons of information on the project, and following the break is a fun promo video they made for the project — they even got the VP of  the college to try it!

In case you haven’t been counting, we’ve shared over a dozen projects that have come out of Olin College — and they are all awesome. A CNC cake decorator, a Wii-mote controlled go kart, a machine that hand writes for you

39 thoughts on “The Face-Tracking Confectionery Cannon!

      1. Thanks, perfect and cheap for my planned gimbal. This was a long term question to solve, i was rather thinking about using flanged bearings, but this is much better.

        I will go also for steppers in this direction (and a laser cut geared ring) for panning and probably a PID controlled cont. servo for gimbal (with power over a slip ring and accelerometer feedback).

      2. vxb bearings sell them too.

        I used one on my robot arm base. They are made of aluminium with a very rough finish. They tend to stick a bit and aren’t as smooth or have as many balls as a real bearing, but the you can’t beat the price. They are also have drilled holes so they are easy to mount.

        The white “feet” in the vxb picture can easily be pulled out to reveal the drilled countersunk holes.

  1. Cool project, but I wish they showed more clips of it actually in action and working. It seems they spent a bit too much time stylizing their logos and writing bios that come off as trying too hard, and not enough time on getting it working.

    1. this. in their video proving it works, there is only 1 successful shot from who knows how many attempts, later in the video when it shoots a round at the VP of the university, it hits his chest. it doesnt seem like using face tracking in OpenCV is the best way of range finding, especially considering how different head sizes and facial features are.

      1. It does use openCV for range finding – that’s not why it isn’t accurate – this method is in general good enough.

        The problem is that they resorted to using some dumbed down formula for ballistics. Can’t say I don’t understand that as external ballistics are in general very very complicated – especially when one uses marshmallows as ammo. Also note that both distance and height of a person (position of face) has to be established to really reliably hit it.

        Personally I think they should do test firings, note range and use a lookup table

        1. This is exactly what we did–we ran into issues with uniformity of the marshmallows where if they were out of the bag for more than an hour we’d no longer get consistent results.

          We have about +/- 6in of accuracy with openCV rangefinding, but our lookup table only works for the “perfect” marshmallow.

        2. To be honest I am surprised you even got successful shots. Marshmallows are probably the worst ammo one can imagine – low density, unstable, not uniform. The only thing that can help here is turning them into drag stabilised ammo by glueing/attaching some candy with higher specific gravity to the front of marshmallows. But that’s extra work and possibly reduced safety

          1. I was also really surprised at the repeatability. When we first assembled the pneumatic cannon without the articulation, we could sight along it and hit coffee cups from across the room, as long as we picked marshmallows that looked about the same. We did consider adding weights at some point…

      2. Believe it or not, the one where someone catches it was the first try on camera.

        We spent a lot of time getting it working, but we didn’t spend a lot of time taking video of it working. :-/

      3. For some reason, I can’t reply to your comment about using a smaller bore barrel. But the design of our magazine/reloading system requires the marshmallows to fit through the hatch with only minimal compression. We found a 1″ barrel produced a pretty good seal for the average marshmallow, and (regular) PVC (afaik) only comes in .25″ increments.

    1. I thought the Battlestar G toys were banned because they were blinding kids, not choking them. The projectiles were no bigger than a pill so I wonder how you could choke on it, unless panic ensues and that leads to the body shutting down. There are toys today that pretty much have similar firepower.

      1. One of our machine shop instructors suggested this–but we also put cornstarch in the barrel to make sure the marshmallows don’t stick, so each launch would turn into a fireball. I suppose that’s not really a bad thing…

    1. Only tangentially-related, but probably worth a laugh: I used to run an airsoft shop and we had an “open chronograph”. Saw a lot of odd launcher builds, but the best was a guy with a pneumatic gobstopper-cannon that you could tell was firing by the taste of the air around the target area. Hell of a thing.

  2. A PVC tank is used as the pneumatic reservoir.

    Really? It’s food based so no steel but you couldn’t have used an aluminum or stainless or polypropylene or delrin or HDPE or anything other than PVC air tank? At least it’s pressure limited.

        1. We pressure-tested the entire system under controlled circumstances up to ~55psi, and then set a pressure relief valve to 30psi for safety reasons. For average-range (5m) shots, 10psi is plenty. And for longer-range (10m) shots, we didn’t have to go above 15psi.

          The compressor and its attached air tank are rated to 135psi, so technically that’s the maximum pressure at which we could shoot a marshmallow, however the PVC reservoir would have a decent chance of exploding (that’s bad).

  3. 3 months college time, so how much actual time?

    I’m guessing like most college projects, 95% of the work happened the weekend before it was due.

    //not that it’s all that different in the real world//

    1. Actually, surprisingly, we had it together for this project. The last few days we spent polishing up the aesthetics and working on the website, as well as tuning the rangefinding.

  4. Ping pong balls are about .4″ larger in diameter than a standard Kraft American marshmallow, and about .5″ in larger than the marshmallow’s length, I can’t tell how much “wiggle room” you left yourself in your barrel, but if it is enough it might be worth a redesigned magazine and a swap. It would give you a better ability to demonstrate the “software side” of things when the “hardware side” is more repeatable.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.