Skip to content

DIY button box for sim racing

License

Notifications You must be signed in to change notification settings

djpr1me/Button-Box

Repository files navigation

DIY Sim Racing Button Box

I have some issues while marking up a switch holes and wire soldering so i decided to share my templates and "how to" guide.

Original credits goes to AMSTUDIO and Opensimhardware.

Table of Contents
  1. Layout Template
  2. Wiring Diagram
  3. Components
  4. Software Setup

Layout Template

Layout Template Download vector template

Utilize it for drilling holes for buttons and switches. It has real sizes for all components listed below, just print it and put it over your plastic case 200 x 120 mm. Use inside circles diameters. You should have drill bits sized 6, 7, 12, 14, 16 mm.

Wiring Diagram

Wiring Diagram Download drawio diagram

It's another side of the box cover that's why all buttons are mirrored. You can open the source file in diagrams.net editor.

Components

Here's what I used for building button box. Overall cost US $34.4 (2629 Rub).


Arduino Pro Micro ATmega32U4 5V 16MHz US $4.18 (319 Rub)


PZOZ Micro USB Cable (2 m) US $1.87 (143 Rub)


Waterproof Black Electronic Case (200 x 120 x 75 mm) US $8.99 (688 Rub)


3D Carbon Fiber Vinyl Black (30 x 127 cm) US $3.69 (284 Rub)


Reset (Momentary) Round Engine Start Metal Push Button(16mm Red) US $3.32 (253 Rub)


Miniature Toggle Momentary (on-off-on) Switches (MTS-123 Reset) x 5 Pcs US $1.87 (143 Rub)


Toggle Switch Illuminated Led Red (ASW-07D) US $1.69 (129 Rub)


Toggle Switch Illuminated Led Blue (ASW-07D) US $1.69 (129 Rub)


Momentary (Reset) Push Button White (PBS-33B) x 10 Pcs US $1.68 (128 Rub)


Momentary (Reset) Push Button Red (PBS-33B) x 10 Pcs US $1.68 (128 Rub)


Rotary Encoder EC11 w Push Button 20mm Plum handle x 5 Pcs US $1.97 (150 Rub)


Rotary Caps Black x 5 Pcs US $0.63 (48 Rub)


PVC Tinned Copper Wire Cable Black (30 AWG) 2m US $0.38 (29 Rub)
PVC Tinned Copper Wire Cable Red (30 AWG) 2m US $0.38 (29 Rub)
PVC Tinned Copper Wire Cable White (30 AWG) 2m US $0.38 (29 Rub)

Software Setup

Ten simple steps any of you can done without special programming skills.

  1. Download and install Arduino IDE.
  2. Download ArduinoJoystickLibrary.
  3. In the Arduino IDE, select Sketch > Include Library > Add .ZIP Library.... Browse to where the downloaded ZIP file is located and click Open. The Joystick library's examples will now appear under File > Examples > Joystick.
  4. Get 32-FUNCTION-BUTTON-BOX sketch file.
  5. Open Arduino IDE and add Keypad.h library by clicking Sketch > Include Library > Manage Libraries... > Search for Keypad and install the one that is created by Mark Stanley and Alexander Brevig).
  6. Connect your Arduino board to your computer by plugging in the USB cable.
  7. To upload the code select the Arduino type by going to Tools > Board:... > Arduino Leonardo.
  8. To select the correct USB port go to Tools > Port: > COMx (Arduino Leonardo).
  9. Verify the sketch by clicking on the in the top left corner (under File).
  10. Press the next to it to upload it to the Arduino.