RGB Geometry Puzzle With Magnetic Play Area

by smooth_electronics in Circuits > Electronics

46 Views, 0 Favorites, 0 Comments

RGB Geometry Puzzle With Magnetic Play Area

PXL_20250122_132224002.jpg
PXL_20250122_135758956.jpg
PXL_20250122_132025876.jpg
PXL_20250122_132148896.jpg

Geometry shift!

A simple and fun electronics project you can make in a weekend. The aim of the game is simple… place your pieces on the magnetic play area to make the shape shown on the LED display.

Sounds easy? Programmed with three difficulty levels, you must only use 4, 6 or 8 pieces to make the shape, and it is trickier than it seems!

Each difficulty level has around 35 to 40 puzzles, giving over 100 puzzle shapes to solve!

How to use

Press the button once to show a different shape. Press and hold the button for longer than 3 seconds to change the difficulty (number of pieces). The LED display will then show the selected difficulty level by indicating how many pieces are needed for the given puzzle (4 pieces = easy, 6 pieces = medium, 8 pieces = hard like the example picture in this step).

You can play your pieces (non magnetic) directly onto the LED matrix to cover the shape, however it is recommended to print the magnetic pieces. The play area is magnetic and have a satisfying snap when they click into place. Simply place them into the magnetic play area to replicate the shape on the screen.

I suggest printing two magnetic play area plates, then you can play against your friends. Add a timer to make things more competitive!

The device turns on immediately when the switch is turned to ON. It requires 4x 1.5 AA batteries. Here is a video showing the basic function of the device.

Supplies

Tools required

  1. Soldering iron and solder.
  2. Some small gauge wire (stranded or solder core AWG 20, or 0.5 mm^2 is plenty).
  3. 3D printer plus filament.
  4. Cross head or Philips Screwdriver.
  5. Hot glue gun and some hot glue.
  6. Superglue (Cyanoacrylate)

Parts required (electronic parts)

The electronic part requires very few parts:

  1. LED Matrix, 8x8, WS2811 (or similar) - I used this one Amazon link
  2. Slide switch - I used Salecom H251A SPDT Vertical PCB Slide Switch available from bitsbox
  3. Push button (I used these arcade style one Aliexpress link)
  4. Arduino Nano or similar (I used a Sparkfun Pro-micro).
  5. 4 x AA battery holder
  6. 4 x AA batteries, I recommend the individual USB recharagable types. These are a little expensive but work out to be more economic overall. (Amazon link)
  7. Self tapping M2 screws (I have an assortment but any reasonable lengths will work. The screw hole paths are quite long). I used screws approximately 5-6 mm long.
  8. Hot glue, Solder, some wire (small flexible wire is probably most suitable, I used stranded silicone 20 AWG wire).
  9. 3D printing filament of your choice, however some sort of translucent or semi-transparent will be needed to allow the light from the LED to show through the matrix.

Parts required (magnetic parts)

The magnetic play area only needs screws (same as electronic parts) and a steel sheet (which I bought from aliexpress) which is 100 mm x 100 mm x 0.7 mm thick. You might want to use some hotglue to hold in the matrix.

3D Printing

All my models are available to download from printables using the following link

https://www.printables.com/@smooth_electronics

Printing (electronic parts)

The following parts need to be printed:

  1. 8 x game_24-12-2024-piece
  2. 1 x game_24-12-2024-board
  3. 1 x game_24-12-2024-enclosure
  4. 1 x game_24-12-2024-cover_left
  5. 1 x game_24-12-2024-cover_right

The enclosure can be printed in one solid colour but I wanted to show the text in white so I did a colour change for that. I have included the PrusaSlicer project file “game_24-12-2024-full_enclosure” to show where the colour changes are. Supports are required to support the cavity that holds the “board” matrix.

The “board” matrix requires a single transparent layer so a colour change is mandatory here, otherwise you can choose your preferred filament colours.

Printing (magnetic parts)

There are three parts that need to be printed:

  1. x8 magnetic_game_18-01-2025-piece
  2. x1 magnetic_game_19-01-2025-bottom
  3. x1 magnetic_game_19-01-2025-matrix
  4. x1 magnetic_game_19-01-2025-base

I separated the base from the back because I wanted to print everything face down, so I could use a beautiful geometric print surface. I also did a colour change for contrast on the matrix squares and for the text. All this is optional so you can print it your way!

General Assembly

PXL_20250122_132317631.jpg
PXL_20250122_133237295.jpg
PXL_20250122_133039167.jpg
PXL_20250122_133433040.PORTRAIT.ORIGINAL.jpg

General assembly (magnetic parts)

  1. Print all the parts.
  2. Start with the bottom piece and place the steel sheet on top.
  3. Screw the “base” to the “bottom” piece to sandwich the steel sheet in place.
  4. The matrix fits loosely into the middle on top of the steel sheet. Use a small amount of hot glue or other adhesive in the corners to secure it in place.
  5. Use Cyanoacrylate (superglue) to glue the magnets into the pieces. Orientation shouldn't matter.

General assembly (electronic parts)

Assembly is also very easy.

  1. Print the enclosure first with supports and the optional colour change.
  2. Solder some cables to the push button and toggle switch before placing them into the enclosure. Secure them with hot glue.
  3. Place the LED matrix into the cavity where the supports used to be with the LED's facing the right way (i.e. so they shine out of the part not into the part). The matrix I suggested comes with wires already soldered on the rear. Feed the wires through the square hole which should be located where the wires are attached to the LED matrix. These wires are then fed through the small hole which allow access to the separate electronics compartment. Mine came with a JST crimped onto the wires, you will need to cut this off to clear the small hole inside.
  4. Print the “board” with the mandatory transparent filament colour change. The part has chamfers which are intended to be compatible with the pieces. Take note of which side has the chamfers and which are the basic square cavities.
  5. Place the board over the LED matrix with the square (unchamfered) cavities facing down. The LED's should line up correctly with the square cavities on the back. Secure the board down with a drop of hot glue in each corner of the board matrix part.
  6. Insert the battery holder into the enclosure and feed the wires into the electronics compartment.
  7. Solder the push button between GND and Arduino D2.
  8. Solder DIN on the matrix to Arduino D4. Solder VIN on the matrix to Arduino 5V and GND of the matrix to Arduino GND.
  9. Solder positive of the battery to one side of the toggle switch, solder the other side of the toggle switch to Arduino RAW pin. Solder the GND of the battery to Arduino GND.
  10. You will need to do some fiddly cable management to fit all the cables and electronics in. Use a little hot glue to help where necessary.
  11. Finally, print the covers for the back and secure them with M2 self tapping screws.


Play!

PXL_20250122_135606080.jpg
PXL_20250122_135628143.jpg
PXL_20250122_135704690.jpg

It is recommended to print at least two play areas so you can challenge your friends. Enjoy!