Electronic Puzzle Cube

by spencerlvtx in Circuits > Electronics

1657 Views, 13 Favorites, 0 Comments

Electronic Puzzle Cube

Electronic puzzle box.png

This is the Technological Tesseract--an electronic puzzle box. The goal of this puzzle is to connect three wires to the jacks in the correct configuration to make the LED matrix light up in a fun way. There are four different colored jacks (red, blue, green, and yellow) on each face, and a shape on each face to serve as an indicator (triangle, square, pentagon, and hexagon). To determine where to plug in the wires, you must solve the a series of puzzles.

The motivation behind this puzzle box was to tell my parents and my in-laws that my wife and I were pregnant. After we started working on it, we saw the puzzle box from Glass Onion and mentioned to our families that it would be fun to make something like that. It was a great marketing tool to keep them from suspecting anything. After sending the finished product off to each of them, they were enthralled and had a blast solving it. They didn't suspect a thing when the words, "WE'RE PREGNANT!!!" rolled across the LED Matrix. We got some priceless reactions and wanted to share our process so that others can hopefully have some fun moments with the design.

Supplies

IMG_6752.jpg
IMG_6753.jpg

Required Tools

Soldering Iron

Wire strippers

3D printer (You don't have to own one, you just need access to one--many local libraries have one)

Phillips Screwdriver for small screws

Safety Glasses

Est. Required Tool Cost (excluding 3D printer): $52.78

Est. Required Tool Cost (including 3D printer): $230.96


Recommended Tools

Solder Flux

Solder Wick

Multimeter

Pliers

Breadboard

Est. Recommended Tool Cost: $60.80


Required Materials

IMPORTANT NOTE: The quantity to the left of each material refers to the total quantity needed of that specific material, not how many item purchases you should make at the given link. If you use the link, you should only purchase one (e.g., don't purchase 19 packages of M2 screws since a single package contains 30 M2x6mm screws plus 30 of a few other sizes as well).

3x AA Batteries

1x Black 3D Printer Filament (PLA)

1x White 3D Printer Filament (PLA)

1x 8x8 LED Matrix

19x M2x6mm Screws

3x Black 14 AWG black speaker wire

6x Banana plugs

1x Battery holder for 3 AA

1x Arduino Nano

2x 2N3904 Transistors

16x Banana jacks (RGBY)

1x Protoboard (4x6 cm)

2x 10k through-hole resistor

1x 1k through-hole resistor (use 10k link)

1x Solid core 22 AWG insulated Wires

1x Solder

1x Heat Shrink Package

Est. Material Cost: $174.95


Here is a link to a tabular Bill of Materials with additional comments included for tools and materials. Also, feel free to look around online for cheaper material or tool options--I tried to provide the cheapest options for the best quality, but I certainly could have missed some things. Also, I want to reiterate that you DO NOT have to own a 3D printer--you just need to have access to one. There are many online 3D print services which can do the job. Also, sometimes public places such like a local library may have a 3D printer available for use. That being said, the Creality Ender 3 is frequently regarded as one of the best bang-for-buck printers, and is what I own myself.

3D Print Pieces

image_2023-06-12_232442900.png

Tools/Materials needed: 3D printer, Black 3D printer filament, White 3D printer filament

There are 4 major pieces that need to be printed--the case, the battery container, the protoboard platform, and the QR code. If you print non-stop, it will likely take 1-2 days to print everything. Make sure to print the QR code separately since it requires a filament change. Below I've laid out the process depending on whether or not you have a 3D printer.


I own a 3D printer

  1. Download the STL files here for the puzzle cube
  2. Upload them to your favorite slicer (e.g., Cura, Creality Slicer, Simplify3D, etc.)
  3. Print away


I do not own a 3D printer

  1. Search your local library or public places to see if you can 3D print things there.
  2. Look through different online 3D printing services such as the ones shown here from All3DP. From All3DP's reviews, In3DTec seemed to be the cheapest--they seem to have decent online reviews as well. However, I've never used an online service before so I would recommend doing at least a little research beforehand.
  3. If you want to have the QR code be multicolored, make sure the manufacturer knows that. However, it might make it pretty expensive for a multicolored part.


Important QR Code Printing notes:

You have two options for the QR code: (1) 3D print it with black and white filaments or (2) print it on paper with an adhesive on the back (e.g., use double-sided tape or a label machine). You may also be able to print the whole thing white and color the top with a black sharpie, but I'm not sure if that would actually work. Here are the steps for multi-color 3D printing the QR code:

  1. Start the print with white filament
  2. Wait until the 2nd or 3rd layer of the QR code squares begin to form.
  3. Pause the print
  4. Switch the filament to black
  5. Continue the print to completion


CAD Notes

Here is a link to what I used to create the QR code. Also, here is a link to the CAD file in case you're interested. If the links don't work for some reason, I've added the CAD step file and STL files below.

Download Code to Arduino

Tools/Materials Requires: Arduino Nano (and plug that it came with to connect to computer)

Process

  1. If you haven't already, download the Arduino software from their website
  2. Connect your Arduino to your computer
  3. Download the FastLED library through Arduino
  4. Download the LEDMatrix and LEDText folders here to your \Arduino\libraries folder on your computer
  5. Copy my Project_puzzle_box_v1.ino code here
  6. On line 17, edit the text to be whatever you want
  7. Upload the code to the Arduino

It would also be valuable to test the code by connecting just the LED matrix to the Arduino to see if it runs as you intend. You would only need 3 wires and a breadboard.

Attach Wires to Banana Jacks

banana_jack.png

Tools/Materials needed: Banana jacks, wire strippers, pliers, wire

For the puzzle box, there are 16 banana jacks total--4 red, 4 blue, 4 green, and 4 yellow. However, only 6 of them will be part of the actual circuit (the rest will just be placeholders). Therefore, you will need attach wires to banana jacks for 2 red, 2 blue, 1 green, and 1 yellow (if you choose to follow my circuit).

My first thought was to solder the wires to the Banana jack terminal. However, by the time the terminal was hot enough for the solder to bond with the wire, the banana jack plastic started to melt. The better approach is to wrap the end of the wire through the terminal hole a few times.

Process

  1. Take a banana jack of any color
  2. Choose a wire that matches the color of the banana jack
  3. Cut the wire to about 6" (~15 cm) long
  4. Use the wire strippers to strip the end of each side of the wire, leaving about 0.75" (2 cm) of the wire core exposed
  5. Feed the exposed wire core through the banana jack terminal hole and wrap it around as many times as you can
  6. Pull the loops tight with some pliers
  7. Clamp down on the loops so that there is nice and tight contact between the wires and the banana jack terminal
  8. Repeat for each color that

Make Banana Plug Wires

Speaker_wire.png

Tools/Materials: 14 AWG black speaker wire, Banana plugs, Phillips screwdriver, Wire strippers

Option 1: Buy plugs

Click here for the cheapest option I could find for banana plug cables online. The total comes out to $20.07 + shipping. DigiKey is great and I trust them as a vendor. I didn't put this option on the BOM because it's so much cheaper per banana cable to make them yourself.


Option 2: Make plugs yourself

It's quite easy to make banana plugs yourself. Here is the process:

  1. Cut a length of 14 AWG black speaker wire of about 9-12" (22-30cm)
  2. Use the wire strippers and strip each end of the wire, leaving about 1/2" (1.25 cm) exposed
  3. Take a black banana plug and disassemble it by removing the screw with the Phillips screwdriver (you should now have a plastic cover, a metal plug, and a screw if you bought the banana plugs in the link)
  4. Fold back the wires against themselves in axisymmetric fashion (it should kind of look like a head with long hair)
  5. Shove the folded back wires into the cylindrical hole in the base of the metal plug
  6. Twist the screw back in place by forcing it through the wires
  7. Check that the plug is securely attached by pulling on it with decent force
  8. Repeat steps 1-7 for the opposite end of the wire
  9. Repeat steps 1-8 for two more wires

Soldering Main Board Components

IMG-1404.JPG

Tools/Materials Required: Soldering Iron, Wire strippers, Protoboard, 2x 10k resistors, 1x 1k resistor, 2x 2N3904 transistors, solder, wires, Arduino Nano, safety glasses

Download the schematic and circuit diagram PDFs below. Know them, love them, care for them. They are your best friends now.

Follow the schematic to solder ONLY the Arduino, resistors and transistors, and associated solder joint connections to the protoboard. The LED Matrix, banana jack connections, and battery connections will be taken care of in later steps.

Connect Red and Blue Banana Plugs

unnamed.jpg

Tools/Materials Required: Red and Blue Banana Plugs, protoboard, soldering iron, solder, wire strippers, safety glasses


Process

  1. Check the circuit diagram from Step 5 to know which faces to place the blue and red jacks with wires
  2. Insert the red and blue jacks into the top holes--keep the same pattern on all four sides
  3. Screw the jacks into place
  4. Grab the four wires (2 red, 2 blue) hanging out that correspond to the correct jacks
  5. Using the circuit schematic and circuit diagram from Step 5, solder the red and blue wires into the correct places on the protoboard
  6. Remember to create solder joints to connect the jack wires to the rest of the circuit as shown in the schematic

Attach LED Matrix

IMG_6792.jpg
IMG_6794.jpg

Tools/Materials: LED Matrix, soldering iron, solder, wires, protoboard, wire strippers, safety glasses, 6x M2 screws, screwdriver


Process

  1. Take three different colored wires (e.g., black, red, and white) to connect to the LED Matrix
  2. Solder the black wire to the GND terminal
  3. Solder the red wire to the +5V terminal
  4. Solder the white wire to the DIN terminal
  5. Feed the 3 wires through the small hole in the top of the 3D printed case, ensuring that the wires aren't twisted when they are fed through
  6. Take 6 M2 screws and use them to fix the LED matrix in place
  7. Take the other end of the LED Matrix wires and solder them to the board as shown in the circuit schematic and diagram

Connect Free-floating Wires

image_2023-06-13_014535550.png

Tools/Materials Required: 1 yellow wire, 1 green wire, 1 black wire, 1 white wire, soldering iron, solder, wire strippers

Because of how everything is assembled, you will need to have free floating wires that go underneath the protoboard for the green and yellow jacks. The same must be done for the battery leads (white and black). If that doesn't make sense, just trust me and you will see what I mean later on.

Process

  1. Cut a yellow, green, red, and black wire, each having a length of about 6" (15 cm) in length
  2. Solder a free-floating green wire to the location where the green jack will connect as shown in the circuit diagram and schematic
  3. Solder a free floating yellow wire to the location where the yellow jack will connect as shown in the circuit diagram and schematic
  4. Solder a free floating white wire to the location where the battery power will connect as shown in the circuit diagram and schematic
  5. Solder a free floating black wire to the location where the battery ground will connect as shown in the circuit diagram and schematic

Attach Protoboard to Platform

IMG_6398.JPG

Tools/Materials Required: 4 M2x6mm screws, screwdriver, protoboard


Process

  1. With all of the upper connections complete, attach the protoboard to the platform using 4 M2x6mm screws
  2. Feed all of the free-floating wires underneath the protoboard as shown in the picture above


Attach Platform to Case

IMG_6399.JPG

Tools/Materials Required: 4 M2x6 screws, screwdriver


Process

  1. Line up the holes on the edges of the platform with the small holes in the center of face of the case
  2. Take 4 M2x6mm screws and twist them into place to secure the platform

Connect Green and Yellow Banana Plugs

IMG_6401.JPG
IMG_6400.JPG

Tools/Materials Required: Yellow and Green Banana Plugs, protoboard, soldering iron, solder, wire strippers, safety glasses, heat shrink

Note: I only have wires connected to every banana jack because I thought it would be fun to try and confuse an engineering friend who I know would try and open the box. I don't recommend doing this in the interest of time--you should only have 1 yellow wire and 1 green wire.

Process

  1. Check the circuit diagram from Step 5 to know which faces to place the yellow and green jacks with wires
  2. Insert the green and yellow jacks into the bottom holes--keep the same pattern on all four sides
  3. Screw the jacks into place
  4. Grab the two wires (1 green, 1 yellow) hanging out that correspond to the correct jacks
  5. Place a heat shrink over each of the two wires
  6. Find the free floating green and yellow wires that you soldered to the board earlier
  7. Solder the green and yellow wires from the two jacks to the free-floating green and yellow wires that you soldered to the board earlier
  8. Slide the heat shrink over the solder joint
  9. Fix the heat shrink in place using a heat gun, hair dryer, or the soldering iron if you're careful

Connect Battery Holder to Protoboard

Tools/Materials Required: Battery holder, soldering iron, solder, safety glasses, heat shrink


Process

  1. Feed the battery holder wires through small hole in the 3D printed battery container
  2. Grab the leads to the battery holder (red and black wires)
  3. Place a heat shrink over each of the two wires
  4. Find the free-floating white and black wires that you soldered to the protoboard earlier
  5. Solder the red wire to the white wire
  6. Solder the two black wires together
  7. Slide the heat shrink over the solder joint
  8. Fix the heat shrink in place using a heat gun, hair dryer, or the soldering iron if you're careful

Insert Batteries and Assemble Final Pieces

IMG-6780.jpg
IMG-6781.jpg

Tools/Materials Required: 5 M2x6mm screws, screwdriver, 3 AA batteries


Process

  1. Insert 3 AA Batteries into the battery holder
  2. Close the battery holder
  3. Place the battery holder snug inside of the 3D printed battery container
  4. Take 1 M2x6mm and attach the 3D printed battery cover with the QR code to the 3D printed battery container
  5. Take 4 M2x6mm screws and attach the 3D printed battery container to the 3D printed case


Test Circuit

IMG-2956.jpg

Tools/Materials Required: 3x Banana plug cables

Plug the banana plug cables into the correct banana jacks on the correct faces as designated by the circuit diagram. Turn the battery switch to the "on" position. The LED matrix should light up with the scrolling text you came up with!

The QR code leads to the puzzles document (see pdf below) where you can solve the puzzles to figure out how the cables are supposed to connect to the box. Use the document as is or be creative and come up with your own puzzles (you'll have to recreate the QR code if you come up with your own puzzles).

Celebrate! You Did It!

puzzle_box_gif.gif

I hope you had tons of fun reading or doing this project! Thanks!