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

MMOS with STM32F4: G29 shifter?

Discussion in 'Direct Drive Wheels' started by C1500, Jan 13, 2021.

  1. C1500

    C1500 Active Member

    Joined:
    Nov 19, 2018
    Messages:
    165
    Location:
    Germany
    Balance:
    1,118Coins
    Ratings:
    +86 / 1 / -0
    My Motion Simulator:
    AC motor, 6DOF
    Hi folks

    I have tried to connect my G29 shifter to the STM32 but it seems not work.
    Maybe the wiring is wrong or there is a bigger difference between these shifter:

    G29: G29-shifter.jpg G27 / G25: G27-shifter.jpg

    I have used the standard wiring:
    wiring.jpg

    Does someone know how to connect a G29 to the STM32?

    @Peacemaker105 : Don´t you have a G29 shifter?
    Have you connected it to the TDD or STM32?

    Does that work at all?

    kind reganrds
    Peer
  2. C1500

    C1500 Active Member

    Joined:
    Nov 19, 2018
    Messages:
    165
    Location:
    Germany
    Balance:
    1,118Coins
    Ratings:
    +86 / 1 / -0
    My Motion Simulator:
    AC motor, 6DOF
    Hi
    i found one thing that could be a problem.
    There is a difference between G25 and G27
    Pin 1 and Pin 7 are changed:
    diff.jpg

    But which one will work with the G29 shifter?
  3. Peacemaker105

    Peacemaker105 Active Member Gold Contributor

    Joined:
    Jul 18, 2017
    Messages:
    197
    Location:
    Perth, Aus
    Balance:
    1,977Coins
    Ratings:
    +352 / 2 / -0
    My Motion Simulator:
    6DOF
    I use a g27 shifter, my g29 didn't work, as you mentioned.. crazy there isn't a pinout for it somewhere on the internet? I haven't looked to be honest because I liked the g27 because of the extra buttons to map. Unfortunately with my slight EMI it keeps ghosting buttons when connected so I actually have my g27 wheel sitting on the floor next to my rig plugged into usb to use as a usb pass through for my gearstick haha.
    I have a VNM shifter coming in a few weeks so I'm not overly worried. But would be good if you could work out the pinout for others..
  4. C1500

    C1500 Active Member

    Joined:
    Nov 19, 2018
    Messages:
    165
    Location:
    Germany
    Balance:
    1,118Coins
    Ratings:
    +86 / 1 / -0
    My Motion Simulator:
    AC motor, 6DOF
    Hi
    Cause there is no Pinout of the G29 in the Internet i made it by myself ;)

    The G29 seems to work completely another way.
    It looks like, it is working not like I2C, it is working analog an has an EEProm inside.
    IC.jpg
    Its a "M95010-W 1 Kbit SPI bus EEPROM with high-speed clock"
    https://www.st.com/en/memories/m95010-w.html
    For whatever reason...:think

    But i made a small connection diagram:
    G29 - Layout.png
    As you can see, at pin 4 and 8 are the analog outputs.
    Pin 2 seems to be the "revers"-switch.

    Maybe someone has a good idea?

    Kind regards
    Peer
    • Like Like x 2
    Last edited: Jan 13, 2021
  5. C1500

    C1500 Active Member

    Joined:
    Nov 19, 2018
    Messages:
    165
    Location:
    Germany
    Balance:
    1,118Coins
    Ratings:
    +86 / 1 / -0
    My Motion Simulator:
    AC motor, 6DOF
  6. noSaint

    noSaint New Member Gold Contributor

    Joined:
    Jan 9, 2021
    Messages:
    23
    Balance:
    160Coins
    Ratings:
    +13 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    because in the description "Automatic recognition of connected shifter type." ??
    I guess there is built in logic recognising the different chips connected.
  7. C1500

    C1500 Active Member

    Joined:
    Nov 19, 2018
    Messages:
    165
    Location:
    Germany
    Balance:
    1,118Coins
    Ratings:
    +86 / 1 / -0
    My Motion Simulator:
    AC motor, 6DOF
    Hi folks

    Only a short update from me.

    I have connected the G29-shifter to a Arduino Micro at the moment.
    The connection is like this: (shown is the male mating connector)
    wireing.png
    There is a free joystick library which i used.

    Only when 6th gear is set and the switch is active (active means high at the pin) the R-Gear is active.
    If you press the shifter to activate the switch in any other gear, nothing happens.

    Hopefully it will be also work soon with VNM Wheelbase.
    @Hoantv : What do you think? Will you put it in your Software?

    Kind regards
    Peer
  8. noSaint

    noSaint New Member Gold Contributor

    Joined:
    Jan 9, 2021
    Messages:
    23
    Balance:
    160Coins
    Ratings:
    +13 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    I guess it is different resistance for each gear.
    Hope this link can help you:
    • Like Like x 1
  9. C1500

    C1500 Active Member

    Joined:
    Nov 19, 2018
    Messages:
    165
    Location:
    Germany
    Balance:
    1,118Coins
    Ratings:
    +86 / 1 / -0
    My Motion Simulator:
    AC motor, 6DOF
    Hi @noSaint
    I know this video.
    With my Arduino it is working actually very well.

    Here is the code I use:
    Code:
    #define XAXIS_12        350
    #define XAXIS_56        590
    #define YAXIS_135       800
    #define YAXIS_246       300
    
    int x = analogRead(9);              //read X axis
    int y = analogRead(8);              //read Y axis
    int reverse = digitalRead(7);        //read r-switch
    int gear = 0;
    
    if(x<XAXIS_12)                         // Shifter left
        {
          if(y>YAXIS_135) gear=1;         // 1st gear
              if(y<YAXIS_246) gear=2;     // 2nd gear
            }
    else if(x>HS_XAXIS_56)              // Shifter right
        {
          if(y>YAXIS_135) gear=5;         // 5th gear
          if(y<YAXIS_246)
            {
            if(reverse==1) gear=7;        // reverse-gear
            else gear=6;                // 6th gear
            }
        }
    else                                  // Shifter middle
        {
          if(y>YAXIS_135) gear=3;         // 3rd gear
          if(y<YAXIS_246) gear=4;         // 4th gear
        }
    Joystick.setButton(gear-1, HIGH);
    Maybe @Hoantv can use it.
    But I think he already knows the code well from his shifter.
    I only need to know witch analog and digital inputs of the STM32 he will use.

    kind regards
    Peer
  10. Tags..(VR)

    Tags..(VR) Member

    Joined:
    Aug 28, 2017
    Messages:
    237
    Location:
    indiana
    Balance:
    - 6Coins
    Ratings:
    +29 / 2 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform
    im doing the same thing here but the video is confusing. i get errors every time about no joystick.h file or directory. i sure wish there was a bteer video on how to implement this H file into the correct directory. i have been going for the past 3 days trying to figure this out.
  11. Tags..(VR)

    Tags..(VR) Member

    Joined:
    Aug 28, 2017
    Messages:
    237
    Location:
    indiana
    Balance:
    - 6Coins
    Ratings:
    +29 / 2 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform
    i will keep trying though and as far as the leo banard its 20 dollars but the cost of freight is way to much. i will keep serching a better more clearer way to make this happen
  12. igordobschikov

    igordobschikov New Member

    Joined:
    Nov 24, 2022
    Messages:
    1
    Balance:
    16Coins
    Ratings:
    +0 / 0 / -0
    You can connect g29 shifter to stm by pins from video here, and use mmos, it works after some setup