Arcade Gift Cube – Unique Gift Card Holder 3D Printer Model

Author: @
License: CC BY
File formats: stl,ino
Download type: zip
Size:133.2KB

The file 'Arcade Gift Cube – Unique Gift Card Holder 3D Printer Model' is (stl,ino) file type, size is 133.2KB.

Summary

Video: https://youtu.be/koyV5uTVwiw

I made a 3D Maze gift card holder box a while back and wanted to step it up a notch so for this year's Christmas gift card holder, I made an arcade gift box! The idea is that the recipient will have play a few video games and at the end of each game a code is displayed. The player gathers all the codes and enters them into an unlock screen. If the codes are right then the box door is unlocked and the gift card or money inside can be retrieved.

At first I made the box where it could be printed in one go but my printer kept giving me grief and I lost a lot of filament. So instead, I broke down all the walls individually so they could be printed one wall at a time and then glued together. The top still needs to be screwed on so at least the internals can be accessed.

Order of putting it together:

  1. Program the computer - (no device connections yet especially the servo).
  2. Screw the servo to the floor. The cord should be towards the front where there's a little room for it.
  3. Connect the computer to power so that the servo will go to the locked position automatically.
  4. Screw the lock into the locked position.
  5. Disconnect the computer from power.
  6. The lock should be able to be rotated into the unlock position manually.
  7. Glue the center wall to the floor. (I use the left and right walls to sort of hold the center wall in place vertically while it sets.
  8. Glue the left and right walls to the floor and center wall. (The right wall has a hole for the cord).
  9. Glue the back wall to the floor, left, and right walls.
  10. Glue the shelf to the front top.
  11. Glue the display into position.
  12. Glue the keypad into position.
  13. Glue all the wires to their boards with silicone glue or hot glue so that they don't disconnect - you may wish to instead solder all of these connections but whatever.
  14. Glue the computer into position.
  15. I added a bit of tape to hold the wires down so that they don't get tangled up in the servo lock.
  16. (Don't glue the top on unless you want it to be permanent - use screws instead so that you can still have access if you ever need to fix something).

This Arcade Gift Cube device is to be like a successor to the maze cube I put on Thingiverse.
The idea is that inside is locked a monetary gift or a gift card or something small, and
to get to the gift, you have to play the arcade games to get the unlock codes to open the cube and get the gift. So in essence, this is a glorified gift card box so be more novel and fun than
just handing someone some money.

BOM:

  • ESP8266 NodeMCU (because they are cheap like $3)
  • SSD1306 display (because they are cheap like $2.50)
  • Analog Button module (because it only needs one analog line to capture 5 buttons for $1)
  • MicroSD cable ($1)
  • USB charger ($1 or $2)
  • optionally a sound buzzer ($1) - I haven't added sound code yet, tho.
  • micro servo ($2)
  • 3d printed box (~$1)
  • female to female PCB wires
  • 4 3/8" for the keypad (you may want to drill them out a bit) and #8 3/8" screws for the top

  • optionally a big capacitor 220mf or so to add on the servo + and - to give it more umph but it should be ok as-is without it.
    Total of about $13 give or take - so yeah not exactly cheap but not exactly expensive either.

I basically tried to find the parts as cheap as I could on ebay and amazon.

The code shows a diagram of what to connect to which pins.

I wrote all of the games myself. I started with sprites (blasteroids, flappy, jetpack) but then
got a simple 3d vector engine going, then added the fill and backface removal (so there's two engines sort of) (tanks, tie, flight sim). I wrote a simple 3d engine back in the 80's by reading a book called 3d graphics in C (or something like that). This 3d engine is pretty much just a recreation of that. I used chatGPT (openai.com) to help me recall some of the 3d functions and backface removal. For a 4 point-fill, I just used fill for two triangles. I tried to do some simple z-buffering to place objects from approximate furthest to nearest to the user so that objects would overlap correctly (to some degree). For the tie fighter I drew it with vector draw but then draw the outside wings with the polyfill and backface func to sort of make the wings overlap correctly. You really probably don't notice it when playing, though, but it was just something that bothered me I suppose so had to make it look better.

Yeah, everything is pretty small with this display so it's sort of not practical but it is a
cheap display and it seemed like I needed to make this gift box as cheap as possible otherwise I couldn't afford to put any money in the gift box which would be counterproductive to the purpose of me wanting to make the box in the first place. In reality, though, I wish the display was bigger and even with color but hey, you can't have everything! (or can you?)

Yeah, someone looking at my code will probably quickly criticize it. I know I'm not the best
programmer that there ever was, but hopefully you'll see I'm not the worst programmer either and find some value in it! ;-)

I added the code entry to unlock the cube with servo control. I designed a box/console
on Tinkercad. Then my 3d printer decided to die. I asked for another 3d printer for my
birthday and my family graciously gave me one so now I can surprise them back with this gift this Christmas! Hopefully, my family and friends will like it and I hope everyone who downloads and builds one likes it too!

BTW, there is a secret code added to the software to get you to the Admin Menu so you can lock or unlock the box, change the code to whatever you want or else randomize the code. This Admin Menu will also appear whenever the player actually unlocks the box themselves.

There's still room for more games, so I may add some more games but I haven't decided yet. But for now it works as-is so I feel it's a good first version.

Jesus Saves! John 3:16

Update: Version 1.02 2023/12/12 Fixed a problem with blasteroids end win screen.
Update: Version 1.03 2023/12/12 Made the tanks game a little easiser.
Update: Version 1.04 2023/12/13 Made the ties in the tie game a little bigger.

2023/12/14: I ended up making 14 total arcade gift cubes (even tho I have parts to make more probably) for family and close friends. I gave one cube to a friend and he found the Blasteroids bug and gave feedback about Tanks game was hard and Flightsim was hard. I was able to do a few fixes (thanks buddy). So, I opened the presents, reprogramed the cubes, and rewraped them. I can't wait until Christmas to see the reactions. Hopefully it will go well. I'm thinking about what to make for next year and have an idea for a prototype.

2023/12/16: The wife wanted 7 more arcade cubes for her side of the family, so that's a total of 21 cubes I made for this year's gifts. I hope everyone likes them.

AGC_backwall.stl 10.6KB
AGC_centerwall.stl 2.4KB
AGC_door.stl 234.7KB
AGC_face.stl 167.4KB
AGC_floor.stl 76.4KB
AGC_leftwall.stl 4.0KB
AGC_lock.stl 9.1KB
AGC_rightwall.stl 5.0KB
AGC_shelf.stl 12.2KB
arcade_gift_cube.ino 130.3KB