Best Way To Make A Controller With An Arduino?

Discussion in 'General Discussion' started by fbarto, May 3, 2021.

  1. fbarto

    fbarto New Member

    Joined:
    May 3, 2021
    Messages:
    9
    Likes Received:
    3
    I've seen a lot of people saying that getting a cab controller can really improve the immersion into the game. I've looked into some of them but I think that I would be better off making one with an Arduino (or any microcontroller) as it would allow for more customizability and options. I found some posts ond other websites in which the arduino just sent keystrokes into the computer, which could work for toggles and buttons but I don't think it would be reliable with brake and throttle controls. I've also found a lot of projects on Github, but these are all over the place in terms of completion, compatibility and functionality. Most of them do seem to use the raildriver.dll which also allows some of them to output data like speed. Since that is about everything I managed to find I wanted to see if someone else might have managed to do this or if they have any tips on where (if anywhere) should I start.
    Also I am running the game through Proton on Linux so I will also need to forward the data from the Arduino to whatever I will end up using, but I think that I could easily figure that out on a Linux forum after I find out how to do this in the first place.
     
  2. 749006

    749006 Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    8,420
    Likes Received:
    2,675
  3. ntypeman

    ntypeman Well-Known Member

    Joined:
    Jun 19, 2018
    Messages:
    1,052
    Likes Received:
    269
    This is a subject that interests me... At the end of the day it's all down to cost... The AWS plunger from ATS is reasonably affordable but the combined throttle / brake controller, that's something else at near £300!!!

    I could make an AWS plunger cheaply (in fact I have one ready) but what lets me down is the interface... I know I need an arduino board but I know nothing about how to programme them... An arduino board can be picked up cheaply on well known auction websites for between £5 -£10...

    I'd be interested in anyone else's comments...

    Eric
     
  4. fbarto

    fbarto New Member

    Joined:
    May 3, 2021
    Messages:
    9
    Likes Received:
    3
  5. fbarto

    fbarto New Member

    Joined:
    May 3, 2021
    Messages:
    9
    Likes Received:
    3
    An Arduino isn't that hard to programme as there are a lot of tutorials online on pretty much anything with them, what I'm more confused about here is how to make it communicate with the game itself. The cost is another reason why I'm considering making one with an Arduino, potentiometers aren't that expensive so it wouldn't be too complicated to make my own levers for brake/throttle. I don't think an AWS plunger would be as useful for me as for that I can use the keyboard shortcut, levers are more what I'm looking for.
     
  6. 749006

    749006 Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    8,420
    Likes Received:
    2,675
    • Like Like x 1
  7. fbarto

    fbarto New Member

    Joined:
    May 3, 2021
    Messages:
    9
    Likes Received:
    3
    A lot of the Github projects do seem to emulate the RailDriver, but I couldn't figure any of them out. The thread you posted is just what I was looking for, thank you.
     
  8. Pookeyhead

    Pookeyhead Well-Known Member

    Joined:
    Dec 7, 2018
    Messages:
    4,180
    Likes Received:
    2,607
    Only if it actually replicates the loco or train you are driving, otherwise you have some cheap plastic levers on your desk... I can't imagine driving a 37 with this....
    rd.desktop.home.jpg
    ....being that "Immersive". In fact, I can't think of a single train with controls that resemble that thing.

    If you want immersion, then run at max settings, and sit close to a 30inch+ desktop monitor so that it fills your peripheral vision. Learn the keyboard controls so that you don't need to look down, and then you'll feel immersed.
     
    Last edited: May 5, 2021
  9. ntypeman

    ntypeman Well-Known Member

    Joined:
    Jun 19, 2018
    Messages:
    1,052
    Likes Received:
    269
    Most modern US locomotives have this style of control desk... Ok... maybe not all the buttons or "d pad" but the actual throttle, reverser & brake levers are all very similar...
     
  10. fbarto

    fbarto New Member

    Joined:
    May 3, 2021
    Messages:
    9
    Likes Received:
    3
    That's why I'm making my own, I will probably make the controls resemble an actual cab. I've already tried with keyboard controls but having to look down at the keys breaks the immersion. I already do play at max settings on a TV and that does feel a lot better than playing on a laptop.
     
  11. ntypeman

    ntypeman Well-Known Member

    Joined:
    Jun 19, 2018
    Messages:
    1,052
    Likes Received:
    269
    This is what I would class as a modern US locomotive control desk:

    sd70-engineer.jpg
    [​IMG]
    Ok, so the raildriver unit isn't perfect but it's not far off...
     
    • Like Like x 1
  12. ntypeman

    ntypeman Well-Known Member

    Joined:
    Jun 19, 2018
    Messages:
    1,052
    Likes Received:
    269
    Whilst I can agree with you in part, that's ok if you are happy to drive one particular class (type) of locomotive... Here in the UK (and I don't suppose the rest of the world is much different) we have several different types of cabs & controls...

    You could not have a "one simulator control desk fits all"... You'd have to be VERY wealthy to be able to have a mock up up every type of cab you wish/like to drive & the space required to store every such device would be immense...

    If you had a set of class 37 controls, they would match something similar like the Class 40 & 55 but using them to drive a HST or Class 66 for example??? Come on... hardly realistic is it...???
     
  13. Pookeyhead

    Pookeyhead Well-Known Member

    Joined:
    Dec 7, 2018
    Messages:
    4,180
    Likes Received:
    2,607
    ...but not a class 150, or 156, or 158, or 350, or 47, or 37, or 91, or 56, or 66, or 142, or even looking at US traction, not a SD60, or a SD40-2, or a GP50, or a ES44AC, or a F7, or a.... you get my point.
     
  14. ntypeman

    ntypeman Well-Known Member

    Joined:
    Jun 19, 2018
    Messages:
    1,052
    Likes Received:
    269
    you might get away with it for a Class 70 with a teensy weensy bit of ignorance... LOL... ;)

    70 cab.jpg

    [​IMG]
     
    Last edited: May 5, 2021
    • Like Like x 2
  15. Pookeyhead

    Pookeyhead Well-Known Member

    Joined:
    Dec 7, 2018
    Messages:
    4,180
    Likes Received:
    2,607
    But you'd have to look at your Raildriver console.. wouldn't that also break the immersion? As I said, learning to use the keys without looking is the key here... no pun intended. Maybe this is because I'm a life long gamer who already has a habit of using WASD and the surrounding keys without looking, and also because I can touch type without looking at the keyboard. I appreciate not everyone has that ability, but I can't see how placing that plastic monstrosity called Raildriver in front of a 24" 1080p monitor is immersive ;) I still insist sitting really close to a large, hi res screen that fills your peripheral vision, and not looking away from it is the best way to be immersed in this simulator. I don't understand how using it to drive a class 40 adds immersion. If you were driving something that happens to look exactly like a Raildriver console perhaps... but even then... I'm not convinced.

    I think VR would be the way to go, or at least Track IR and a massive screen that fills your entire field of view. ANd having a massive TV is no good if you're sat 12 feet from it either. It's about filling your field of view, not physically how big the TV is. My 31" screen that I sit 18 inches from will do a better job that a 80" TV that's 4 metres away. Fill your field of view.

    If people like it, then fine... go ahead. I mean you may just really like the fact that you are moving levers instead of pressing keys, and there's nothing wrong with that, but that's just like saying some people like flight sims with a yoke, and some with a joystick... both are actually valid, but neither really adds immersion. Having only the simulator inputting to all your senses is the only way to do that, and talking of which....

    Another way to "Immerse" yourself is sound. How many of you pump TS through a decent sound system with adequate power with decent speakers and a good subwoofer? ...or use decent headphones? Standing next to a 37 pulling away in real life is something that is really, really loud, and a visceral experience you feel as well as hear.

    Fill your field of view. Fill your ears. Lots of sub-bass. Don't look down. = Immersive gameplay. Having plastic levers sat in front of you is not.

    All just my opinion of course, but until you have literally filled your field of view with a decent resolution display, with all the bells and whistles, and had decent sound that you can feel as well as hear, and learned to not look away from the screen, you may not understand what I'm banging on about.. in which case feel free to berate me LOL.
     
    Last edited: May 5, 2021
  16. fbarto

    fbarto New Member

    Joined:
    May 3, 2021
    Messages:
    9
    Likes Received:
    3
    I feel like having direct analog input, even if not accurate to the cab, is still better than holding down a key and looking at the GUI/turning around in the cab to see what position it is in. Even if it didn't add imersion it would still be a better overall experience. I also do have pretty good headphones and all is good on the audio/video part. I'm right in front of the TV so it pretty much does cover my entire FOV.
     
  17. fbarto

    fbarto New Member

    Joined:
    May 3, 2021
    Messages:
    9
    Likes Received:
    3
    I was thinking of maybe making the levers and elements removable so you can move them if necessary depending on how everything turns out. If it does work out it would allow you to swap out and move elements without needing to change any electronics, but that is at the end of the priority list. It would still be better controling a class 37 with a class 47 controller than using the mouse on the GUI or the keyboard.
     
    • Like Like x 1
  18. ntypeman

    ntypeman Well-Known Member

    Joined:
    Jun 19, 2018
    Messages:
    1,052
    Likes Received:
    269
    Agreed to a degree but wouldn't be suitable for a 59 or 66...

    Fbarto... if you don't mind me asking, where are you from... The UK or abroad???

    Eric
     
  19. fbarto

    fbarto New Member

    Joined:
    May 3, 2021
    Messages:
    9
    Likes Received:
    3
    Croatia, Europe, but until someone makes any Croatian routes or locomotives I'll mostly be driving UK and Germany scenarios.
     
  20. 749006

    749006 Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    8,420
    Likes Received:
    2,675
    https://railworks.com.hr/ - at least you will understand the website

    HZ 6111
    Screenshot_1 - Test Centre_51.11623-6.22374_12-00-38.jpg The 6111 Emu is drivable using the Keyboard or the HUD - no cab controls

    Screenshot_1 - Test Centre_51.11635-6.22368_12-00-28.jpg
    Again the 1141 is drivable with keyboard or HUD but no cab controls
    And there is an 1142 again drivable with keyboard or HUD but no cab controls

    Screenshot_1 - Test Centre_51.11646-6.22371_12-00-21.jpg

    Screenshot_1 - Test Centre_51.11650-6.22356_12-00-10.jpg
    HZ 2062 is fully drivable in the cab with full controls and instruments

    Peter
     
  21. BB22210

    BB22210 New Member

    Joined:
    Jul 31, 2021
    Messages:
    2
    Likes Received:
    1
    Hello everyone,
    I am new on the Forum and on TS and I am looking to interface a real diesel locomotive console with TS2020. My goal is to make it 100% functional like today under OpenRails (Volt, Amp, speed, pressure gauge, pantograph, lights, KVB, etc ...)
    some views at : https://www.facebook.com/AlpiSim
    I do not use a RailDriver.
    Reading this post and others I don't well understand what to install and in what order.
    What software should be installed on the PC, besides TS20xx and an Arduino ?
    Any docs or links to follow ?

    Thank you in advance for your help ;)
     
    Last edited: Jul 31, 2021

Share This Page