Ping Pong Ball Launcher

Similar documents
Paper Airplane Launcher

Crawling Animatronic Hand

Snake Charmer Box. Created by Dano Wall. Last updated on :07:25 PM UTC

Crawling Baby Sea Turtle Robot

Crickit Dancing Marionette Kit Created by Dano Wall. Last updated on :03:11 PM UTC

Slider Crank Mechanism -- from Cardboard and Craft Sticks

Mini Golf Course with Circuit Playground and Crickit

Pushrod Garage. Created by John Park. Last updated on :07:30 PM UTC

Infinity Mirror Valentine's Candy Box

Crickit Carnival Bumper Bot

Crickit Powered Holiday Diorama

Hammer Time Mini Golf Hazard with Crickit

Reindeer Mask with Animated Eyes

Stumble-Bot. Created by Dano Wall. Last updated on :04:06 AM UTC

Adabot Operation Game

Neon LED Signs. Created by John Park. Last updated on :11:09 PM UTC

CPX Mystery Dreidel. Created by Kathy Ceceri. Last updated on :51:40 PM UTC

Circuit Playground Express Head-Tilt Ears

Bunny Ears with MakeCode

Steven Universe Cosplay Shirt & Gem Created by Erin St Blaine. Last updated on :54:25 PM UTC

Circuit Playground Express Laser Tag

Trash Panda. Created by Dano Wall. Last updated on :30:46 AM UTC

Wind Blowing Emoji Prop

NeoPixel Fairy Crown. Created by Erin St Blaine. Last updated on :22:47 AM UTC

Crickit Powered Mini Chair Swing Ride!

Con Badge with Circuit Playground Express

Easy Sparkle Pocket T-Shirt

The Scream: Interactive Screaming Painting

FLORA and GEMMA ICSP. Created by Becky Stern. Last updated on :42:16 PM UTC

FLORA TV-B-Gone. Created by Becky Stern. Last updated on :32:57 PM UTC

DIY Circuit Playground Shields

Trellis 3D Printed Enclosure

NeoPixie Dust Bag with Circuit Playground Express

Interactive Gift Box. Created by codingpro. Last updated on :47:40 AM UTC

No-Sew LED Wristband. Created by Kathy Ceceri. Last updated on :23:40 PM UTC

Prophet 600 GliGli mod

Clockwork Goggles. Created by John Park. Last updated on :03:10 PM UTC

Sword & Wand Prop Effects with Circuit Playground

FLORA and GEMMA ICSP. Created by Becky Stern. Last updated on :30:55 PM EST

NeoMatrix 8x8 Word Clock

Android GBoard Morse Code Control with Circuit Playground Express

Solar Boost Bag. Created by Becky Stern. Last updated on :44:55 PM UTC

UFO Flying Saucer with Circuit Playground Express

Portable Apple Watch Charger

Feather Weather Lamp. Created by Ruiz Brothers. Last updated on :54:26 PM UTC

PyPortal NeoPixel Color Picker Created by Kattni Rembor. Last updated on :42:41 PM UTC

BLE Light Switch with Feather nrf52840 and Crickit

NeoPixel Ring Bangle Bracelet

Audio Prank Gift Box. Created by Becky Stern. Last updated on :46:15 PM UTC

i2c/spi LCD Backpack Created by lady ada Last updated on :11:04 PM UTC

Adafruit Capacitive Touch Sensor Breakouts

HalloWing Jump Scare Trap

3D Printed 20w Amplifier Box

PyPortal View Master Created by Ruiz Brothers. Last updated on :51:28 AM UTC

NeoPixel Manicure. Created by Sophy Wong. Last updated on :50:38 PM UTC

Adafruit MCP9808 Precision I2C Temperature Sensor Guide

Milk Jug Glow Skull. Created by John Park. Last updated on :28:36 PM UTC

Joy Featherwing. Created by Dean Miller. Last updated on :03:07 PM UTC

LED Eyes. Created by Ruiz Brothers. Last updated on :50:55 AM UTC

Mystical LED Halloween Hood

'Sup Brows. Created by Kate Hartman. Last updated on :52:04 PM UTC

Circuit Playground Yoyo

Simple LED Unicorn Horn

GPS Logging Dog Harness

Guardian Shield+ Zelda Breath of the Wild

Adafruit TPL5110 Power Timer Breakout

NeoPixel Bike Light. Created by Ruiz Brothers. Last updated on :43:46 PM UTC

Interior Purse Light. Created by Becky Stern. Last updated on :41:08 PM UTC

3D Printed Google AIY Voice Kit

Bike Wheel POV Display

Adafruit VL53L0X Time of Flight Micro-LIDAR Distance Sensor Breakout

Phone-Activated Talking Dog Collar

CircuitPython Snow Globe

FeatherWing Proto, Doubler and Tripler

Fiddy - the FTDI Clip

Glowing Smokey Skull. Created by Ruiz Brothers. Last updated on :03:40 PM UTC

Luminous LED Flowers. Created by Becky Stern. Last updated on :47:44 PM UTC

Tent Lantern. Created by Timothy Reese. Last updated on :17:25 AM UTC

Adafruit Si7021 Temperature + Humidity Sensor

Trinket NeoPixel LED Longboard

Adafruit LED Sequins. Created by Becky Stern. Last updated on :02:00 AM UTC

3D Printed 20w Amplifier Box

Adafruit Pi Cobbler Kit

Adafruit 8x16 LED Matrix FeatherWing

Modifying Servos for Continuous Rotation

Learning with LEDs. Created by Rick Winscot. Last updated on :39:11 PM UTC

Circuit Playground Combadge

FLORA Pixel Brooch. Created by Becky Stern. Last updated on :19:07 PM EST

TRON Bag. Created by Becky Stern

MCP Bit DAC Tutorial

FeatherWing Proto and Doubler

Fiddy - the FTDI Clip

Adafruit Mini TFT " 160x80

3D Printed LED Buckle

Adafruit PowerBoost 500 Shield

MiniPOV4 - DIY Full-Color Persistence of Vision & Light-Painting Kit

DIY Wireless DDR Dance Pad with Bluefruit EZ-Key

Secret Hollow Book Intrusion Detector

3D Printing Guide: MakerBot Replicator 2X

FPV Mini Display. Created by Ruiz Brothers. Last updated on :00:18 PM UTC

Transcription:

Ping Pong Ball Launcher Created by Dano Wall Last updated on 2019-01-25 03:19:13 AM UTC

Guide Contents Guide Contents Overview Electronic Parts Circuit Playground Express USB cable - USB A to Micro-B Alkaline AAA batteries - 3 pack 3 x AAA Battery Holder with On/Off Switch and 2-Pin JST CD DVD Spindle Motor Small Alligator Clip to Male Jumper Wire Bundle - 12 Pieces Small Alligator Clip Test Lead (set of 12) Wheel for Micro Continuous Rotation FS90R Servo Materials MakeCode Getting into Bootloader Mode The Code How to upload code Occam's Code Test the Circuit CD/DVD Motor Test Servo Motor Test Troubleshooting Motor Assembly Make a Piston Piston assembly Piston Platform Adjustable Platform Use a Brace Prepare the Launch Wheel Cardboard Construction The Platform Cut holes for Motor Launching Tube Ping Pong Ball Magazine Guard Rails Mount Electronics Glue Motor Piston Positioning Cable Wrangling Launch Ping Pong Balls! Exploring further 2 3 3 3 3 4 4 4 4 5 5 5 6 6 6 6 7 7 8 9 9 11 11 11 14 14 15 16 17 17 18 20 22 24 26 26 26 28 29 30 Adafruit Industries https://learn.adafruit.com/ping-pong-ball-launcher-with-cpx Page 2 of 31

Overview This fun ping pong ball launcher is constructed out of scrap materials and outfitted with some Adafruit electronics, creating a simple and highly entertaining introduction to basic mechanical concepts and coding. The materials for this project are all things you can find around the house. This project uses the Circuit Playground Express microcontroller programmed in Microsoft MakeCode for easy upload and changes. Electronic Parts Your browser does not support the video tag. Circuit Playground Express $24.95 IN STOCK ADD TO CART USB cable - USB A to Micro-B $2.95 IN STOCK ADD TO CART Adafruit Industries https://learn.adafruit.com/ping-pong-ball-launcher-with-cpx Page 3 of 31

Alkaline AAA batteries - 3 pack $1.50 IN STOCK ADD TO CART 3 x AAA Battery Holder with On/Off Switch and 2-Pin JST $1.95 IN STOCK ADD TO CART Your browser does not support the video tag. CD DVD Spindle Motor $1.95 IN STOCK ADD TO CART Small Alligator Clip to Male Jumper Wire Bundle - 12 Pieces $7.95 IN STOCK ADD TO CART Adafruit Industries https://learn.adafruit.com/ping-pong-ball-launcher-with-cpx Page 4 of 31

Small Alligator Clip Test Lead (set of 12) $3.95 IN STOCK ADD TO CART Wheel for Micro Continuous Rotation FS90R Servo $2.50 IN STOCK ADD TO CART Materials For this project you will need: Some large pieces of scrap corrugated cardboard Scissors and/or box cutter Hot glue & hot glue gun (https://adafru.it/djk) Ping pong balls (https://adafru.it/djl) Double-sided foam tape (https://adafru.it/cni) Pen/pencil Adafruit Industries https://learn.adafruit.com/ping-pong-ball-launcher-with-cpx Page 5 of 31

MakeCode Before going much further, it's a good idea to make sure our motors and code will work as expected. For this project we will be using Microsoft MakeCode for Adafruit, a web-based code editor. It provides a block editor, similar to Scratch or Code.org, and also a JavaScript editor for more advanced users. If you haven't used MakeCode before, this guide is a good place to start (https://adafru.it/bdk). Getting into Bootloader Mode Your Circuit Playground Express board comes ready to work with CircuitPython. When you connect the board to your computer for the first time, it will appear as a flash (or thumb) drive named CIRCUITPY. BUT We'd like to make it work with MakeCode, which is done by putting it into "bootloader mode". All that's required to do this is to connect the board to your computer with a micro USB cable and click the small reset button in the center of the board. The available thumb drive should change from CIRCUITPY to CPLAYBOOT. Your code file will be placed on CPLAYBOOT. The Code Click this link (https://adafru.it/djm) or enter the portal below to interact with and change the code used in this project. How to upload code To upload code, connect you Circuit Playground Express to your computer using the micro USB cable, click the Download button in the above portal to download the.uf2 file to your computer, and drag 'n drop it onto the CPLAYBOOT drive. Adafruit Industries https://learn.adafruit.com/ping-pong-ball-launcher-with-cpx Page 6 of 31

The drive will automatically eject itself. (Your computer may give you a "failed to eject drive correctly" error, you can ignore this.) Occam's Code The code for this project is as simple as it gets, and that's ok! All we need is a start and stop function for the servo motor, so we can start and stop firing ping pong balls when we want. If you'd like to make changes, such as increasing or decreasing the rate at which balls are launched, you can change the value in the servo write pin A1 block from 180 to something smaller, like 120, and the motor will turn slower, thus launching balls at a slower rate. Test the Circuit Once your code is uploaded to Circuit Playground Express, connect the motors (one at a time is easiest to manage), and test that they both respond as expected. Adafruit Industries https://learn.adafruit.com/ping-pong-ball-launcher-with-cpx Page 7 of 31

CD/DVD Motor Test The motor that will provide the power to launch the balls is a DC motor, of the variety originally used in CD and DVD players. This type of motor only needs to be connected to a power source to run, so connecting to a ground pad and power pad on the Circuit Playground Express will automatically start it spinning. Use alligator clips to connect the Black wire to GND, then connect a second alligator clip to the red wire and touch the 3.3V pad with the tip. Your motor should respond right away by spinning up to full speed. Adafruit Industries https://learn.adafruit.com/ping-pong-ball-launcher-with-cpx Page 8 of 31

Servo Motor Test The motor that will push the ping pong balls into the path of the spinning wheel is a continuous rotation servo (https://adafru.it/kfr) (not to be confused with a regular servo motor (https://adafru.it/f1g), which can only turn 90 degrees in either direction). This motor can't spin as fast as a DC motor, but can be controlled with much greater precision. Connect the servo motor to Circuit Playground Express by running the: Brown wire to GND, Red wire to Vout, and Yellow wire to the A1 pad When you press the A Button the motor should start slowly spinning, pressing the B Button will bring it to a stop. Troubleshooting Problem: My motor isn't spinning! Solution: Make sure that your Circuit Playground Express is connected to a power source (anywhere between 3V-5V is safe). If you're using a AAAx3 battery pack, check that the switch on the battery pack is set to "ON". Problem: My Circuit Playground Express doesn't show up as CPLAYBOOT! Solution: Your Circuit Playground Express board comes ready to work with CircuitPython, and will show up as a flash drive named CIRCUITPY the first time it's connected to your computer. To switch over to work with MakeCode, connect the board to your computer with a micro USB cable and click the small reset button in the center of the board. When Circuit Playground Express is in Bootloader mode, all the LEDs will flash red briefly, then turn green. Your computer should now show removable drive called CPLAYBOOT. Now you can copy the MakeCode file to the CPLAYBOOT flash drive. Adafruit Industries https://learn.adafruit.com/ping-pong-ball-launcher-with-cpx Page 9 of 31

Adafruit Industries https://learn.adafruit.com/ping-pong-ball-launcher-with-cpx Page 10 of 31

Motor Assembly Some prep work is needed before moving on to making the rest of this launcher. In this step we will prepare the DC and servo motors so that they will be easy to install later on. Make a Piston Glue a small square of cardboard to the end of a 4" length of straw. Poke a hole in the other end with a piece of wire or paper clip. Piston assembly Cut a straight length of metal from a paper clip. Introduce a 90 degree bend to one end. Stick this through a hole around the outer edge of the servo wheel and glue in place. Stick the straw onto the wheel. Adafruit Industries https://learn.adafruit.com/ping-pong-ball-launcher-with-cpx Page 11 of 31

Adafruit Industries https://learn.adafruit.com/ping-pong-ball-launcher-with-cpx Page 12 of 31

Piston Platform Create a small elevated platform for the servo motor to sit on. Use a square of double sided tape to stick the servo motor on top. Adjustable Platform You may notice this small platform is able to wobble back and forth. This is to our benefit. Positioning the piston perfectly can be hard. This small wobble will allow for fine tuning the position of the piston even after it's stuck to the platform. Adafruit Industries https://learn.adafruit.com/ping-pong-ball-launcher-with-cpx Page 13 of 31

Use a Brace Adjust position of servo motor as necessary so that ping pong balls are just able to fall into place when the piston is pulled back as far as it will go. Only when you are 100% certain of the position of the piston should you glue the brace to the adjustable platform. Adafruit Industries https://learn.adafruit.com/ping-pong-ball-launcher-with-cpx Page 14 of 31

Prepare the Launch Wheel These wheels come with a grippy rubber ring, which will reliably grab and launch the ping pong balls. The wheel centers itself conveniently on top of the CD/DVD motor. Place it on the motor to feel where it engages. Use hot glue to connect the wheel to the top of the motor. Once the glue has cooled a bit, spin it to make sure it's centered and well-balanced. At the speeds this will be going, a wobbly wheel is no good. Adafruit Industries https://learn.adafruit.com/ping-pong-ball-launcher-with-cpx Page 15 of 31

Cardboard Construction The Platform A fast and easy way to create the 3-dimensional shape we need is to cut a single outline that will be folded into the desired shape. You have some freedom here, you're not necessarily constrained to follow this example exactly. Any shape with a handle and enough real estate to mount all the electronics on will work just fine. Adafruit Industries https://learn.adafruit.com/ping-pong-ball-launcher-with-cpx Page 16 of 31

Cut holes for Motor Draw the outline of the motor on the edge of the cardboard. Be careful not to position it too close to the handle. Cut a space for the motor hub to fit. Cut another hole in the top for the wheel to poke through. This should be long enough for the wheel to poke about 1/4" through the top. Adafruit Industries https://learn.adafruit.com/ping-pong-ball-launcher-with-cpx Page 17 of 31

Adafruit Industries https://learn.adafruit.com/ping-pong-ball-launcher-with-cpx Page 18 of 31

Launching Tube Cut about 2 inches off the end of a cardboard tube from a paper towel roll. Cut a small gap from this short piece of tube. Glue this section of tube over the hole cut for the motor's wheel. This will hold the ping pong ball in place so that the spinning wheel can launch it. Adafruit Industries https://learn.adafruit.com/ping-pong-ball-launcher-with-cpx Page 19 of 31

Adafruit Industries https://learn.adafruit.com/ping-pong-ball-launcher-with-cpx Page 20 of 31

Ping Pong Ball Magazine Using the remaining length of cardboard tube, trace an arc along the bottom approximately the same diameter of the ball you plan to launch. Cut along this line, testing that the ball will be able to squeeze through it, but not fall out too easily. Glue this to a rectangular section of scrap cardboard (this can be trimmed down later if needed). Adafruit Industries https://learn.adafruit.com/ping-pong-ball-launcher-with-cpx Page 21 of 31

Adafruit Industries https://learn.adafruit.com/ping-pong-ball-launcher-with-cpx Page 22 of 31

Guard Rails Glue two thin strips of cardboard along the sides of the launcher. This will keep the ping pong balls on course. Adafruit Industries https://learn.adafruit.com/ping-pong-ball-launcher-with-cpx Page 23 of 31

When you're finished you should have a cardboard launching platform and a separate magazine platform that will fit nicely onto the launcher. At this point we are ready to start adding our electronics to the launcher to get things moving! Adafruit Industries https://learn.adafruit.com/ping-pong-ball-launcher-with-cpx Page 24 of 31

Mount Electronics Glue Motor Glue the DC motor into hole you cut earlier. Feel free to use a lot of hot glue here, this motor will be spinning fast and we don't want it to vibrate itself loose. Check that the wheel lines up with the hole cut in the top of the platform and doesn't rub against the edges at any point. Piston Positioning If you haven't already fixed the position of your piston, Adafruit Industries https://learn.adafruit.com/ping-pong-ball-launcher-with-cpx Page 25 of 31

now is the time. Position servo motor on platform so that the piston is just at the edge of the opening in the tube when the rotor is all the way back. Use double sided tape to stick the entire magazine + piston assembly onto the launch platform, aligning it in front of the spinning launch wheel. Adafruit Industries https://learn.adafruit.com/ping-pong-ball-launcher-with-cpx Page 26 of 31

Cable Wrangling Everyone has a different way of managing the cables and wires that come with any electronics project. In this case, it helps to position the battery pack and Circuit Playground Express board on opposites sided of the handle, and use zip ties to keep messy wires held together in tidy(ish) bunches. Adafruit Industries https://learn.adafruit.com/ping-pong-ball-launcher-with-cpx Page 27 of 31

Launch Ping Pong Balls! Time to have fun! Turn on power to battery pack. Three AAA batteries (https://adafru.it/ahk) work well to power this project, though a AAx3 battery pack (https://adafru.it/bzh) can be used as well, providing longer run times. Press the A Button to start turning the piston. Create a target, or try to launch the balls so they land in a container, or both! Adafruit Industries https://learn.adafruit.com/ping-pong-ball-launcher-with-cpx Page 28 of 31

Press the B Button to stop launching balls. Exploring further Adafruit Industries https://learn.adafruit.com/ping-pong-ball-launcher-with-cpx Page 29 of 31

If you enjoy MakeCode and want to continue exploring you can check out lots more MakeCode projects on the Adafruit Learn System (https://adafru.it/bwv). Adafruit Industries https://learn.adafruit.com/ping-pong-ball-launcher-with-cpx Page 30 of 31