Arduino Custom Desktop Controller For Tsw

Discussion in 'TSW General Discussion' started by Whitsim, Sep 8, 2022.

  1. Whitsim

    Whitsim Member

    Joined:
    Dec 26, 2020
    Messages:
    53
    Likes Received:
    64
    I’ve seen quite a few threads about people wanting to use game controllers and the inability of key assignment so I’m going to post my own set-up here. I previously posted this back in the TS Classic forum and have since made a few slight changes. The design is a very generic cab layout that’s ergonomic friendly to me. It’s built using a small aluminum enclosure with other components from Amazon, eBay and Digi-key. Total cost was about $150usd with nearly half of that being the enclosure.

    F112B056-3397-4CCB-8C3B-FEDB00091662.jpeg

    I put together a quick and dirty video on TSW 3 just to show the controller and how it interfaces with the game. Ignore the train handling technique, it’s just to show the hardware control input and how the game responds with the ES44C4 and Class 377.



    It is based on an Arduino Micro connected to buttons running a very basic script I downloaded and modified to simulate being a HID Joystick.

    7E3D7F8C-42F2-49B3-9DBF-395CF9AE4C2A.jpeg F7D8FAD6-7554-46D9-91D7-ABD746D2E334.jpeg

    In the background is a basic program available online called JoyToKey which works with any joystick controller, not just my device, to turn the inputs into keystrokes. The buttons work the exact same as keys, quick press equals quick press of a keyboard key, holding it down equals holding down of a keyboard key. The nice part of JoyToKey is I can have different profiles, currently I have three that I switch between: US Loco, UK Loco, and UK Class 101 (Gear Selector instead of Dynamic)

    5925C69A-89D4-4640-B605-C57AC2AF0D30.jpeg

    The older TS Classic thread on this is here: https://forums.dovetailgames.com/threads/arduino-controller-build.45279/

    Having actual buttons and switches in your hands makes a huge difference for immersion. Hopefully this can inspire people to get creative too…
     
    • Like Like x 2
  2. Kitten

    Kitten Active Member

    Joined:
    Jul 9, 2022
    Messages:
    118
    Likes Received:
    120
    Nice work! (*´∇`*)

    I am prototyping a train controller myself using the same joysticks and buttons. Being industrial controls, they are heavier to use (actuation force) than I would like, so I have been experimenting with lever and springs to find the right ergonomic fit.

    It definitely feels better having dedicated controls vs remapped game controllers like HOTAS, or even Switch Pro as I was using. It can be a fun project if you are interested in electronics.
     
    • Like Like x 1
  3. Whitsim

    Whitsim Member

    Joined:
    Dec 26, 2020
    Messages:
    53
    Likes Received:
    64
    I agree totally, hands on “levers” and buttons is a game changer when you can run most basic functions of the train without touching the mouse or keyboard or even having to look down from the screen.

    Regarding the buttons and switches, all are what I’d consider light duty industrial buttons. There’s enough resistance that you actually have to press it firmly but the whole thing won’t go sliding across the desk. The “levers” are 2-position momentary joystick switches are decent knockoffs of more expensive industrial grade switches and are only like $10-15usd each. They really are the mainstay of the project and allowed me to keep it keystroke based for the widest compatibility with all stock types, even other train sims.
     
  4. driverwoods#1787

    driverwoods#1787 Well-Known Member

    Joined:
    Feb 21, 2021
    Messages:
    9,510
    Likes Received:
    5,877
    When it comes to Deutsche Bahn and future Austrian ÖBB does the controller have PZB Buttons left to right PZB Befehl Frei and Waschasm. You need those buttons when running German and future Austrian routes.
    This happens when you need to move a train towards Dresden Altstadt Yard where you must use PZB Override
     
  5. Whitsim

    Whitsim Member

    Joined:
    Dec 26, 2020
    Messages:
    53
    Likes Received:
    64
    My controller was designed mostly for North American and UK freight and passenger in mind. Between the in-game keyboard assignments and JoyToKey app it can mapped to whatever is desired.

    As an example, the large yellow mushroom button in the center is used for both AWS/Signal and also Alerter/DSD acknowledgement. The two red buttons on the upper right and left are used for open and closing doors on passenger, if I wanted to map them off to different functions on a freight train I could make an additional JoyToKey profile accordingly.

    The whole intention was to get a more hands on experience and reduce the use of mouse and keyboard as much as possible for my use.
     

Share This Page