Initial Configuration for an AASD based setup - hoantv/CarSimulatorFirmware GitHub Wiki

Before Continuing

Make sure your setup is in the following state before continuing:

  1. AASD drive is switched on.
  2. All parameters have been set to initial values as per instructions provided here.
  3. You have run the steps to configure the servo drive parameters and your Pn190 value (here).
  4. You have flashed the firmware to your controller (like this).
  5. Your Controller board is plugged in.
  6. The Configurator app is running and the state shows “Connected”.

Initial Configuration

Follow these steps to configure your wheelbase with the Configurator app:

  1. Go to Setup > Preferences, and click “Enable Encoder Position Correction”. Click OK.

  2. Go to the Hardware tab and select the following: a. Mode: _PWM & Dir_ b. Frequency: _16.8 kHz_ c. PPR: 2500 (or whatever your CPR value for your motor’s encoder is, divided by 4). So if your motor’s encoder’s CPR value is 10 000, set PPR to 2500. d. Deselect Absolute Encoder (not implemented yet). e. Select Use Z Index. f. Deselect Reverse Encoder. g. Set the PID Controller settings as in the image below. h. Click Apply to save the settings to your controller device (temporary memory). i. Click Save to write the settings to your controller device’s EEPROM (permanent memory).

Hardware Tab Settings for AASD

  1. Display the Dn017 value on the AASD servo drive.
  2. Keep your hands and any other objects clear from the wheelbase, and make sure the wheelbase motor is safely secured to a heavy desk (or rig).
  3. Disengage the Estop button (engaging the motor).
  4. The motor may spin in either direction. At this point, this is fine.
  5. On the Base tab, click Calibrate. Refer to the Functionality Overview for what the Calibrate function does.

Base Tab

  1. When calibrating, the wheel should spin to the left, engage an end-point with a loud “clunk” sound, then it should spin to the right, again engage an end-point with a loud “clunk” sound. It will then spin to the left again, engage an end-point with less of a sound, and finally it will spin to the right and it should come to a stop (or it may continue spinning if you have an issue with your voltage offset Pn190, which we will resolve further down).
  2. There is currently a bug in the Configurator that reenables the Enable Encoder Position Correction in the Preferences screen. This bug may cause your wheel to continue spinning at this point. Therefore, you need to click on Setup again, click Preferences, and deselect Enable Encoder Position Correction. Click OK. If your wheel was spinning, it should stop now.
  3. If your wheel is still spinning, engage the Estop button (to disengage the motor), then look at the Dn017 value on the servo drive. Disengage the Estop button and the wheel may continue spinning. Do this a few times and you may get the drive to stabilise at the correct “resting” voltage, with the wheel no longer spinning. If reengaging and disengaging doesn’t fix the spinning wheel after 5 attempts, move to the next step.
  4. If you now see a new “resting” voltage on the servo drive’s display, change your Pn190 value accordingly. If you’re getting 0.19 on the display, set the Pn190 parameter to -190. This should stop your wheel spinning (as soon as you apply the new Pn190 value on the servo drive).
  5. If your wheel is still spinning, you may need to further alter your Pn190 parameter on the servo drive. See the Troubleshooting section for help.
  6. Go back to the Hardware tab and confirm that all settings are the same as you set them in the steps above. In some circumstances, these settings can change automatically (also a bug). If that is the case, set them back to the correct values from above, click Apply and Save. This may also be a cause for a spinning wheel.
  7. Go back to the Base tab, and after turning your wheel into a “centered position”, click on the Centerize button. This will mark the correct "center" of the wheel.
  8. In the Debug tab, the X value in the Wheel section should increase and decrease as you turn the wheel left and right. When you center the wheel, the X value should be 0. Turning right will increase the value (positive), turning left will decrease the value (negative). If you are seeing the opposite, you may need to switch on Reverse Encoder in the Hardware tab (remember to click Apply and Save if making a change in the Hardware tab).
  9. Go back to the Base tab and set all the settings exactly like below. Note that all User Effects should be turned off.

Base Tab Initial Settings

  1. Click Apply. You should now be able to turn your wheel in either direction and you should feel the end stops with some force preventing you from going beyond them.

  2. You may also experience some strange behaviour now like the wheel pulling towards an end stop then bouncing there. This is normal.

  3. Again on the Base tab, switch on the Spring User Effect, setting the Force to halfway and the Gain to about 10%. Click Apply.

  4. Now you should be able to turn the wheel in either direction and the Spring effect will pull the wheel back towards center if you let it go. Try this and confirm that your wheel is working in “Desktop Mode”.

  5. At this point your wheel may pull back towards center with the Spring effect, but your wheel may not “settle” in the center point. You may feel a “notch” at the center point that pushes your wheel away from center. This is fine and we will fix this shortly. (TD: Add a fix for this issue).

    a. If you want a quick fix for this "center notch" issue, you can reduce Pn189 from the initial value of 40 until you no longer feel this “notch” at the center point. You may need to take this down as low as 10. But you will see an impact in the Overall Force and Stop Force levels that will require other adjustments. Best to just leave this as is. (TD: Remove this once the correct fix is found).

  6. If the above is working, your controller is now able to correctly pass force feedback instructions to your servo drive and to the motor.

  7. Before launching a game, go to the Windows Control Panel > Game Controllers and confirm that the VNMSim controller is visible, and that the X Axis changes as you turn the wheel.

VNMSim Controller in Game Controllers

  1. You are now ready to fire up a game and test your wheel. Your game may be listed in the Game-Specific Config section in the menu on the right. Follow those instructions (if available) for best results.
  2. Take note that once running, the game takes over control of the force feedback commands sent to the wheel. Therefore, you will no longer feel User Effects (like “Spring”) that you set in the Configurator app.