1. Do not share user accounts! Any account that is shared by another person will be blocked and closed. This means: we will close not only the account that is shared, but also the main account of the user who uses another person's account. We have the ability to detect account sharing, so please do not try to cheat the system. This action will take place on 04/18/2023. Read all forum rules.
    Dismiss Notice
  2. For downloading SimTools plugins you need a Download Package. Get it with virtual coins that you receive for forum activity or Buy Download Package - We have a zero Spam tolerance so read our forum rules first.

    Buy Now a Download Plan!
  3. Do not try to cheat our system and do not post an unnecessary amount of useless posts only to earn credits here. We have a zero spam tolerance policy and this will cause a ban of your user account. Otherwise we wish you a pleasant stay here! Read the forum rules
  4. We have a few rules which you need to read and accept before posting anything here! Following these rules will keep the forum clean and your stay pleasant. Do not follow these rules can lead to permanent exclusion from this website: Read the forum rules.
    Are you a company? Read our company rules

solution for 6gear h shifter

Discussion in 'Electronic and hardware generally' started by seppel, Sep 3, 2016.

  1. seppel

    seppel Member

    Joined:
    Apr 3, 2013
    Messages:
    56
    Location:
    k-town rhp
    Balance:
    224Coins
    Ratings:
    +27 / 0 / -0
    My Motion Simulator:
    2DOF, SCN5
    hi all,

    my h sifter is almost finished and at this point its time for the electronic stuff.

    my shifter works with two shiftcables one for x axes and one for y axes
    [​IMG]i search for a method to make this with two potentiometers.
    can anyone give me a advice how to realize this?? or maybe a better solution??
    thanks
    best regards

    Attached Files:

  2. seppel

    seppel Member

    Joined:
    Apr 3, 2013
    Messages:
    56
    Location:
    k-town rhp
    Balance:
    224Coins
    Ratings:
    +27 / 0 / -0
    My Motion Simulator:
    2DOF, SCN5
    a lot of views but no answere. so i must clarify my plans
    Both h shifter from Logitech and Fanatec work after my planned principle .
    “Typical H shifter electronics is quite simple its just two potentiometers for X and Y
    positioning which is mechanically constrained usually by a H pattern plate.
    Each axis of the shifter is fed to a microcontroller which uses an ADC (analog to digital)
    module configured to sample the voltage levels across each of the pots.
    The microncontroller will be calibrated to know what each pair of voltage readings
    represent each gear selected.”
    Watch this video (fist seconds) for impressions.


    my question is now:
    with which electronic ponents I can implement this principle . is to realize a corresponding microcontroller or a simple loe bodnar board or is it perhaps a arduino

    I search the web for this topic with no sucsess.
  3. RacingMat

    RacingMat Well-Known Member Gold Contributor

    Joined:
    Feb 22, 2013
    Messages:
    2,233
    Location:
    Marseille - FRANCE
    Balance:
    20,875Coins
    Ratings:
    +2,079 / 21 / -2
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Here are some hints:

    ► get some inspiration from existing hardware : TH8RS shifter has a Calibration Software enabling you to adjust electronic gear stroke settings and recalibrate the shifter as required.
    741994TH8RScalibration.png

    http://ts.thrustmaster.com/download/accessories/pc/wheels/exe/th8rs/th8_rs_calibration.pdf

    ► so, with your hardware (2 potentiometers) you'll get 2 values. You need to "map" them.
    if 0<pot1 <50 and 100< pot2<150 then shifter=1

    this example could be useful https://programmingelectronics.com/tutorial-14-5-switch-case-statement-old-version/
    SwitchCaseRangeMap.jpg
    SwitchCaseCodeDiagram.jpg
    • Informative Informative x 2
    • Useful Useful x 1
  4. seppel

    seppel Member

    Joined:
    Apr 3, 2013
    Messages:
    56
    Location:
    k-town rhp
    Balance:
    224Coins
    Ratings:
    +27 / 0 / -0
    My Motion Simulator:
    2DOF, SCN5
    thx mat,

    now i got a point from were i can Start.
  5. RacingMat

    RacingMat Well-Known Member Gold Contributor

    Joined:
    Feb 22, 2013
    Messages:
    2,233
    Location:
    Marseille - FRANCE
    Balance:
    20,875Coins
    Ratings:
    +2,079 / 21 / -2
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Here is the shifter pattern:
    grille.png

    The corresponding PotX and PotY values

    conversion.png

    Shift PotX PotY
    1 0 0
    2 0 2
    3 1 0
    4 1 2
    5 2 0
    6 2 2
    7 3 0
    R 3 2

    Pseudo code
    • Informative Informative x 3
  6. seppel

    seppel Member

    Joined:
    Apr 3, 2013
    Messages:
    56
    Location:
    k-town rhp
    Balance:
    224Coins
    Ratings:
    +27 / 0 / -0
    My Motion Simulator:
    2DOF, SCN5
    thx again for your help mat.
    at this point i have no experience with arduino and its features. so i dont know how i can use your codelines.
    i got no idea how i can set up the arduino for working with the simtools software or the most racing games.
    BUT i began to read some tutorials to get the basics for arduino. i dont want to copy and paste the code, i like to understand how it works :) hope in few weeks i understand what you posted for me.
    so long thanks a lot and
    best regards
  7. outrunner

    outrunner Run to get the race leader flag!

    Joined:
    Oct 7, 2016
    Messages:
    53
    Occupation:
    father mother
    Location:
    Italy
    Balance:
    639Coins
    Ratings:
    +8 / 0 / -0
    My Motion Simulator:
    Arduino
    Any new on this?

    If the racing game you are using support different buttons for different gear positions, it would be easy to implement an arduino sketch that checks for X Y shifter coordinates (as RacingMat said) and translate those to keyboard or joystick presses. With this configuration there's non need to receive data from the game.