LEARN.PARALLAX.COM
Published on LEARN.PARALLAX.COM (https://learn.parallax.com)
Home > The Carnival Game Megaproject

The Carnival Game Megaproject

The carnival game megaproject is a series of miniature cardboard “houses”, arranged in a neighborhood, that are meant to be interacted with tactically and visually. After a visitor interacts with a house, they will receive one digit of a “secret passcode” via a 7-segment LED. After interacting with all of the houses’ features, the visitor can input the passcode to a keypad and candy will be dispensed.

These houses are done in a minimalist cardboard architecture, so you can clearly see the simple structure. Feel free to decorate them any way you want or design these games into other structures to suit your purpose.

This project would be great for a classroom to work on collaboratively, with small groups working on different parts.  Each house was developed on its own Propeller Activity Board WX. FLiP modules (with breadboards) or other Propeller development boards could also be used, and some houses could be combined to share a Propeller board if necessary.

Note: This project is a guide, and will not necessarily take you through each part step-by-step. Some basic knowledge of electronics is recommended, and in some cases you may need to substitute parts if items we use are unavailable to you.

BlocklyProp Code Download

  • If you are new to BlocklyProp, first do the Getting Started with BlocklyProp Solo tutorial.
  • Download the SVG files for the Carnival Games

Parts List:

  • (4) – Parallax ActivityBoard (#32912)
  • (1) – FlexiForce Sensor (#30056)
  • (2) – RGB LED Light Strip
  • (1) – 4×4 Matrix Membrane Keypad (#27899)
  • (2) – Pushbutton tact switch (#400-00002)
  • (3) – Standard Servo (#900-00005)
  • (3) – 7-Segment LED (#350-00027)
  • (1) – Adafruit RGB LED NeoPixel Ring 12×5050 (from the Animation Kit, #910-28188)
  • (1) – PING))) Ultrasonic Distance Sensor (#28015)
  • Assorted 3-pin Extension Cables (#751-00010)**

**Depending on the configuration of your boxes, you may need extension cables. If you’re uncertain what length you may need, Parallax offers a variety pack of different-length 3-wire extension cables.

Construction Materials:

  • Cardboard
  • Pipe Cleaners
  • Hot Glue Gun & Glue Sticks
  • String/twine
  • Silly String spray container
  • Candy – wrapped hard candies
  • Rubber Bands
  • Soldering iron (for NeoPixel ring)
  • Hard plastic/wood/other rigid material (optional, for silly string sprayer)

Game 1 - The Impossible Prize

This house has an opening where the visitor can reach inside to grab a piece of candy on a small table. The candy is even  lit up with an LED ring to make it tempting!  But, a PING))) sensor detects the visitor’s hand, and a servo flips down a bunch of hidden pipe cleaners to tickle and scare the visitor. Plus, the candy is fully glued down so no there’s treasure to claim here — except for the first secret passcode digit displayed on the 7-segment LED.

 

Build it

  • Cut an approximately “hand-sized” (or slightly larger) hole in a cardboard box
  • Attach pipe cleaners to the horn of a servo with hot glue.
  • Attach the servo with hot glue to the inside of the box, so that it can rotate the pipe cleaners across the hole opening, and also hide them when the box is not activated.
    • Remember to figure out the best way to position the servo before you glue anything down!
  • Place candy in the back of the box as a decoy, we hot glued ours down to prevent theft.
  • Cut a hole in the box for the LED ring, using the cardboard from the cut out to fill the middle of the ring, and attach it with hot glue.
    • If you dont have a NeoPixel Ring or do not want to solder, you can use several regular LEDs and wire them to the breadboard using extension wires. Or, you can leave the LEDs out entirely.
  • Attach a PING sensor in the top of the box with hot glue (or use screws/nuts if you want something less permanent), situated above the location where a hand would first enter the box.
  • Measure the distance from the sensor to the bottom of the box, either using a ruler or getting a reading from the sensor
  • Cut a small rectangle out of the front of the box that is the size and shape of your 7- segment LED, fix the 7-segment LED into the hole and hot glue it in place.

 

Wiring it:

  • You will be using the ImpossiblePrize SVG file for this part of the project. It was included in the code download at the beginning of this megaproject.

Propeller I/O Pin Connections:

  • P0-P7 – Seven-segment LED
  • P14 – PING))) Sensor
  • P15 – LED Ring
  • P17 – Servo

Note: It is best to run projects from a battery pack or wall supply, Do not try to run them off of the USB cable.

  • For the hand tickler, it is necessary to calibrate the distance for the PING))) sensor, everything else requires no action to activate besides inserting a hand.
  • You may need to change the control of the 7-segment LEDs because of wiring differences. Refer to the 7-Segment tutorial on how to wire this circuit. This LED needs to display the number 3.

Game 2 - The High Striker

This is a tall box with a vertically mounted LED strip that represents a high striker game, like you’d see at many carnivals. There is a pressure sensor on the top of the box that measures how hard it is struck, and so the LED strip can then visually display how hard the sensor was hit. The box is “won” when the user illuminates the lights above the differently colored LED near the top of the strip. Upon victory, another digit for the secret passcode is displayed on the 7-segment LED.

Build it:

  • Attach an LED strip to a cardboard box, oriented vertically.
  • Cut a slit in the top of the box for the FlexiForce sensor
  • Slide the sensor through the hole and tape it down so that it lays flush on the top of the box
  • Make a hot glue bead on a 1×1 inch piece of cardboard and let cool. This will focus the full impact to the center of the FlexiForce sensor.
  • Tape the cardboard piece centered above the FlexiForce sensor.
  • Cut a hole in the box that is the size and shape of a 7 segment LED and glue it in.

Wire it:

  • You will be using the High Striker SVG file for this part of the project. It was included in the code download at the beginning of this megaproject.

I/O Pin Connections:

  • P0-P7: 7-Segment LED
  • P15: FlexiForce (see Sense Light tutorial, the RCtime circuit is the same)
  • P17: LED Strip (follow connection instructions for your specific LED strip)

Note: It is best to run projects from a battery pack or wall supply, Do not try to run them off of the USB cable.

  • The high striker is played by hitting the piece of cardboard on top of the sensor. Getting the lights to light up past the threshold that is visible on the led strip causes a victory.
  • You may need to change the control of the 7-segment LEDs because of wiring differences. Refer to the 7-Segment tutorial on how to wire this circuit. This LED needs to display the number 2.

Game 3 - Bullseye

No construction is needed, just wiring. The bullseye game requires quick reflexes and hand-eye coordination. Press the button to stop the moving light in the middle of the LED strip.

Wire it:

  • You will be using the Bullseye SVG file for this part of the project. It was included in the code download at the beginning of this megaproject.

I/O Pin Connections:

  • P0: Pushbutton
  • P1-P8: 7-Segment LED (Refer to the 7-Segment tutorial on how to wire this circuit.)
  • P12: LED Strip (follow connection instructions for your specific LED strip)

Note: It is best to run projects from a battery pack or wall supply, Do not try to run them off of the USB cable.

  • Pressing the button when the moving light is in the middle – indicated by the blue lights – causes all of the strip to turn green to signify victory.
  • The 7-Segment LED lights up with the number 9, the final number of the passcode. Move on to the Keypad!

The Candy Dispenser and Keybox

The Dispenser

The candy dispenser incorporates a simple funnel and trapdoor that can be controlled by a servo. This allows candy to be easily loaded from the top, and it is released when the correct PIN is input into the KeyBox.

  • Make a cardboard box without a bottom and give it a detachable lid.
  • Make a funnel in the top with a hole in the middle, with a hatch that can swing open and closed
  • Attach rubber bands to either side of the hatch so that it stays closed
  • Attach a string to the underside of the hatch, so that pulling on it will open the hatch
  • Make a ramp out of cardboard that the candy will fall from the funnel into, and attach it to the inside of the box
  • Punch a hole in the ramp for the string to thread through
  • Attach a servo under the ramp so that the horn is perpendicular to the hatch
  • Attach the string to the servo, so that 0 degrees on the servo is open and 180 degrees is closed

 

The Keybox

The Key Box is the key to getting your well deserved candy. There is a keypad mounted on the box for users to put in the code that they received, it should be 329 if you followed the code as set up in this project (you can make your own code if you make a few adjustments along the way). If they get the key correct, they get a candy! If they do not, a silly string sprayer, hidden in this box, sprays them.

The Silly String Sprayer is an optional part of this project. It needs mechanical parts made from a rigid material.  We used a laser cutter and ¼”acrylic, but you could also use thin wood or other firm material. A servo activates the sprayer.

  • Cut a slit in a cardboard box for the 4×4 keypad cable to slip through
  • Hot glue the 4×4 keypad to the outside of the box
  • Cut out and assemble the Silly String Sprayer (instructions provided on their own page, optional)
  • Cut a hole in the box for the silly string to spray out of (optional, for use with silly string sprayer)

 

Wire it:

  • You will be using the KeyboxDispenser SVG file for this part of the project. It was included in the code download at the beginning of this megaproject.

I/O Pin Connections:

  • P0-P7: 4×4 keypad (See 4×4 keypad tutorial if needed)
  • P12: Dispenser Servo
  • P17: Silly String Servo

Note: It is best to run projects from a battery pack or wall supply, Do not try to run them off of the USB cable.

  • After completing each element, a number will be displayed on each 7-segment LED. Input those values into the 4×4 keypad correctly, and you get candy!
  • But beware, typing incorrect numbers will get you shot with silly string!

Silly String Sprayer

To create the silly string spray device you will need to either:

  1. Use the Silly String Laser Cutter Files (DXF) with a laser cutter, or
  2. cut the proper shapes out of rigid material (such as wood or hard plastic) using the file download and provided scale as a guide.

Download the Silly String Parts File (DXF)

You will need a program capable of opening a .dxf document to open the parts file.

Hardware Required:

  • (10) – 1” Standoffs #700-00060
  • (5) – ½” Spacers #713-00007
  • (5) – L brackets #720-00011
  • (1) – 1.75” 4-40 screw #700-00041
  • (3) – ⅞” 4-40 screws #710-00007
  • (1) – 1.25” 4-40 screw #710-00042
  • (5) – 4-40 lock nuts #700-00024
  • (19) – ⅜” 4-40 screws #700-00002
  • (7) – ⅛” Nylon spacers #700-00015
  • (1) – 4-cell battery pack #700-00038
  • (4) – pcb feet #700-00037
  • (1) – ⅝” 4-40 screw #710-00029
  • (1) – Standard Servo #900-00005

Project Scale:

4.5×4.5 Inches

 

Assembly Instructions:

CAUTION: Always wear safety glasses when working with drills, hot glue, laser cutters or other tools!

  • Cut out all of the pieces and lay them out, like this:

  • Attach rubber feet to each corner of the base plate:

  • Attach 4 1” Standoffs in each corner, using ⅜” screws and these holes:

                                              

  • Make sure to screw them in from the bottom, on the side with the feet.It should now look like this:

                         

  • Attach L brackets to the top of each standoff with ⅜” screws, with the taller side of the Bracket facing up, and attaching the screws through the second hole of each bracket:          

  • Attach a cross piece to the top of a bracket using a ⅜” screw and a 1” stand off. Include a nylon spacer between the cross piece and the standoff. Make sure that the cross piece is one of the two that have a slit on one end. Add another screw to the next hole on the cross piece,with another spacer and standoff attached.

  • Attach the far left standoff to the bracket across from it with a ⅝” screw, ½” spacer, and a nylon spacer in between the bracket and the ½” spacer, leaving a gap for the servo between the 1” standoff and spacer.

  • Place the servo in the gap that was left in the previous step, and tighten the screw.
  • Attach the servo to the other standoff with a ⅜” screw.

  • Attach the cross piece to the top of the other bracket using a ⅜” screw and a 1” stand off. Do not include a nylon spacer between the cross piece and the standoff. Make sure you are connecting the slit end of the cross piece.

  • Attach the vertical piece to the bracket and the standoff using a ⅞” screw, with a nylon spacer between the bracket and the vertical piece.

  • Attach the other cross piece with a slit to (2) 1” standoffs in the same manner as the lower cross piece, and attach the servo to the other side of the standoffs:

  • Attach the vertical piece to the other side of the cross piece, using a ⅜” and ⅞” screw, with a 1” standoff and ½” spacer in between.

  • Attach the swing piece to the vertical piece with a 1.25” screw and the 3 round spacers in between. Use a lock nut to fasten the screw.

  • Attach an L bracket to the Swing piece so that it hits squarely on the top of the silly string sprayer.

  • Attach the servo piece (looks like a cross piece without the slit) to the opposite side of the swing piece.

  • Remove the servo head, cut off 3 of the horns carefully, and drill out one of the holes with a #36 drill bit.

  • Attach the servo piece to the servo horn with a ⅝” Screw, 2 nylon spacers, and a lock nut.

  • Place the spray bottle in the open area, and attach the servo horn to the servo

You’re finished! Have fun spraying your friends!

DISCUSSION FORUMS | PARALLAX INC. STORE

About | Terms of Use | Feedback: learn@parallax.com | Copyright©Parallax Inc. 2024


Source URL:https://learn.parallax.com/courses/the-carnival-game-megaproject/
Links