Skip to content

Arduino library to enable a dual paddle clutch for sim racing

License

Notifications You must be signed in to change notification settings

MorGuux/PaddleClutch

Repository files navigation

PaddleClutch

Arduino library to enable a dual paddle clutch for sim racing

In-Game Usage

The two clutch paddles are used together with either a third potentiometer or a bite point set button to enhance a car's launch from a standing start.

The right paddle is a master clutch paddle. This is always bound to the clutch from 0-100%, so can be used in an emergency to prevent stalling. The left paddle is an adjustable range clutch paddle. It is bound from 0 to the bite point set value, which can be adjusted with a potentiometer or button.

Before a race start, the driver will stop on the track, enter first gear and input full throttle. Depending on which method of bite point set you choose (potentiometer or button), perform the following:

With bite point set potentiometer

  • With the left paddle held in, turn the bite point set potentiometer until the car starts to move.

With bite point set button

  • With the right paddle held in, slowly release the paddle until the car starts to move, then press the bite point set button.

On a race start, the driver will stop on the track, enter first gear and input full throttle. Holding in both paddles, when the race starts, quickly release the right paddle and slowly release the left paddle to launch the car with minimal wheelspin.

Arduino Usage

  • Copy the PaddleClutch.h class into your working directory

  • Import the PaddleClutch class into your arduino sketch

    #include "PaddleClutch.h"
  • Declare the PaddleClutch class in your sketch

    PaddleClutch PaddleClutchManager;
  • In your arduino loop function, call ".getClutchOutput" with the two paddle values passed in

    clutchOutput = PaddleClutchManager.getClutchOutput(leftPaddleValue, rightPaddleValue);

    With a bite point set potentiometer, you can use

    PaddleClutchManager.updateBitePoint(bitePointValue)

    to update the bite point value. Otherwise, with a bite point set button, use

    PaddleClutchManager.updateBitePoint()

    and the current value of the right clutch paddle will be used as the bite point.

    You can also specify the clutch axis ranges by using the following methods:

    PaddleClutchManager.setLeftPaddleRange(0, 1023);
    
    PaddleClutchManager.setRightPaddleRange(0, 1023);
    
    PaddleClutchManager.setBitePointPotRange(0, 1023);

    There is no hardware implementation in the PaddleClutch.h class, so that different hardware with different resolutions can be used (potentiometers, hall effect sensors, ADS10XX modules etc). The resulting clutch output value is scaled to 16-bit for use with the Joystick library.

    Example

    I have attached two sketches that demonstrates usage of the class with both bite point set methods. Both update the Throttle axis on the Joystick as well as output the two paddle positions, the bite point value and the clutch output to the serial port.