Smile Activated Marshmallow Launcher

1,730

10

3

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

Intro: Smile Activated Marshmallow Launcher

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:

Components

  1. Raspberry Pi Model 3 - https://thepihut.com/collections/raspberry-pi/pro...
  2. MotoZero motor controller - https://thepihut.com/products/motozero
  3. Micro Metal Gearmotor - https://thepihut.com/products/micro-metal-gearmot...
  4. 4xAA Battery Holder - https://thepihut.com/products/adafruit-4-x-aa-bat...
  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!

Software

  1. Raspbian - https://www.raspberrypi.org/downloads/raspbian/
  2. Open CV - Open Source Computer Vision - https://opencv.org/
  3. Smile Detection Software - download from .zip file below

Tools

  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 https://www.instructables.com/id/Smile-Detection-W... 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

sudo smile_detection_Rosemodification.py

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.

Enjoy!

Share

    Recommendations

    • Tiny Home Contest

      Tiny Home Contest
    • Metalworking Contest

      Metalworking Contest
    • Furniture Contest 2018

      Furniture Contest 2018

    3 Discussions

    0
    None
    k24tea

    21 days ago

    Smart, creative, and fun. I like this! I know a few people I'd like to encourage to smile. But I smile a lot (idiot grin) so maybe I should make it for ME! I'd want a self-loading automatic launcher. Mmmmmm, marshmallows make me smile! Pow! Mmmmm, marshmallows ...