Wilbur the Light-up, Counting, Piggy Bank

by bischoad in Circuits > Raspberry Pi

129 Views, 1 Favorites, 0 Comments

Wilbur the Light-up, Counting, Piggy Bank

70166147813__DB16ECE6-10D0-46B8-B0B5-355C1EDF1CCB.jpeg
Wilbur, the Counting Piggy Bank

Meet Wilbur, the adorable piggy bank that illuminates and tallies your coins while spinning a dollar sign medallion and uttering the sound "cha-thing"! Equipped with a hinged lid that allows for easy removal of your coins and resetting of the count, Wilbur is a delightful creation of the "Make Art" initiative, developed for Professor Gallaugher's Physical Computing class at Boston College.

Supplies

Parts/Materials:

·      1/8 in birch wood

·      14 segment LED HT16K33 Backpack

·      OLED breakout board

·      “Blue Piggy Bank Toy Gifts for Boys Girls, Unbreakable Plastic Money Bank, Coin Bank for Kids, Medium Size Piggy Banks Rewards Gift, Practical Gifts for Birthday, Baby Shower Party” From Amazon  

·      1” steel hinge

·      Continuous Rotation Servo - FeeTech FS5103R

·      Adafruit NeoPixel LED Strip w/ Alligator Clips - 30 LEDs/meter - 1 Meter - WHITE

·      Raspberry Pi Pico W

·      Magnetic contact switch (door sensor)

·      Premium Male/Male Jumper Wires - 20 x 3" (75mm)

·      Alligator Clips

·      Data USB cable

·      Adafruit APDS9960 Proximity, Light, RGB, and Gesture Sensor - STEMMA QT / Qwiic

·      Small speaker with headphone jack

·      Drill

·      2 Screws

·      Wood glue 

·      Duct tape

·      Super glue

·      Styrofoam

·      Styrofoam bowl

·      Solder wire

·      Soldering iron

Laser Cutting: Make the Base/dollar Medallion

Screen Shot 2023-03-27 at 10.09.04 PM.png

1.     Make a polygon box through https://en.makercase.com/#/ with dimensions of 5.5 in wide and 2 in tall, cut 2 in wide by .5 in tall rectangles near the bottom of the 8 side pieces, and cut a 3.5 in by 4 in oval on the top octagon using a laser cutter. 

2.     Laser cut a 1.5 in by 1.5 in circle with a dollar sign design on it into a dollar sign medallion.

3.     Put the box together using wood glue (not the top piece) and let sit to mold.

Setting Up the Piggy

IMG_2524.jpeg

1.     Cut the piggy bank in half underneath the snout and cut a 2 in wide by 1 in tall cut in the side

2.     Super glue the door switch to the bottom of the snout and near the end of the oval hole on the top octagon so that they line up.

3.     Drill a hinge onto the back of the piggy bank (underneath the tail) and to the back of the oval hole.

4.     Daisy chain the proximity sensor and the LED backpack together. 

5.     Super glue the Styrofoam inside the top of the piggy bank and place the potentiometer so that it lines up with the coin hole

6.     Drill a hinge onto the back of the piggy bank (underneath the tail) and to the back of the oval hole.

7.     Daisy chain the proximity sensor and the LED backpack together. 

8.     Super glue the Styrofoam inside the top of the piggy bank and place the potentiometer so that it lines up with the coin hole

9.     Place the LED backpack inside the side hole of the piggy (duct tape if needed).

Code

1. Download libraries adafruit_motor, adafruit_ht16k33, adafruit_apds9960, audiopwmio, audiocore

2. Find your favorite "cha-ching" sound as a .wav file and add it to a "sounds/" library in your pico.

3. Upload code into Mu and save as code.py.

Downloads

Put It All Together

IMG_2527.jpeg
IMG_2526.jpeg
IMG_2525.jpeg

1.     Attach the Pico W to the breakout board and connect the wires of the data cable, servo motor, STEMMA QT, LED lights, speaker, and door switch to their corresponding pin holes.

2.     Hot glue the servo motor to the back of the box and duct tape the dollar sign medallion to the spinning wheel.

3.     Cut a Styrofoam bowl so that the edges are only 1 in tall.

4.     Place the wires, speaker, and breakout board into the box, pull the STEMMA QT wires through the hole, and place the Styrofoam bowl inside the whole to cover up the hole.

5.     Plug the data cable into an outlet (through the rectangular hole at the bottom of one of the side pieces) and watch the money flow in!