Skip to the content
PCBKitNew board
2 layers49.7 × 53.1 mmMySimRacingButtonBox, the printed circuit board in 3D

MySimRacingButtonBox

lusmdl/MySimRacingButtonBox

manage a button matrix tailored for sim racing setups. The system uses I2C communication, where the Arduino Micro acts as the master and the ATmega328P functions as the slave

Size
49.7 × 53.1 mm
Copper layers
2
Thickness
1.6 mm
Parts
24
Nets
29
Pads
101
Tracks, vias
306, 12
Pours
2
Routed
Yes
KiCad
KiCad 8.0 (file 20240108)
Created
15 Jul 2024
Updated
10 May 2025

Overview

MySimRacingButtonBox is an open-source printed circuit board by lusmdl, from the lusmdl/MySimRacingButtonBox repository on GitHub, published under the MIT licence. It is a 2-layer board of 49.7 × 53.1 mm with 24 parts on 29 nets, routed with 306 tracks and 12 vias.

It is built around the ATMEGA328P-PU and RJ45. Its parts include 15 connectors, 3 capacitors, 1 IC and 1 crystal. It belongs with the AVR (ATmega, ATtiny) boards of this library.

Main components

2

README

README.md

Sim Racing Button Box

Welcome to the Sim Racing Button Controller repository!

This project is built around an ATmega328P microcontroller, which is configured to manage a button matrix tailored for sim racing setups. The system uses I2C communication, where the Arduino Micro acts as the master and the ATmega328P functions as the slave (Address standard 8). This ensures precise control and synchronization between the components.

The ATmega328P transmits a 16-bit signal representing the states of up to 16 buttons only when requested by the Arduino Micro. This on-demand communication minimizes latency and ensures efficient data transfer. Additionally, the PCB includes support for a joystick connection, expanding its versatility.

This project complements MySimRacingCore, which serves as the brain of the entire sim racing system. Together, they deliver a modular and high-performance solution for sim racing enthusiasts.

Features

  • Support for up to 16 buttons in a matrix configuration
  • Seamless I2C communication with the Arduino Micro for precise control
  • Fast and effective button state management with Keypad Library
  • Joystick integration via the PCB's RJ45 jack, reducing wiring complexity

Getting Started

Hardware Requirements

  • ATmega328P Microcontroller
  • 16 Mhz Oscilator
  • 12..22 pF Condansator
  • 100 µF Condansator for supply stability
  • Button Matrix: Up to 16 buttons
  • The PCBA from master project: MySimRacingCore

Example PCB for this project PCBA

Software Requirements

Software Installation and Setup

You can either use the precompiled HEX file or compile the firmware yourself.

  1. Install PlatformIO

    • Set up PlatformIO in your preferred development environment (e.g., VSCode or Atom) by following the official installation guide.
  2. Clone the Repository

    sh
    git clone https://github.com/lusmdl/MySimRacingButtonBox.git

3. Open the Project

  • Open the cloned repository in your PlatformIO environment.
  • Update the line #define I2C_ADDR 8 in ProjectConfig.hpp to match your I²C master device configuration.

The default address is 8. If you intend to connect this device twice, use addresses 8 and 9. The master will handle the rest.

  1. Build and Upload

    • Prepare your ATmega328P-based PCB for flashing. It’s recommended to first flash the firmware onto an Arduino Uno and then transfer the chip to your custom environment.
    • Build and upload the code using PlatformIO:
    sh
    pio run --target upload

Hardware Setup

  1. Assemble the PCB according to the provided design.
  2. Ensure all components, such as the button matrix and joystick, are correctly connected.

Usage

  1. Hardware Connection

    • Connect the button matrix to the ATmega328P as per the configuration.
    • Establish an I2C connection between the ATmega328P and the Arduino Micro.
  2. Running the Firmware

    • Power on your system.
    • The ATmega328P will only send a 16-bit signal to the Arduino Micro when requested over I2C, ensuring efficient communication.

Documentation

Contributing

We welcome contributions from the community!

First, read the general contributing conventions for projects from me.

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Commit your changes (git commit -am 'Add new feature').
  4. Push to the branch (git push origin feature-branch).
  5. Create a new Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Parts

24
QtyValueFootprintReferences
212..22 pFCapacitor_SMD:C_0402_1005MetricC1, C2
110 µFCapacitor_SMD:C_1206_3216MetricC3
12X2 Matrix AConnector_PinHeader_2.54mm:PinHeader_2x02_P2.54mm_Vertical_SMDJ1.1
12X2 Matrix BConnector_PinHeader_2.54mm:PinHeader_2x02_P2.54mm_Vertical_SMDJ1.2
12X2 Matrix CConnector_PinHeader_2.54mm:PinHeader_2x02_P2.54mm_Vertical_SMDJ1.3
12X2 Matrix DConnector_PinHeader_2.54mm:PinHeader_2x02_P2.54mm_Vertical_SMDJ1.4
14X4 MatrixConnector_PinHeader_2.54mm:PinHeader_2x04_P2.54mm_Vertical_SMDJ1
1ATmega328P-PPackage_DIP:DIP-28_W7.62mmU1
1AVR-ISPConnector_PinHeader_2.54mm:PinHeader_2x03_P2.54mm_Vertical_SMDJ2
1Button 1TerminalBlock:TerminalBlock_Xinya_XY308-2.54-2P_1x02_P2.54mm_HorizontalJ1.1.1
1Button 2TerminalBlock:TerminalBlock_Xinya_XY308-2.54-2P_1x02_P2.54mm_HorizontalJ1.1.2
1Button 3TerminalBlock:TerminalBlock_Xinya_XY308-2.54-2P_1x02_P2.54mm_HorizontalJ1.2.1
1Button 4TerminalBlock:TerminalBlock_Xinya_XY308-2.54-2P_1x02_P2.54mm_HorizontalJ1.2.2
1Button 5TerminalBlock:TerminalBlock_Xinya_XY308-2.54-2P_1x02_P2.54mm_HorizontalJ1.1.3
1Button 6TerminalBlock:TerminalBlock_Xinya_XY308-2.54-2P_1x02_P2.54mm_HorizontalJ1.1.4
1CrystalCrystal:Crystal_HC18-U_VerticalY1
1I2CConnector_PinHeader_2.54mm:PinHeader_2x02_P2.54mm_Vertical_SMDJ3
1JoystickConnector_PinHeader_2.54mm:PinHeader_2x03_P2.54mm_Vertical_SMDJ5
1RJ45Connector_RJ:RJ45_Molex_0855135013_VerticalJ4

The 20 most common of 24 parts.

Questions

How big is the MySimRacingButtonBox PCB?

It measures 49.7 × 53.1 mm and has 2 copper layers, 1.6 mm thick.

What parts does the MySimRacingButtonBox use?

24 parts, built around the ATMEGA328P-PU and RJ45. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the MySimRacingButtonBox KiCad files?

From the lusmdl/MySimRacingButtonBox repository on GitHub, at the commit this page was made from: the board is kicad/circuit/circuit.kicad_pcb and its schematic kicad/Arduino Uno Rev3 reference/UNO-TH_Rev3e.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the MySimRacingButtonBox design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

Similar boards

  • 2 layers144.8 × 204.5 mmBetaBoard, the printed circuit board in 3D

    BetaBoard

    BetaWall/BetaBoard

    Multiplexed APA102 LED driver board talking RS485

    40 parts2AGPL-3.0
  • 2 layers256.5 × 172.9 mmMCB19 panel, the printed circuit board in 3D

    MCB19 panel

    ZeniteSolar/MCB19

    Modulo de carregamento das baterias auxiliares

    411 parts2GPL-3.0
  • 2 layers239.3 × 121.3 mmPanel, the printed circuit board in 3D

    Panel

    ZeniteSolar/MT19

    Tachometer Module for CANBUS with ATmega328p

    252 parts2GPL-3.0
  • 2 layersMAB19 PANEL, the printed circuit board in 3D

    MAB19 PANEL

    ZeniteSolar/MAB20

    340 partsGPL-3.0
  • 2 layers122.6 × 52.7 mmZeniteTemplate2022, the printed circuit board in 3D

    ZeniteTemplate2022

    ZeniteSolar/MAC22

    Modulo de acionamento da contatora 2022

    63 parts
  • 2 layers248 × 174.4 mmPanel, the printed circuit board in 3D

    Panel

    ZeniteSolar/MCC_CAN_Shield

    294 partsGPL-3.0
  • 2 layers228 × 149.8 mmMIC19, the printed circuit board in 3D

    MIC19

    ZeniteSolar/MIC19

    Módulo de Interface do Controle da embarcação solar Guarapuvu II (Zênite Solar)

    300 partsGPL-3.0
  • 2 layers232.1 × 131.2 mmPanel, the printed circuit board in 3D

    Panel

    ZeniteSolar/MSC19

    Voltage or Current Sensor Module for CANBUS with ATmega328p

    313 partsGPL-3.0