1. ro
  2. en
28 July 2025

One Setup, One Circuit, Endless Possibilities: 4 LEDs and 4 Buttons — Custom Enclosure

Introduction

 

In the world of electronics prototyping, functionality is key — but presentation matters just as much. A well-designed enclosure can elevate a simple circuit into a polished product that reflects professionalism and attention to detail. Building on our project featuring 4 LEDs and 4 buttons (plus a buzzer and a four-digit display), this flexible platform opens the door to countless ideas and applications. Creating a custom 3D-printed case is the natural next step toward showcasing your final result with style.

 

Why Choose a 3D-Printed Enclosure?

 

Having access to a 3D printer unlocks endless possibilities for personalized design. You can craft an ergonomic, visually appealing case that fits your components perfectly — no more makeshift solutions. The design becomes an extension of the functionality, and whether you're presenting your project in an educational or professional setting, it gains impact and flair.

 
 
 

Materials You'll Need:

 

  • Arduino Nano (or equivalent): For this build, we’re switching to a more compact board — the Arduino Nano. Its small footprint, efficient pin layout, and full compatibility with most Arduino libraries make it ideal for ergonomic, presentation-ready prototypes.

 

  • Expansion Shield for Arduino Nano: A smart choice for clean organization, flexible connections, and a professional look. Most importantly, it offers mechanical stability — reducing the risk of loose wires or accidental disconnects.

  • 4 LEDs (5mm preferred): Red, yellow, green, and blue — each LED will be paired with a button for visual feedback.

  • 4 Momentary Push Buttons (normally open): Ideally, use buttons with a 22mm diameter — a common industrial size. In our case, we used 30mm buttons. The top of each button should be transparent and color-coded to allow LED integration. If possible, choose buttons with built-in LEDs to avoid manual modification. For this project, we manually drilled the tops and inserted LEDs inside. These buttons feature a built-in travel limiter — a reliable mechanism for games involving frequent presses. However, the physical travel distance (about 1 cm) affects reaction time, making ultra-fast responses (under 50–100 ms) difficult. Finding a button with instant response remains a key challenge.

 

  • Four-digit Seven-Segment Display (TM1637 driver): Used to show scores, timers, or other game data.

  • Buzzer/Speaker: For sound effects, feedback, or musical cues.

 

  • Wires (0.1 mm² to 0.35 mm²): Low power consumption and limited space mean thinner wires are ideal. Use female DuPont connectors or jumper wires with female ends.

 

  • Power Connector (2.1 x 5.5 mm): One fixed to the case, one male plug for powering the shield. These will be used to build a custom power cable for the Arduino.

  • Short USB Adapter Cable (USB-A female to USB mini male): This allows you to program the Arduino even after it’s mounted inside the enclosure.

  • Soldering Iron and Solder: For connecting wires securely.

 

  • Heat Shrink Tubing: Used to insulate exposed wire joints, providing extra electrical and mechanical protection.

 

 

 

 

  • Hot Glue Gun (PVC-compatible) and Glue Sticks: Essential for securing the Arduino Nano, shield, and connectors inside the case. This method ensures strong mechanical stability, even in the event of accidental drops.

 

  • 4 M4 Screws (10 mm or slightly longer): Required to securely fasten the enclosure.

 

 

 

3D Model

 

The enclosure is designed for maximum ease of use, with convenient access to all buttons. Two cutouts have been added: one for the power connector and another for a USB-A female port, allowing access to the Arduino board so it can be reprogrammed whenever needed.

 

The top lid is built to accommodate buttons with either a 22 mm or 30 mm thread. If your buttons are larger, it’s easy to modify the original .stl file using free tools like Tinkercad.

 

Also mounted on the lid is the four-digit display, driven by the TM1637 chip. It should be securely fixed using PVC glue sticks, just like the buzzer, which also needs to be firmly attached to prevent any movement during use.

 

You can download the .stl file for the enclosure lid and 22mm buttons from here

You can download the .stl file for the enclosure lid and 30mm buttons from here

You can download the .stl file for the bottom part of the enclosure from here.

 

 

🔌 The Circuit Diagram

 

Wiring Guide

 

If you've already built the circuit on a breadboard, you're likely familiar with the required connections. Still, here's a complete breakdown of the electrical wiring you'll need for the final assembly:

 

🔴 Red Button & LED

  • Button terminal 1 → Arduino pin D12

  • Button terminal 2 → GND

  • Arduino pin D7 → Resistor R1 terminal 1

  • Resistor R1 terminal 2 → LED (red) positive (+) terminal

  • LED negative (−) terminal → GND

 

🟡 Yellow Button & LED

  • Button terminal 1 → Arduino pin D6

  • Button terminal 2 → GND

  • Arduino pin D10 → Resistor R2 terminal 1

  • Resistor R2 terminal 2 → LED (yellow) positive (+) terminal

  • LED negative (−) terminal → GND

 

🟢 Green Button & LED

  • Button terminal 1 → Arduino pin D8

  • Button terminal 2 → GND

  • Arduino pin D4 → Resistor R3 terminal 1

  • Resistor R3 terminal 2 → LED (green) positive (+) terminal

  • LED negative (−) terminal → GND

  •  

🔵 Blue Button & LED

  • Button terminal 1 → Arduino pin D9

  • Button terminal 2 → GND

  • Arduino pin D5 → Resistor R4 terminal 1

  • Resistor R4 terminal 2 → LED (blue) positive (+) terminal

  • LED negative (−) terminal → GND

 

🔊 Buzzer

  • Buzzer positive (+) terminal → Arduino pin D12

  • Buzzer negative (−) terminal → GND

 

📟 TM1637 Display

  • CLK (pin 1) → Arduino pin D3

  • DIO (pin 2) → Arduino pin D2

  • GND (pin 3) → GND

  • VCC (pin 4) → Arduino 5V pin

 
 

Assembly Tips

 

To prevent unwanted contact between exposed wire ends, we strongly recommend using heat shrink tubing. It provides reliable insulation and reduces the risk of short circuits — especially in tight spaces where twisted wires or LED pins might accidentally touch.

Make sure all ground (GND) connections are properly established. The shield we recommended offers a clean layout: each analog or digital channel includes a GND pin (marked G), a 5V power pin (marked V), and a signal pin (marked S). This makes wiring more organized and easier to manage.

Once all connections are complete and the device is tested and working, you can begin mounting the components inside the enclosure. Use PVC glue sticks and a hot glue gun to secure the Arduino Nano, expansion shield, and connectors. This adhesive also helps reinforce the pin connections on the shield, preventing them from coming loose — even if the device is dropped or bumped.

 

 

 

 

 

 

For those who don’t have access to a 3D printer, a standard ABS enclosure remains an appealing option—though it does come with a few challenges. You’ll need a hole saw to cut out the circular openings for the buttons, and things get even trickier when it comes to mounting the four-digit display, which requires a precise rectangular cutout. Still, with the right tools and accessories, even a basic enclosure can be turned into an elegant solution for your project. I’ve tried this approach myself, using a combination of 3D-printed components and a standard ABS case—and it worked out quite well.

 

 

 

 

 

 

 

​​​​​​​

​​​​​​​