You are on page 1of 10

Contents

1. Wheelbase Configuration.................................................................................................................................................................................................................. 2
2. Motor Configuration.......................................................................................................................................................................................................................... 3
2.1 PWM Configuration.................................................................................................................................................................................................................... 3
2.2 Encoder Configuration................................................................................................................................................................................................................. 3
2.3 PID Configuration....................................................................................................................................................................................................................... 3
3. Joystick Configuration................................................................................................................................................................................................................... 5

1
1. Wheelbase Configuration
This is for real-time parameter change for wheelbase. This is only open when stm32 is connected.

2
3
Enable Telemetry FFB: it disables Hid ffb, send data from game to STM32 for playing FFB. Current game support: Assetto Corsa
Steering Angle: 180 -1080 degree for wheel rotation.
Set Center Steering: used for reset wheel position to zero at any position.
Min force: if game force is less than this value, it will equal to min force (used for belt driven)
Total force gain: Max force = toltalforce * gameforce/10000.
Recalibrate: when you change “Total force gain”, must recalibrate to calculate internal parameters.
Desktop spring: force when move wheel is far away from the center without game.

Overall filer, damper filter, inertia filter, friction filter, QFactor, Peak Gain: used for smooth force value (zero is disable), currently I used default value.
Need implement force logging to calculate the factors.
Read this https://www.earlevel.com/main/2012/11/26/biquad-c-source-code/
Effect gains: force of each effect = force of each effect*effect gain/10000
Profile Configuration:
- Save: save current setup to one profile, if new profile name is null or same as current profile, current profile will be updated.
- Delete: delete current profile, can not deleted last profile.
Setup: config for motor and joystick value.
Test Effect: is not impletented

2. Motor Configuration
Used for configuring pwm and encoder

2.1 PWM Configuration


 PWM mode: Pulse/dir and h-brigde. Other is not implemented.
o Pulse/dir: PE09 PWM, PE11 Dir, PE10 Dir Complementary (not tested)
o Hbrige: PE09 PWM+, PE11 PWM- (tested)
o PWM 0..50..100 PE9
 PWM frequency: 16.8 kHz is test, other is not tested.

2.2 Encoder Configuration


 Encoder PPR: pulse per round of encoder (not CPR): PA0 -> encoderA, PA1 -> encoderB, PA2 -> EncoderZ
 Absolute encoder: is not implemented.
 Use Z index: used Z for correction value of encoder.
 Reserve encoder (if wheel turn the opposite direction with joystick)

2.3 PID Configuration


Used for calibrating.

4
- When you turn the wheel to the right, joystick turns to the righ too, choose Control Direction is reverse
- When you turn the wheel to the right, joystick turns to the left: choose direct and tick reverse encoder
-

Default parameter is for my motor MY6812, you can change to find yours if not stop correctly. Read this https://github.com/br3ttb/Arduino-PID-Library

5
3. Joystick Configuration
For encoder with high resolution (>16kppr). And set joystick xAxis min value = - encoder ppr *4, xAxis max value = encoder ppr *4. Other value is not
implemented

6
4. Calibration
After the configuration steps above, here is the procedure you must follow. And only do it onetime after load firmware.

4.1. UseZindex
- Step 1: the wheel won’t work until it find out Zindex. You must have manually rotate the wheel one round.
- Step 2: don’t touch to the wheel, click Calibration button (try increasing Total Force Gain as much as possible). The wheel will rotate to the right and
rotate to the left and finally stop.
- Step 3: Moving the wheel to the real center. Click set Center steering.

7
Each time you start stm32. Turn one Desktop spring force. Rotating the wheel when you feel a force. And it sets the center steering automatically for
you.

4.2. Not use Zindex


Step 1: Don’t touch to the wheel, click cabilation.

Step 2: move the wheel to center. Click “Set center steering”

5. FAQ
5.1. Why doesn’t my wheel base have ffb in Rally 2.0?

Rally 2.0 doesn’t know my firmware. so you need to do it manually:

Go SteamApps -> common -> DiRT Rally 2.0 -> Input -> devices

Open device_defines.xml

Add this line before </device_list> tag like that:

<device id="{00019999-0000-0000-0000-504944564944}" name="vnm_simulation" priority="100" type="wheel" official="false"/>

</device_list>

5.2. Why doesn’t my wheel base have ffb in Automobilista 2?

I don’t have Automobilista 2, but the solution could resolve the problem:

- Delete the profiles document folder


- Calibrate the steering wheel again
- choose whell as legacy like the picture bellow

8
9
10

You might also like