The Super Mario games were my childhood. I've always wanted to have some of the props in the games, and now that I have the tools to do it, I decided to start making them. The first up of that on my list is the Question Block. I managed to make the question block so that when you punch it, it either turns on or off. When it is triggered on or off it plays one of four sound effects from Super Mario Bros. It is designed to screw into a lightbulb socket and hang from the ceiling. If you wanted to hang it differently that can be done easily, all that has to be done is that it needs a 12V power supply routed to wherever you mount it.
Step 1: Materials and Tools
- Yellow PLA filament
- White PLA filament
- 12V White LED Strip (5m roll)
- Arduino Pro Mini (ATMEGA328P 5V 16Mhz variant)
- SW420 Vibration Sensor
- 2N2222 tranistors
- TIP120 Darlington Transistor
- DC-DC Step-down converter (for the 12V to the 5V the arduino requires)
- 0.5W 8-Ohm speaker
- 12V 1A Power Supply
- 2 Core Sheathed Wire
- Misc. Wire
- M3 screws and nuts
- 3D printer (preferably dual color, but single color will work it's just harder)
- Wire Cutters
- Wire Strippers
- Super Glue
- Philips Screwdriver
- Utility Knife
- Soldering Iron
- 60/40 Lead Solder Rosin Cored
- FTDI Programmer and Mini-B USB Cable
- Hot Glue Gun
Step 2: Printing the Enclosure (If You Have a Dual Color Printer)
If you have a dual color printer this step is pretty straightforward. Print four of the side pieces, which uses yellow for the base piece and white for the other inner pieces (the pieces for this are called yellow and white). Then print the bottom base, four braces, and the top using yellow only. Don't glue the side panels on yet because this will make installing the LED strip more difficult.
Step 3: Printing the Enclosure (If You Have a Single Color Printer)
If you are running a single color printer, while this is possible, it is much more difficult to print the side panels. All of the other pieces print exactly the same as they are single color. When printing the single color pieces print the bottom base, top, and four of the support pieces.
For the two color pieces print out four of the bases for the sides at normal settings in yellow PLA. Print out four sets of the inner pieces in white. Print out four sets of these pieces and super glue them into the holes cut out in the side panels.
Step 4: Wiring the Light
Super glue the brackets as shown in the first image stabilizing and finishing the frame of the cube. Cut pieces 12 pieces of the LED strip, each with 6 LEDS. Glue them onto the edges of the cube and wire them together. After finishing the LED's glue the side pieces on as shown in the last pictures.
Step 5: Making the Plug
Print out the parts for the plug (2xclips and 1xbody). Connect the live and neutral wires of the light socket to your power supply. Connect the 5V and GND to the red and black wires respectively (of the wire leaving the "light bulb"). Put the power supply in the body of the bulb, and then attach the clips to the bulb and housing; tightening them with M3 nuts and bolts.
Step 6: Setting Up the Arduino
Solder all of the devices as shown in the parts layout up above. Connect D11 to the speaker transistor; D10 to the vibration sensor; and D8 to the Darlington transistor. Make sure to keep the 12V and 5V lines separate, this can kill your arduino if you mix these lines up. Also before you proceed to final assembly make sure to test the electronics, because once it is finished it is hard to take it apart without breaking it.
Step 7: Programming
For the Arduino code you will need to install the PCM library. I have included the library zip inside of the zip file with the code. To install the navigate to the sketch tab, highlight the add library button, and click on add zip library. Select the zip file that I have included with this step and install it.
Plug in the Arduino Pro Mini to the FTDI programmer and plug it into the computer. Open the code in the Arduino environment, select Arduino Pro Mini 5V 16Mhz, and press upload.
Step 8: Final Assembly
Thread the wire through the hole in the top piece, connect it to the screw terminal on the board, making sure that the positive and negative wires are connected to the right terminals. Hot glue the wires of the speaker to the top so that the speaker is right beneath the slots in the top. Hot glue the power wire into the slot that it is in to keep it secure. Close up the Block by super gluing the top on. Hang it somewhere, and you're done.