Close
0%
0%

Smart Trick or Treat Bucket

Make your trick-or-treating experience more interactive and fun with a candy bucket that recognizes and reacts to the candy being added.

Similar projects worth following
68 views
0 followers
Halloween candy buckets are good for holding candy, but you usually don't know what you've got until you get home and dump it all out. What if your bucket could recognize "treats" (your favorite candy) vs "tricks" (what you hand off to your little siblings) and react in the moment? Create the coolest candy holder in your group with this project!

If you’ve ever gone trick or treating, you know that some houses have great treats, and some well…don’t. This smart trick or treat bucket recognizes and reacts to the candy being added.

I took an existing Halloween bucket and adapted it to hold my hardware so it is still portable and stores candy. As a piece of candy enters the top of the bucket, it triggers a motion sensor and the embedded camera takes an image, which is then passed through a pre-trained machine learning model to recognize the candy and tell me if it's a "trick" or a "treat". Based on that value, either animating lights and laugh will be the reaction , or a spooky voice will say "this is not enough"! 

This project uses the popular Raspberry Pi and some off-the-shelf components like a USB camera, ws2801 RGB LEDs, mini PIR, and small speaker that can all last on battery power for a full night of trick-or-treating! I used Viam to compose and program the components, collect images of the candy from the camera, train the ML model, and deploy my code when it was ready.

Follow along and read about how to make your own personalized smart candy bucket!

  • 1 × Raspberry Pi 4B Single Board Computer
  • 1 × Haloowoo Halloween Candy Bucket with LED Colour Lights Canvas Bag with double lining
  • 1 × NooElec 1m Addressable RGB LED Strip ws2801 RGB LEDs
  • 1 × MAX98357 I2S Audio Amplifier Module Breakout board for driving speakers
  • 1 × HiLetgo AM312 Mini PIR Motion detection component

View all 12 components

  • 1
    Access the inner lining of the candy bucket
    The way to get started making is by tearing something apart!

    Using some small scissors or razor knife, remove the top seam of the candy bucket lining as much as needed to stick your hand in and move around freely. You'll be placing components and running wire between the linings to hide away all the smarts!

  • 2
    Create an access point at the bottom of the bucket

    This is where the wires from the inner lining will reach the battery and Raspberry Pi. 

    The picture above shows where the bottom tear is placed to fit the wires that will be passed through.

  • 3
    Place the RGB light strip

    Electrical tape is a great resource.



    The light strip may have some paper backing that can be peeled off so hot glue can be applied to the strip. That will hold it in place within the lining of the bucket. Adding some electrical tape as extra measure will ensure it stays put while continuing to maneuver inside. Make sure the end of the strip with male header pins runs through the bottom access point of the bucket.

View all 17 instructions

Enjoy this project?

Share

Discussions

Dan Maloney wrote 10/27/2023 at 17:05 point

Idea for next year -- have it recognize the gross treats (Skittles, Twizzlers, Good and Plenty, etc.) and reject them with a little launcher of some kind. Rude, but hilarious.

  Are you sure? yes | no

Nick Hehr wrote 10/27/2023 at 18:59 point

Love it! :D It would be fun to design a secret compartment for sorting those treats as part of the rejection queue.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates