Introduction: Smile Activated Marshmallow Launcher

About: I'm a parent with two children and a habit of starting projects without knowing where they will end.

You want to encourage guests, colleagues, friends and family to be happy? You need a Smile Activated Marshmallow Launcher. The Raspberry Pi powered "SAML" detects a smile and then launches a marshmallow at it - happiness pays off!

Step 1: Components, Software and Tools

To create your SAML you'll need:


  1. Raspberry Pi Model 3 -
  2. MotoZero motor controller -
  3. Micro Metal Gearmotor -
  4. 4xAA Battery Holder -
  5. Webcam
  6. Monitor
  7. Wifi Dongle
  8. Keyboard
  9. Mouse
  10. USB and Power Cables for Raspberry Pi
  11. Wire
  12. 4 AA Batteries
  13. Toy Catapult
  14. Coat Hanger
  15. String
  16. Safety Pin
  17. Solder
  18. Duct Tape
  19. Marshmallows!


  1. Raspbian -
  2. Open CV - Open Source Computer Vision -
  3. Smile Detection Software - download from .zip file below


  1. Soldering Iron
  2. Small Screwdriver
  3. Wire Stripper
  4. Wire Cutter
  5. Scissors
  6. Pliers

Ready? OK - next step...

Step 2: Installing the Software

OK so you have collected the components. Start by focusing on the Raspberry Pi. Connect the power supply, keyboard and mouse, internet (wifi dongle or ethernet), monitor and USB camera. Switch on the power and when you're online, download Raspbian.

Next you'll need to download Open CV, a computer vision library, and then the smile detection software in the .zip file below. There is a great Instructable at which will take you through this. We modified the smile detection software by inserting instructions from the MotoZero motor controller manual so that rather than printing a message on the screen, the Raspberry Pi instead activates the motor via the GPIO pins and the MotoZero motor controller (we'll come on to how to set them up later). The modified Smile Detection software includes the instruction for the motor to run for half a second when a smile is detected.

Step 3: Assembling the Hardware

You've already put together the Raspberry Pi, and installed the software, so now it's time to get creative with the launcher. For us this meant adapting a broken old catapult that the children had lying around. There is plenty of leeway for other launchers, but the firing controller works like this.

Start with the MotoZero motor controller. Follow the instructions to solder the components together. Then attach to the GPIO pins on the Raspberry Pi. Then Insert 4 AA batteries into the battery holder and connect to the power pins of the MotoZero. Be careful to use the correct polarity. Then connect the Micro Metal Gearmotor to the MotoZero terminals for motor 1.

Next you need to figure out how to use the 0.5 second rotation of the Gearmotor to trigger the launcher. For us this involved taping the motor to the side of the catapult, taping some string with a trimmed safety pin at the other end to the axle of the Gearmotor, and feeding this through a retainer made by bending a coat hanger so that we could hold the arm of the catapult down and release it by rotating the motor and winding the string around the axle.

There will be much tidier ways to do this.

Next align the catapult with the webcam so that the marshmallow is fired towards the smiling face.

Finally, arm the catapult and load with a marshmallow!

Step 4: Activation!

Hardware all set up? The next stage is to run the Smile Detection Python Programme.

Start by opening a terminal window. If you have installed the software on your desktop you will need the following commands:

cd desktop

cd smile_detection


This should open the correct folder and then run the software. A window will open showing the webcam view, and once your smile is recognised - the motor will run, triggering the catapult.


Creative Misuse Contest

Participated in the
Creative Misuse Contest