Electronics setup - ChrGri/DIY-Sim-Racing-FFB-Pedal GitHub Wiki

This section assumes you've already flashed your control board with the latest firmware. If not, go do that now!

So you've built a pedal, and now you're excited to power it on and get it working!

[!IMPORTANT] It's strongly recommended to test the electronics before you install them into your pedal. Troubleshooting connections when everything is installed is much harder!

Testing the electronics

To test the electronics you will need:

  • The control PCB
  • Power PCB
  • Servo
  • Linear Rail
  • Loadcell
  • Power supply

Wiring the components

This section is written for the V3/V4 PCBs from ChrGri's hardware repository. If you're using the control boards from Gilphilbert's repo, follow the instructions there, although the connections are all the same. It's a good idea to use different color cables where possible, as this will make your cabling less error prone.

Connecting the servo is easy, since the connections on the control board have the same name as the servo connections.

Powering on

It is important to power on the servo before powering on the control board. If the control board power is connected before the servo, the servo will go into Alarm state with a solid red light. If this happens, simply unplug everything and then power up the servo first. If the firmware has been flashed and everything is connected properly, the pedal should start to move, first backward then forward as it works out the maximum range of motion.

Help! My pedal isn't moving!

If your pedal moved, you can skip this section. There are only a few reasons the pedal won't move, those are that the control board can't connect to one or more components it needs to. If the pedal can't connect to the servo's serial port (Rx and Tx) then it will reboot every few seconds. For the V3 and V3 boards, the controller will pause on boot if it can't connect to the ADS1256. Finally, if the connections to the servo's movement functions (Pulse, Direction) aren't connected, the servo simply won't move, even though everything else is working fine.

Initial troubleshooting

There are a few things you can do before you start reading logs that may fix things quickly.

  • Check your connections and make sure they're all correct
  • Try swapping your serial (Rx and Tx) connections to the pedal
  • Check your soldering joints! It's very easy for these to cause havoc. If you're new to soldering this is a great guide

Viewing the pedal logs

If your pedal still isn't working, you'll need to start debugging:

  • Make sure Arduino Studio or whatever you used to flash the control board is closed
  • Open SimHub and open the DIY FFB Pedal menu item. If you can't see it, install the plugin.
  • Take note of the COM ports listed (COM1, COM4, etc.)
  • Connect the control board to your PC. In the SimHub plugin, click "Refresh COM ports" and check for a new one. This is your pedal - select it and click Connect to pedal.
  • You should see "Connected" at the top of the screen on the left (this is the status window).
  • Assuming there's no connection issue, press the Reset button on your control board (this may be labeled EN on some boards)
  • Check the Serial monitor on the right - you should see a log of the pedal booting here.

Understanding the boot messages

Log item Description
iSV57 slaveId found: This is the connection to the serial port of the servo. The value should be 1, if you're getting 0, then check your wiring and solder points for the servo connections to the control board.
Target Version: XYZ, source version 255 Our configs are versioned as they can change. The Target Version shows the config version the firmware is expecting, while the source version is the config version that's currently stored in the control board. If you're seeing a source version of 255, it means the pedal has no config! You must send a config to the pedal to make the pedal work
Offset: X This is the voltage offset of the ADC and it should not be 0. If your pedal is showing 0, check that the connections to the ADS1256 module (V3/V4 boards) and loadcell (all boards) are good
Variance est and Stddev est The ADC (ADS1256 module) and loadcell have some natural variance. Variance est. comes from ADC this - in some situations it can be 0, but stddev est should not be 0. If it is, check the connection between the ESP32 and ADS1256 modules (V3/V4 boards only)
Max Position is 1xxxx As the servo moves and the pedal moves, it will find the ends of the movement (start and end). If Max Position is less than 5000 then check the servo and rail aren't jammed on anything preventing movement
Setup End If you reach this point, everything should be working.

If you're still stuck, join the Discord server and ask and someone will help!