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

FFB wheel, use as train controller idea (need help with programming)

Discussion in 'DIY peripherals' started by gazz, May 28, 2023.

  1. gazz

    gazz Member

    Joined:
    Feb 16, 2012
    Messages:
    35
    Location:
    Scarborough
    Balance:
    105Coins
    Ratings:
    +3 / 0 / -0
    My Motion Simulator:
    Arduino
    I play on a train simulator, and the train i drive the most has a 'notched power wheel' it looks like a car steering wheel, but rotating it is like turning a rotary switch, or rotary encoder with very heavy detents.

    Rotating the wheel changes the power output of the trains motors.

    I'd like to mimic this using a FFB wheel (standard consumer one, like a logitech driving force gt) but programming is not something i'm very good at.

    I'm imagining a windows program that instead of sending constantly updating live force feedback data to the wheel, sends a static 'notch map' to the wheel (selected from a list of different notch maps)

    The number of notches and the force needed to move between them being adjustable to suit different trains, as some trains some have 43 notches, some only 7, but the maximum rotation is 360 degrees in all cases.

    Is this possible? and if so, how would i begin such a project... coding really is something i struggle with, i've only really played with arduino code before.

    To better explain what i mean by the notches, the picture below was drawn by someone last year when i was looking into making levers that have varying notches, using an arduino to power a motor and rotary encoder for a DIY FFB thing (that project didn't go far, as i made the levers with mechanical notch plates instead of force feedback ones)

    [​IMG]
  2. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,549
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    145,112Coins
    Ratings:
    +10,778 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    I have no idea what this should 'feel like', but would have thought a mechanical design where you can set the rotational resistance, with adjustable sprung loaded ball notches would be close to how it likely works IRL, rather than FFB as a car wheel would have, would that be correct?
  3. gazz

    gazz Member

    Joined:
    Feb 16, 2012
    Messages:
    35
    Location:
    Scarborough
    Balance:
    105Coins
    Ratings:
    +3 / 0 / -0
    My Motion Simulator:
    Arduino
    For the feel,
    imagine turning a rotary switch, the clicks as it moves from one position to the next are what i need to replicate, a ramp up of force resisting turning as you turn the knob, then once you are over the top it ramps down and moves into the centre of the next notch... then repeat.
    just amplified a bit to take into account for the extra torque applied from about 10 inches out from the centre shaft by using a wheel to turn the shaft.

    My reason for thinking 'force feedback' to simulate the notches / detents / clicks as the wheel is moved around is that other people who play the simulator can use a force feedback wheel they already have, from playing car driving games, and use that to control the trains.
    as a lot of people don't have the mechanical skills or equipment to make a mechanical solution.

    this would also allow for different trains 'notch maps' to be made and simply loaded to suit trains that have say 7 notches over a 120 degree arc, to the trains that have almost 50 notches over 360 degrees, with some notches being harder of softer to differentiate things like the position that switches the traction motors from series to parallel etc.

    i'm sort of thinking something like the demo programs you get with FFB wheels that you press a button and the wheel moves, vibrates, has a centre spring force etc, only it sends a 'notch map' that stays active until changed.

    But as you can tell, programming is my weak point.
  4. K120_Enthusiast

    K120_Enthusiast Member

    Joined:
    Mar 6, 2022
    Messages:
    38
    Balance:
    297Coins
    Ratings:
    +7 / 0 / -0
    I found this, https://youtu.be/ip641WmY4pA, on Youtube, It's not exactly what you are looking for but it's a similar principle, you could maybe even reuse some of the code.
    • Like Like x 1
  5. gazz

    gazz Member

    Joined:
    Feb 16, 2012
    Messages:
    35
    Location:
    Scarborough
    Balance:
    105Coins
    Ratings:
    +3 / 0 / -0
    My Motion Simulator:
    Arduino
    Brilliant, the 'haptic knob' is the kind of feel i need.... just stronger and using an off the selft force feedback steering wheel.

    This video shows the movement of the wheel in the real train as i am not sure i explained it very well... for some reason i can't embed a video from youtube with a start time, so skip to 4 minutes to see the wheel being moved.

  6. K120_Enthusiast

    K120_Enthusiast Member

    Joined:
    Mar 6, 2022
    Messages:
    38
    Balance:
    297Coins
    Ratings:
    +7 / 0 / -0
    I'm glad to hear that it's what you need. Regarding using an of the shelf FFB wheel, it should be theoretically possible with the wheel's stock hardware, but I am not aware of software that does that. Your best bet might be to reuse the firmware from the SmartKnob and create your own controller board for the FFB wheel. Also, does your train simulator even support input from physical controllers for this function?