dmadison / Sim-Racing-Shields

Add-on circuit boards ("shields") for connecting Arduino development boards to sim racing equipment.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sim Racing Shields for Arduino

Sim Racing Shields Header

This repo contains add-on circuit boards ("shields") for connecting Arduino development boards to sim racing equipment. These shields are meant to be used in conjunction with the Sim Racing Library for Arduino. These shields can be used to create inexpensive, standalone USB HID adapters for use with racing games and simulators.

Both of these shields are designed to be used with a SparkFun Pro Micro, 5V (32U4). You can use either genuine SparkFun boards or 3rd party clones. The SparkFun Qwiic Pro Micro with a USB-C port (DEV-15795) is recommended. The SparkFun Pro Micro RP2040 is theoretically compatible but has not been tested. Note that the Tag-Connect programming header is not compatible with the RP2040.

The shields can be assembled with either 0.1″ female headers for prototyping or 0.1″ male headers for a permanent connection. Only assembled boards with male headers will be able to fit inside the 3D printed case.

For more information, see the article on PartsNotIncluded.com.

Logitech Shifter Shield for Pro Micro

The Logitech Shifter Shield is designed to interface with the Logitech Driving Force Shifter using a single DB-9 male connector.

Using the Sim Racing Library for Arduino, use the SHIFTER_SHIELD_V1_PINS macro for easy setup with the shield:

LogitechShifter shifter(SHIFTER_SHIELD_V1_PINS);

For use as a USB HID adapter, upload the ShiftJoystick library example. Make sure to modify the object declaration with the shield-specific pin definition (above) before uploading.

Logitech Pedals Shield for Pro Micro

The Logitech Pedal Shield is designed to interface with the Logitech three pedal attachment, included with the Logitech G923 “TRUEFORCE”, G29/G920 “Driving Force”, and G27/G25 wheels, via a single DB-9 female connector.

Using the Sim Racing Library for Arduino, use the PEDAL_SHIELD_V1_PINS macro for easy setup with the shield:

LogitechPedals pedals(PEDAL_SHIELD_V1_PINS);

For use as a USB HID adapter, upload the PedalsJoystick library example. Make sure to modify the object declaration with the shield-specific pin definition (above) before uploading.

Firmware

The shields are designed to be used with the Sim Racing Library for Arduino. You can use any included example for your specific hardware, or write your own using the data the library provides.

Both shields use the SparkFun Pro Micro (32U4), and firmware should be compiled using the "SparkFun Pro Micro" board in the Arduino IDE. You can find the compilation files and installation instructions for the Pro Micro here. You do not need to install the SparkFun boards package if you are using the custom boards package below.

Custom Boards Installation

To install the custom boards package, start up the Arduino IDE and open the preferences window (File > Preferences). Copy and paste this URL for the package index into the "Additional Boards Manager URLs" field:

https://github.com/dmadison/Sim-Racing-Shields/raw/master/arduino-boards/boards-manager/package_simracing_index.json

In the menu, navigate to Tools > Board > Boards Manager and open up the boards manager. Search for "Sim Racing" and then install the "Sim Racing AVR Boards" package. After the package is installed you should be able to select the "SparkFun Pro Micro (for Sim Racing)" board.

Custom Boards Configuration

The custom boards package adds two new options to the boards menu:

  • USB Identity
  • Serial Port

The first option, 'USB Identity', changes the USB PID and USB description for the board. Firmware compiled with the 'Shifter' option will present as "Sim Racing Shifter" with a PID of 0x9101, while firmware compiled with the 'Pedals' option will present as "Sim Racing Pedals" with a PID of 0x9102.

The second option, 'Serial Port', allows you to disable the USB CDC serial port. This improves compatibility with some systems and prevents accidentally reprogramming the board. Note that if you remove the USB CDC serial port the board will no longer automatically reset to the bootloader during programming. You will have to reset the board yourself or use an external programmer.

Case

A 3D printed case design is available to protect the assembled shield and microcontroller. Both shields share the same general footprint and the same case design. When assembled, the case should hold the microcontroller and shield securely without any play.

The case is printed in two parts, and assembled using two M3-10 bolts and two M3 nuts. The recommended print orientation is as-is. Note that the top half of the case is a little tricky to print, and must be printed using bed supports.

License

The files in this repository are licensed under the terms of the GNU General Public License (GPL), either version 3 of the License, or (at your option) any later version. See the LICENSE file for more information.

Included images are licensed under the CC BY-NC-ND 4.0 license. Attribution should be to Dave Madison (@dmadison).

About

Add-on circuit boards ("shields") for connecting Arduino development boards to sim racing equipment.

License:GNU General Public License v3.0


Languages

Language:C 71.2%Language:Makefile 28.8%