Jump to content

SimRail Controller hardware we've built.


Recommended Posts

I've been messing around the past few months designing and 3D printing a few different things that i use to drive the trains in SimRail, plus learning excel to make drivers timetables.

So i thought i'd start a topic to show them off, and for others to post pics of what they use to drive the trains (that is not a standard boring keyboard 🙂) the idea being to give others ideas that they can build on and make similar or better versions of controllers.

Proper controller support is being worked on according to a 'roadmap' type post on steam / discord, when that is available i can imagine there will be lots more people who start building / adapting controllers for their favourite train, but for now we have to send key binds / keyboard key presses to operate any controls and i know some people are holding off making controllers until we get proper axis support for moving the main controls of the trains.
 

My favourite train is the EU07 / EP08, so you will notice my controllers are based on operating that train. 

 

SimRailSetup.thumb.jpg.2a575744c431cb2605eea7592c11d900.jpg

I have some disability issues so i am confined to my bed at times, so i use a gaming laptop to drive in SimRail (Lenovo Legion 5 Pro) and this is sat on an overbed table... it has a Tobii enabled webcam built in, and i use this face tracking to allow my view in the sim to move as i move my head (Tobii camera talks to  FaceTrackNoIr  which outputs TrackIr data that SimRail reads) 

As you can see in the photo above, i have added 2 android tablets and a kobo clara HD e-ink reader either side of the laptops screen, they are held in Brodit mounts connected to 3D printed arms connecting them to the mounts on the frame and desk of the table, my phone sits in that empty brodit car charger mount below the right hand tablet (it's in my hand taking the photo here) 

The right hand 10 inch tablet i run a remote system monitor on most of the time, shows me how the laptop is doing when i am driving in SimRail without having to display any kind of overlay on the main screen,
I average 60fps @ 2560 x 1600 resolution (it's a 16:10, 165Hz screen)  and the laptop has never gone above 75 degrees C for the CPU or GPU <3070Ti> when running SimRail at all max settings, except for the 'Vegetation Density' slider that i set to 80%.

To the left of the big tablet is my Kobo Clara 6 inch e-ink reader (like a kindle.... but better 🙂 ) on this i display my version of drivers timetables so i can drive with the HUD off, they are similar to the ones at SimRail Express but i adjusted the layout and removed 3 columns that were just repeating the same info over and over, this is to allow the content to fit properly on the little 6 inch screen and fill it fully.. i.e. no borders as every mm is needed,
I also show all speed limits along the line including temporary ones on my version of the timetables.

 

The 7 inch tablet on the left is always running the French SimRail live map and EDR when i drive in SimRail.

 

Mounted to the left of that tablet is my 3D printed Radmor style microphone, which i use when talking to dispatchers / other drivers in SimRail.

Below the small tablet is my EU07 'inspired' button box.

To the right of the laptops keyboard is a macro pad with 3 rotary encoder knobs.

And below the side table with the tracker ball on is my horn lever. 

:

I'll go into more detail in the next posts about the individual controllers / microphone etc.

Edited by Gazz292
  • Like 14
  • Thanks 1
Link to comment
Share on other sites

 

This and the next couple of posts will go into more detail about the controllers i use / built.

I'll start with the macro pad with 3 rotary encoders and 12 keys, which is a shop bought item :

MacroPad.thumb.jpg.099ed4d1d8178837ddc44a8b4c359bba.jpg

The macro pad above can be found by searching for '3 knob macro pad'  there are a few different types and their prices vary wildly.. amazon will be the most expensive of course, as you are paying for the convenience of getting it next day, but if you can wait for delivery from china, they can be had for £25+. 
I've changed the keycaps to 're-legendable' ones, and changed the outer 2 knobs to quick turn dimple ones... i got the keycaps from 'The Pi Hut' and the knobs of amazon (at inflated prices of course)

The macro pad was very simple to set up once i downloaded the correct setup software:
image.png.f97864bc8988fe2d4fdbfdb7b478d2e1.png
Above is the programming software setting up my top right key for 'emergency brakes' which i have set to be 'Backspace' in SimRail (my macropad is rotated 90 degrees to the layout on the screen... and keys 13 - 16 do not apply to this pad.... you can also set up 3 different key maps if you want to with the 'Layer' function, then press a tiny button on the side of the macropad to change between them.


I set the right hand encoder to send the 'power increase' key bind for every click as it's rotated right, and the 'power decrease' key bind when it's rotated left... it has 20 indents / clicks, so takes just over 2 full turns to wind the power wheel right round in the EU07/EP08. 
I also set the button on that encoder (push the knob down) to activate the 'fast move' function, so i can press and hold the knob down and rotate it a little, and the power wheel in the sim will move to notch 28, 43, or zero depending on which way i rotate the knob.

The middle knob is the 'shunt lever' again it sends a key stroke for each indent you move it past to move the lever in the sim up and down. 

And the right hand knob is the train brake lever, with the push down function being the key bind to move the brake lever directly to the running position. 

The keys i have set up simply to send the relevant key bind for the functions that i have printed key cap labels to show, i.e. i have 'V' as wipers, so pressing that button on the macropad sends the letter V to the sim.

 

I really like twiddeling the horizontal knob to move the EU07's power wheel, shunt lever and brake lever, it's much better than pressing and holding keyboard keys, but not as nice as using a proper wheel, which i will build one day.

Another post of mine in this forum is about an idea to use a force feedback steering wheel as the trains power wheel, <link to that post.
However for this to work it will need a windows program writing to send a 'notch map' to the wheel, which produces the feedback in the form of notches that you move through as you rotate the wheel, then a way to read the wheels angle and convert that to key presses for increase or decrease power each time the wheel is moved around one more notch. 

Unfortunately programming is not something i'm any good at, so my only hope is for someone who can write windows programs to be interested in that idea and help me with it... i have an idea to 3D print a brake lever that will screw onto the force feedback wheels' shaft, after removing the steering wheel, so with 2 ffb wheels you could get both power controller and brake lever functions.

 

Edited by Gazz292
  • Like 3
Link to comment
Share on other sites

Not to blow my own horn....

HornLever.thumb.jpg.4422163d5e10110b21551f50d8247d83.jpg

My EU07 inspired horn lever, 
I used a 2 way joystick switch, a 2 button usb mini keyboard and a 3D printed case that allows the horn lever to be mounted to the underside of my desk... so i reach over and down for the horn when i'm driving the train, just like you would in the real thing, 

 

The joystick switch is one of these:
hornjoystick.jpg.ec38f308f1b468482dcc798dd983ab23.jpg
i replaced the black ball for a 20mm red one (i've got 4 'spares as i had to buy 5) I also removed the rubber bellows from the shaft.

 

The 2 switches are wired to a 2 button usb keypad (a wasteful and expensive way to do this, an Arduino pro-micro or similar that can be programmed as a HID keyboard would have been a better option, but at the time i was not up to programming an Arduino, so used an off the shelf hack)
I disabled all the RGB lights on the key pad and set up the 2 key binds to be the ones i use for horn high and horn low. 

hornkeypad.thumb.jpg.5c0bfe9261907551dacb95a21ca7f78d.jpg

Then the joystick and mini keypad were stuffed into a 3D printed case and screwed to the underside of my small 'shelf / desktop that my mouse / track ball sits on :

hornboxrender.thumb.jpg.30d064ebc2249344ff63b7f8fc1e448e.jpg

 

Edited by Gazz292
  • Like 5
Link to comment
Share on other sites

Breaker one - nine, this here's the rubber duck, i think we got ourselves a convoy...  

3DprintedRadmorMic2.thumb.jpg.1c173e004e919201e8bcd3afc4ad8c9e.jpg

It just didn't feel right holding down a keyboard key and talking into space when contacting the dispatcher in SimRail, and as i drive the EU07 / EP08 99% of the time, i just had to get myself a Radmor style microphone. 

I did want to get a complete Radmor radio telephone set, but it seems all the people who have been playing MaSzyna have bought them up, so when one does come up for sale it's at a silly price.

Just finding a microphone on it's own was hard enough, when i did find one the owner would not ship to the uk, and to be honest i'd have had to gut the internals anyway,
so i figured a 3D printed one would be better, and others could perhaps copy it and make themselves a Radmor style mic too (one day i will 3D print the switch plate part of the Radmor radio (if we get the input to change channel and adjust the VOIP volume added to SimRail)

This is a render from Fusion 360 of the front half of the mic:
3DprintedRadmorMicInternalrender.thumb.jpg.7c83aa7aece7e5a9a052faeef677b487.jpg

I designed it to hold all the parts in place that make it work, and the only soldering needed was to attach the key to the neokey board, 

Inside is a 3 port usb hub, a coiled usb extension cable plugs into that through the mic case (so can be unplugged when it's assembled) a usb microphone dongle, and a single key usb board which sends the keybind to SimRail to activate the mic (programmed with 'circuit py' but it's a drag and drop method of loading on code that's already written, like the code i have that sends the relevant keybind that i use for push to talk in SimRail).

Other parts are a spring, 5 x M3 screws and a 50mm tweeter cover that i sprayed grey before gluing into the hole in the front of the mic (then a 3D printed trim ring glues onto that)

And finally the microphone holder... 3D printed too of course :
3DprintedRadmorMic1.thumb.jpg.b00a322137f0963f0ec634b1223ec743.jpg
My mic holder has a bolt on horizontal arm that fixes to the back of one of my tablet mounts, but a desktop mount could be made, wall mount, or one that would fix to the back of a monitor with double sided tape. 

To use it in SimRail i just had to set the microphone used to be the plug n play dongle rather than the laptops main mic, and that's it, the neokey trinkey sends the keybind i set for push to talk in SimRail, and i have `the red led of the trinkey board light up when i have pressed the PTT button (can be seen through the mic grill) 

 

If anyone was interested in 3D printing themselves a Radmor style microphone (or any other things i 3D printed here), i can upload the .stl files to thingyverse, and make a materials list of all the parts i used. 

Edited by Gazz292
  • Like 5
Link to comment
Share on other sites

And finally (for now) ... my EU07 inspired button box:

ButtonBoxTop.thumb.jpg.1cce86c7af1e73438dcd7d9d0a2eb09b.jpg

Side view showing the toggle switch covers off better:
ButtonBoxSide.thumb.jpg.aeb3379f787c7c6118dd8915e7d9fd4b.jpg

This is a 3D printed box, 3D printed switch covers in the style of those used in the train, a 3D printed cab activation key, battery switch surround and switch cover, and some 16mm (22mm head) anodized alloy mushroom buttons, and some 19mm flat top push buttons (to which i applied a circle of label tape in red and green.

All wired to an STM32F 'blue pill' board which is running FreeJoy, this sends joystick button presses to the computer, where i use JoyToKey to convert them to keybinds / key presses that SimRail can work with.

Below is the inside of the box showing my messy wiring between the switches and the blue pill board:
ButtonBoxWiring.thumb.jpg.888b00baf76fbb5d0b56f4a13aa178f1.jpg

The toggle switches are the paddle type that look like this 
buttonboxtoggleswitch.jpg.eda7b1cac57d4c9d8ed4556e5cbf7fee.jpg
As the 3D printed switch covers are thinner than the paddle width (i first made them full width, but it didn't look right), i shaved down the edges until there was about a 4mm wide stub left, and over this i glued on my 3D printed EU07 style switch covers: 
toggleswitchcover.jpg.ed136fd0ee7c8bddd74421b1317f4cf4.jpg

The cab activation key is a 4 position 90 degree rotary switch, locked to 2 positions with the tang washer they come with, then a 3D printed surround and key that pushes on the D shaft, 
The battery switch is just a 3D printed switch cover and surround to make it look a little like the battery switch in the loco. 

As i am limited to how wide i could make this switch box i had to make it taller than wide to get on all the buttons i wanted, of course only half the switches and buttons work, this is because SimRail has limited keybinds,  i'll have to beg the devs to enable more keybinds, like the traction motor overload reset, wheel slip button etc. 

 

The FreeJoy screen showing how i set my toggle switches up: 
freejoyscreen.thumb.jpg.257306d5dc4cbb7f6b67b6b5b2aafde6.jpg

FreeJoy is rather good in that it allows me to use a single 'signal' wire from each toggle switch, then i use the 'toggle switch ON/OFF' function and a timer, and this sends a button push command for 200 milliseconds each time the switch changes position,  JoyToKey then changes this button pulse into a keypress, and SimRail thinks i am pressing say the K key on the keyboard that i have set to turn the cab light on and off. 

I have about 10 spare inputs on the blue pill / freejoy, so a switch that has 2 states can easily be added (and more switches added with a simple latch register board, as freejoy can handle over 100 button input and outputs, plus 8 axis, and rotary encoders etc.

 

__________________________________

Driving my favourite loco in SimRail is even more awesome now that i have these controls to operate it with, one day i hope to make a full sized cab replica.... or at least a semi universal train driving cab for driving the wheel type power controller trains (i have the real driving desk from a German BR111 train in storage, when i get the space i will get that set up to control the lever type loco's (traxx, pendulio, elf etc) 

My next project for now tho is to try and find someone good at writing windows programs who can help me use a force feedback steering wheel as used for road driving games, and make that operate like the EU07's power wheel, so you'd rotate it and it would click between virtual notches, and increase or decrease the power in the loco, 
Then i'd make a 3D printed brake handle that i can put on the wheels shaft in place of the steering wheel, and have a brake lever using a second cheap force feedback wheel, and a different 'indent and friction' map to match the brake lever in the trains.

Me asking for help with programming for that project is here : 

 

Edited by Gazz292
  • Like 12
  • Thanks 1
Link to comment
Share on other sites

5 hours ago, Howky said:

Isn't it better to use aurdino?

what for? 

If it's for where i used an STM32F bluepill, i'd say no way, when i bought them they were £2 each (they are £5 each now) they have more inputs than most arduino's (especially for their size) much faster processor, and it's 32 bit Vs 8 bit, way way more memory, seen as a HID device easily (only a few arduino's can do that without flashing custom firmware on them) 

But they can be programmed as an arduino if you want (STMduino) 

But for the joystick / button box thing, it would take a hell of a lot of arduino code to get the functionality of FreeJoy, which once loaded onto the board uses a GUI to program it, much better than changing lines of code to set up all the inputs how you want... especially with debouncing, press timers and changing state switches to give a pulsed output etc.

 

Now for where i used the 2 button keyboard, or the macro pad, then the small arduino pro micro's may have been better, 
But not for the microphones PTT key board, that is a single button board that plugs directly into a usb port, and was ideal for where i used it, plugged in the hub so the mic's PTT key presses against the button.

But again, with arduino's it's programming them, and having to change lines of code each time you want to change an inputs assignment gets old fast, much better to start the GUI programming software, press the button you want to change, then 2 or 3 mouse clicks and it's changed and working. 


IF it's for the force feedback wheel as a train power wheel controller idea, then yes an arduino would likely have it working pretty fast, but that then means for anyone else to do the same they need to rip the main board out of their FFB wheel that they likely want to still use for driving games, 

So the idea of a windows program that takes control of the wheel, sending it a fake / test FFB signal that makes it act like a notched power wheel is a way to allow almost anyone to drive the EU07 type trains with a wheel. 

Link to comment
Share on other sites

  • 5 months later...

The past few months i've mostly been enjoying SimRail... plus getting back into my Omsi bus driving cab build ...

image.thumb.png.8a22781b7dcae963bd5be0fd626ef339.png

I began to get the bits together for the force feedback steering system i'm building for my bus driving rig, i'll be using 'EMC-FFB' software, and it's firmware that i loaded onto a STM32F black pill board,  a 4000 pulse per rotation optical encoder will sense the wheels position, a 150 watt E-scooter motor will provide the force feedback (add in a couple of big H-bridges and a 24 volt 30 amp power supply, i then just need to make the mechanicals to connect the motor and encoder to the bus steering shaft.

But that's in my shed, and winter is here and it's far too cold to be in there... so i'm waiting on having a wall taken down in the house so i can have a nice warm simulator room.

So i had a play with the encoder at my laptop, just to prove that part of the system works, it does... i have a full 6 and a half turns lock to lock (or about 2360 degrees)  so i will have 1:1 steering in the sim, miles better than using the consumer FFB wheels that max out at 900 or 1024 degrees (half the number of turns a bus has) 

Here's a video of my 'proof of concept' with a quickly 3D printed wheel, showing the 6.5 turns, even tho the wheel in Omsi goes out of sync a little.. that's something in Omsi doing that, the wheel slows down towards the end then the last half turn speeds up.. weird:

I also had a play with a different way to get the dashboard data out of Omsi using BusBoardInterface2, and managed to get a few things working that weren't possible using Komsi :

image.thumb.png.f935bf26e316120a7b91d1e6b99d68ec.png

Anyway, enough about the bus sim, this is the SimRail forum... 

Whilst i had the encoder mounted on my laptop desk i decided to try and use it to control the EU07 in SimRail, i tried 'Joystick Gremlin' to read the encoder rotation and send button pulses every few degrees, which JoytoKey made into the up and down keyboard presses to control SimRail.

That kind of worked, but with no notches it was very hard to control the train, so i 3D printed a mini EU07 style wheel and a notch wheel, and thinking ahead i made the 'twanger' that the notch wheel flicks as the wheel is rotated hit microswitches, so turning the wheel one way hits the up microswitch, turning it the other way the down microswitch is hit, all the time giving nice heavy notches to push the wheel past to move it.

image.thumb.png.85a7692b8b79b8ba72e65637ccf133e8.png

 

The Fusion360 render below is showing how it works a little better, the yellow 'twanger' has a pair of springs going from the end hole to the holes in the plate, and the microswitches are not shown in the render either, but you can see them in the photo above... this is just one way to get notches,
(i have a better more compact method that i'll show in the next post... but it doesn't hit the microswitches, so instead i use a potentiometer to read the position, then an arduino to read the position and send keyboard commands as the controller moved from notch to notch... that is going to take a lot of messing in the code for the 43 notches, but it can be done.)

image.thumb.png.70f276f7dfc2493f0d6a32121a69a1c8.png

The microswitch method actually worked pretty well so i gave up on using the encoder (i might try again reading it with an arduino some time) 
But for now i was using a STM32F blue pill board loaded with FreeJoy to read the microswitches, i've mentioned these before as i use them in my button boxes and i highly rate them...
Especially as the cost is about £5 for the STM32F board, plus £3 or so for the programmer (one time purchase, you use it again on other boards)
And the FreeJoy software is as it's name hints at... free).

I did get a bit of contact bounce if i rotated the wheel too fast, but when i tried again with an arduino and using interrupts to read the switches, i was able to spin the wheel far faster than i would normally and the wheel in SimRail moved perfectly in sync with it.....

That is until the November 2023 update, i think the new animations on the controls are messing with inputs, as now if i rotate the wheel faster than about 3 to 5 notches a second the wheel in SimRail stops moving 😞 
I get this with my macropad's encoders too, so i can only hope that something can be changed to allow faster inputs again, or i'll be stuck waiting for the joystick axis input to be introduced to the sim (which i really thought was happening with this update, but apparently it was a miscommunication and it was gamepad support we got in this update......

....erm, ok....

...thanks....

.....i guess. 🤨

I really am not a fan of gamepads for train simulators, leave them for the shooting games where they belong, there are just too many buttons, switches and levers to operate in the good train sim to make a gamepad of any use i think... but others think differently, and some think me messing about making controllers is madness when the keyboard and mouse can do it all,  but i do like immersion, and having to drag a lever or push a button with a mouse breaks immersion for me. 

 

Right, i've got a 3D print that's finished, so i need to go and get it and start another, next post i'll show one of the mini controllers i am building right now for the EN57.

  • Like 7
  • Thanks 2
  • I agree 1
Link to comment
Share on other sites

10 godzin temu, Gazz292 napisał(a):

That is until the November 2023 update, i think the new animations on the controls are messing with inputs, as now if i rotate the wheel faster than about 3 to 5 notches a second the wheel in SimRail stops moving 😞 

I get the same with my controller. Can't spin too fast as it doesn't read intervals.

 

Link to comment
Share on other sites

I have found and am awaiting shipment of an optical encoder, very precise. It has 50 pulses per revolution, so ideally under EU07 where we have 43 positions. Well synchronised gears and it should be perfect. On the final settings, give micro shooters to reset or maximise the settings, just in case the wheel jumps.

Myself I think the problem is the response time of the switch and the game and it loses positions.

 

I also did a test on micro shooters for each setting position (plus/minus) and it works perfectly, but fitting 86+2 micro shooters is a bit excessive 🤣.

 

LEGO and technics based tests for now, for proyotyping.

 

 

 

 

  • Like 2
  • Haha 1
Link to comment
Share on other sites

  • 2 weeks later...

For the past few weeks my 3D printer has been going almost non stop.
If anyone's interested, it's a Prusa i3 MK3s, all stock except for a revo 6 quick change nozzle hotend and a raspberry Pi 3 running OctoPrint,

image.thumb.png.9944b37f2b83613e7f9ba5df7aba8f5a.png
The revo 6 nozzle allows me to change nozzle sizes in seconds without tools (or risks of leaks) and i regularly swap between the 0.25mm one for detail to the 0.8mm one when i want a quick 'prototype' of a basic shape, tho the 0.4mm one lives in it most of the time. ... OctoPrint allows me to send the printer it's G-code files to print remotely, so i only have to go to the printer when it's finished printing (as long as the correct colour filament is already loaded) 
This is very handy as it's a long walk from my bedroom to where the printer lives at the other end of the house.
I built the printer from the kit version about 4 years ago, it just... works,  i can count on my hands the number of failed prints i've had over the 4 years, and they were all my fault... forgetting a brim on tall thin objects.

Anyway, back to the controllers,
It's no secret that i love the EU07 loco, but i am also falling for the EN57, so i decided to make some 'mini' controllers to drive that cute little EMU at my laptop desk, then carry on with the EU07 style power wheel... tho when i have a simulator room i may concentrate on making full sized controls.

If anyone knows the exact size of something in the EN57's cab, say the diameter of the brake handle's ball, let me know as i'd like to work out what 'scale' my EN57 controllers are, i sized them to fit comfortably in my large hands, i call them mini controllers but compared to a raildriver, they are quite large.
And here are my controllers sat next to a raildriver for a size comparison. 

image.thumb.png.2a6b7026795f7a0694562e7a53eed796.png

 

 

Below is a photo of my laptops overbed table today (12/12/23) it is a different table to the one in my first post, this one is a proper hospital overbed table that i fitted an extended top to, giving a total of 1 meter width by 400mm deep, plus i added a 'mouse/tracker ball' platform around the main 'leg' of the table (i had to change my bed from a divan to a wooden post style so the hospital table would fit... <i spend a lot of time 'stuck in bed' due to medical issues i have, hence why i have my laptop and controllers on an overbed table>

EN57Controls.thumb.jpg.057e2664b51383e46b5afa15c2a007f3.jpg

The EU07 button box is just sitting on the table top for now, i will re-print that sometime to take advantage of the extra width i have now, the EU07 style horn lever is the item in the lower right with the red ball, and the 'Radmor' style microphone is still the same one from before, still mounted to it's holder attached to the back of the small tablet mount.

I got a 6 button 1 knob 'macropad' off amazon to use as a temporary radio controller, seen wedged between the left hand side of the laptop and the EU07 button box above:

image.png.842c87233f8bfd92bc40c7b8c0036369.png

I had to set up a button for 'radio on' and 'radio off' as you can't bind the same key for radio on and off, when i make a 3D printed Radmor radio, it will have the proper latching power button that will be able to send the on and off keys when pressed, and i will use a 10 position rotary switch with different resistors for each position, then an arduino will read the analogue signal and send the correct channel number for the position it's in.

This can be done thanks to the individual channel numbers we can now set keybinds to in SimRail,  ATM my rotary encoder has no way of knowing which channel it's on, so i rotate it all the way left until the channel switch in the sim stops rotating, then count clicks to the right to change channel when needed (i.e. count 5 clicks to be on channel 5 etc)

 

You probably noticed in the photo of my laptop desk that the controllers are mounted on the front of the desk, they slide into 3D printed dovetail mounts so i can quickly add or remove them, change their positions (i do that with the brake lever usually)
And as i make more controllers for different trains, i will swap out the correct controllers before i take over a train in SimRail: 

image.thumb.png.5b0f8c598a3f50ff65c37ba0a190f2c3.png

My power lever and reverser: 

image.thumb.png.bdf7d69d7d0e74397bdd18cba70a2fe3.png

All the lever controllers have quite a few separate parts that fit together, i don't have a multi colour setup for 3D printing, so things like the reverser's top plate and the power levers plate are simple manual colour changes (printed with the 0.25mm nozzle for detail) 
The power handle was printed standing upright, with a colour change where the (M12) threaded part starts, and all threads are 3D printed, down to M3 x 0.5 threads for the screws to hold everything together.

 

Below is a screenshot of Fusion 360 (hobbyists free edition) showing the insides of the power and reverser lever box:

image.thumb.png.9824571345bb6e63f29e9c3e2a502383.png

The levers rotate on 2 x (15 x 21 x 4) bearings housed in the 9mm thick top panel, the yellow disc is the 'notch wheel' which allows the levers  'click' between the notches (7 for power, 5 for reverser)
The red long 'twangers' have a screw anchoring them at the far end, but loose enough so they are free to rotate, and a spring goes from the front threaded hole in the 'twangers' to one of the 3 sets of threaded holes to the left of the twangers (so i can vary the notch force)
You'll likely notice the reverser's twanger is all plastic (i grease the notch plate and twangers pivot) that's fine as that lever does not get moved that much, but the power lever twanger has bearings where it rides against the notch plate, those bearings are 4mm OD, 1.5mm ID and 1.5mm tall.. a pair is stacked in the power levers twanger. 

Finally the rotation of the lever moves the 43 tooth (module 1) gear, which rotates the 19 tooth gear, and that rotates the shaft of a 5K potentiometer. 

An arduino beetle* then reads the potentiometers positions, and when it detects the lever has been moved enough to have moved from one notch to another, it sends the relevant keyboard key to SimRail to move the lever in the sim up or down a notch, or as many notches as the levers moved,
i've found that a 70 millisecond delay between sending keypresses allows the lever in the sim to keep up with fast movements, and at each end of the travel, i.e. in the last notch, the arduino sends 3 keypress events, this ensures any missed movements is taken care of,
And if i take over a train and the reverser is in 'forwards 1' but my reverser is in 'forwards 2'   when i move my lever back one notch it will move the trains lever to position 0, but i then move my lever back to forwards 2, and thanks to the 3 keypresses it then sends, the trains lever moves all the way to the end notch too. 

* The Arduino beetle is a mini Arduino Leonardo with only a few inputs... i only needed 2 x analogue inputs for this controller,
But you need a Leonardo or pro micro type arduino with an ATmega32U4 processor to send HID keyboard keys *

So there isn't a massive wall of text, i'll post about the brake lever and door switch panel in the next post.

Edited by Gazz292
Added raildriver comparison photo
  • Like 13
  • Thanks 1
Link to comment
Share on other sites

So... i can make the EN57 go,  i'd better have a way to stop it... this should do the job. 

image.thumb.png.cee300c1f4d96cbdeac33fd1582101dc.png

I did want to make the brake levers box similar to how it is in the real train, but there's lots of complex angles on that and trying to replicate them would be a nightmare, i struggled for over a day making the simple slight wedge shape on the underside of the brake levers main body, it's that bit which makes the lever stick up at an angle off horizontal,  mostly it was getting all the edges to flow nicely together and go from a block to a round at the tip.  (i wonder if i can get the 3D texture of the brake lever assembly and model off that)


So i simply made the box that houses the working of the brake lever the same basic shape as the power and reverser levers box in the post above for now, this made it easy to have the rear dovetail mounting system incorporated, this is so i can place the brake lever in one of 6 positions on my desk, though in reality i change it between 2 positions, one of them being more a storage position so i don't catch the underside with my hand when i go to use the track ball. 
(The holes in the front lip of my desk are where the 2nd position dovetail mount should be, but i'd borrowed it for the door switch panel whilst i printed another when i took the above photo)

 

I then decided to make a steel lever shaft out of some 14mm EN1a steel bar i had laying about (as you do 🙂 ) i simply turned it down to 10.5mm, the ends to 10mm and cut M10 threads on both ends (i did cheat and used a die rather than single point threading on the lathe)
Then i screwed on a 32mm polyurethane ball i found in the shed to one end, and screwed the bar into the 3D printed threads in the main lever body.

 

image.thumb.png.219766ff456b442f26d72ac5e7ff1107.png

I did this to add a bit more weight to the feel of the lever, i could have re-printed the shaft and ball with 100% infill (i.e. solid) but i found the ball when searching for something else and thought 'why not'

I can remove the lever from the square main rotational shaft (as i presume you can with the real thing), the knurled thumbscrew works to lock it on the square shaft (the knurled thumbscrew is 3D printed with the 0.25mm nozzle, then superglued to a length of M3 stud) 

I made the notch plate for this lever as close as i could to the real thing, after being sent a .pdf of the technical manual for the EN57 which showed each position the lever moves to, Simrail has an extra notch for the emergency brake position that's not there IRL... but i guess that was added as there's a keybind for emergency brakes and the lever needs to move round to it when activated from the keyboard. 

I also made the peg thing on the end of the lever a working part, mines spring loaded, not sure if the real thing is a sliding or pivoting part, but it's used to lock the lever in the 'disabled' position when you shut the cab down (and go and drive from the other cab)

image.thumb.png.3099939aebd8aaf669074e1b55765574.png

 

The Fusion 360 screenshot showing the working of the brake lever:

image.thumb.png.29d758a1c335d6d6b37d3b6f174f98e0.png

Pretty much the same as the power and reverser levers (i've removed the 43 toothed main gear to make things easier to see, it drives a 26 tooth gear on the potentiometer this time, as the lever needs to move a bit more than the power or reverser levers did)

The yellow disc is the notch plate, it's pattern hopefully allows lever to move the same distance as the real thing between notches, 
Again the red long thing is the 'twanger' as i call it, same pair of stacked 4mm OD bearings that give a smooth movement between notches (and less wear)
i've drawn a crude spring to show where the tension spring mounts and pulls the twanger's bearing against the profile of the notch wheel.

 

Again i used an arduino beetle board for the 'brains' of this controller, this time it's just a single analogue input pin being used, i could have had one arduino shared between all the levers and switches, but i wanted to make the levers self contained, and have an easy way to plug and unplug them using the USB connectors.

Screenshot from fusion showing where the arduino lives, i use a right angle usb micro cable to plug into he controllers, 
The blue highlighted bit is the male dovetail mount, which allows these controllers to simply slide onto the matching female dovetail mounts on the desk.

image.thumb.png.cbba9814f26932b48428d747e02098b0.png

 

Edited by Gazz292
  • Like 6
  • Thanks 1
Link to comment
Share on other sites

'Mind the doors please'... or should that be ''Uwaga na drzwi, proszę''

My EN57 door switch and SHP / Czuwak panel:

image.thumb.png.a743efb2488f63d574671c13000b3567.png

The red doors open lights do not read any data from the sim, they are simply turned on or off when the relevant door side open switch is on.

The toggle switches are the same ones used in my EU07 button box with the same 3D printed lever extensions,
i can't seem to find a spring return / momentary version of the particular 'paddle switch' i'm using (which i chose partly due to the 2 screw mounting method) so i cut down a small compression spring and wedged it under one side of the switches lever, amazingly this works and the middle 'doors closing buzzer' switch springs back to off when released as it should,
However that switch has less travel than the other 2 switches due to the spring when fully compressed stopping full travel, but i can live with that for now.

The doors open lights are illuminated square push buttons with a 3D printed 'surround cap' to try and make them look a little like the real panel lights used in the trains (i can't seem to find the style of curved top, honeycomb diffuser pattern panel lights in the UK)

As the 'doors open' lights are buttons, i am using them to change camera views.

The SHP/Czuwak button is a 30mm diameter red anodized metal mushroom button, i really should use a plastic mushroom button, but finding one this size is hard, especially one that does not have a really tall switch mech that would not fit inside the box. 

 

The fusion 360 screenshot showing the insides of the door switch and SHP button panel, they should be separate boxes IRL, but i made them joined together with a 'wiring tunnel' to make it one item, easier to fit onto the double dovetail mount. 

I haven't modelled the toggle switches themselves here, so you can see how the 3D printed white switch extensions fit over the toggle switches paddles (i do need to trim them down so the upright bit of the paddle can fit up the switch extensions, as they'd be too wide and not look right otherwise, the switch extensions get glued onto the switch paddles, so no one ever sees the trimmed down bits. 

image.thumb.png.bd8c97dbed5889f8cd210b3ca882912d.png

I'm using an arduino Pro-Micro in this controller, with 6 inputs and 2 outputs in use... i connected the door open led's to the arduino rather than simply connecting them to the switches, this is so that when we get the input/output system in SimRail i can easily make the door open lights light up with the ones in the sim with a code change on the arduino. 


The code for this controller looks for switch state changes and sends the relevant keyboard keys when a switch is operated, so when the left door switch is moved from off to on, the key for 'open left doors' is sent once, then the left 'door open' led is turned on, 
When the switch is moved back to off, the key for 'close doors' is sent once and the led turned off

(as there is only a keybind for 'close all doors' if i open both sides doors with my 2 switches, when i move one sides door switch to closed both sides doors close in the sim, and both switches in the sim move back to the off position and the lights go out... meanwhile one of my switches is still in the open position and the light on until i move it to off, not the end of the world, separate keybinds for 'close left doors' and 'close right doors' would solve this, keeping the 'close both sides doors' keybind as i believe the modern trains have a single doors close button)

The doors closing buzzer switch sends the keyboard key all the time it's held on, same with the SHP / Czuwak button. 

When i press the right hand square red button (which is also the right doors open light) it sends the keyboard key '4' so the camera view changes to 'look back along the train', if i press that button again it cycles to the next external camera... i use that button a lot as i like to check the doors are clear before closing them or moving off.

If i press the left square red button it sends a '5', that switches to the last camera looking forwards along the train, but more often i use it to cycle the cameras backwards after switching to the 'look back along the train' view.

Then if i press the left button followed by the right button (within 300 milliseconds) it sends a '1' key, which sets the camera to cab view, and if i press the left first then the right button within the time limit, it sends '6', end of train camera, which i use to check the whole train i in the platform sometimes. 

 

I am really bad at coding / programming, so i get help with arduino code from an Arduino forum, if you search on google for 'arduino SimRail' the first hit should be for my posts about the code for these controllers including the sketchs that i have loaded to the arduino's in these controllers.

Edited by Gazz292
Added internal view
  • Like 5
  • Thanks 2
Link to comment
Share on other sites

4 hours ago, noirceur said:

^ Basically anyone who will start selling anything similar to german standardized dashboard (now used almost everywhere in europe in new loks) will make a fortune.

Something like my 'Euro-Rail-Driver' that i was making a couple of years ago?.... (Excuse all the dust and debris on it, it's been sat under my 3D printing table for the past year+)

image.thumb.png.664bbb6d262d9c94475aab830e5c2d9e.png

I was making this back when i was playing tsw, i got the levers to work with a hack of their raildriver input (which was absolutely awful to use, extremely low resolution, especially when you had to split the combined throttle and brake channel in half for most euro trains, giving even less resolution for separate throttle and brake levers)

One of the main features i'd built in was easily swappable 'notch plates'  so the levers could be changed from an EMU style combined power and brake lever where 0 is in the middle, to individual power and brake levers where 0 is at the end of travel, the AFB lever could have the number of notches changed depending on the loco's v-max etc.

image.thumb.png.3a1d27bdcc8160d510fe4a628f642b9e.png

The air and dynamic brake levers are coupled so move together, but pressing down on the dynamic brake lever's knob uncoupled them so you can slow down gently using just the dynamic brake, and the levers auto re-couple when both are in the same place again... it should be a twist of the knob to uncouple the levers, but i was making this at about 68% scale and the mechanism for that got too complex... this controller was sized to be portable and a comfortable size for adult hands to operate. 

Here's the obligatory Fusion 360 render, the controller's base was shaped to fit over my 16 inch laptop's keyboard. 
The list on the left hand side is showing mostly the 3D printed components for just one of the 5 levers, there were a lot of parts that all have to fit together to make this thing. 

image.thumb.png.54dafe543b59982b09de3b2fc308fded.png

The main box was laser cut 3mm plastic sheet (using my hackspace's laser cutter) The levers and switches are 3D printed, every switch mechanism is 3D printed and mimics the real ones as best as i could, even the push buttons for EMU door controls are 3D printed (the button in clear filament so they could be illuminated)
I even had the reverser lever removable, and when it's inserted or removed a magnet triggers a hall sensor, sending the signal that told the tsw game that the reverser lever was inserted (one feature SimRail doesn't have... yet?) 

 

Below is the 'guts' of the beast, it needed to open easily to change the notch wheels... if i were to make this again i'd try and make force feedback levers, a high resolution encoder would track the levers movement, and a small motor would provide back force to mimic the notches as you move the lever.

But as usual with me, i have these ideas and can do the mechanical stuff, but writing the code is where i struggle, hence why i went for simple 3D printed changeable notch wheels. 

image.thumb.png.125119abb45a903f8e8e782a6ab2e816.png

I was building this back when i was playing tsw2, so it was using a hack someone had made for an arduino to mimic a raildriver signal, and due to the way in tsw2 it felt like no 2 loco's shared the same lever or button assignments for the raildriver, i had to have a way to change which lever did what on the fly as i changed trains in the game. 

I did this using a small Oled screen and a set of 4 Binary Coded Rotary Switches:

image.thumb.png.975e0823ee29e340915e872cbdf5fc75.png

i'd enter the trains number using the buttons on each switch to increment the numbers up or down until it displayed the train type number... ie.. 112.1 for the BR112 loco, then press the round button, this reset the arduino, which as it re-started read the binary code and displayed a graphic of the train i'd selected (the weird diagonal bands on the screen are only visible to a camera, the shutter speed does not match the screens refresh rate, so you are seeing the screen part way through refreshing here)

If the number was for a valid train the arduino code was then to go on and set up which lever's potentiometers and switches performed which action for the serial stream sent out to the game, this was to trick tsw into thinking it was a 'real' raildriver connected to it (with all the limitations of a real raildriver like ultra low resolution, buttons controlling useless things rather than switches and buttons that were used to actually drive the train, having trains of the same type not share common controls (tho that was a tsw issue in the way the programmed the train controls so 2 identical train types had different controls depending on which DLC you drove them on)

But i never got to programming the arduino to operate the controls fully... I was building this with the expectation that tsw would enable joystick support so everything could work properly, after all this was something they'd been saying they'd be introducing since 2018.
But i lost interest when it was said that they pretty much weren't going to bother with joystick support anymore, something about market research said most players were happy using the keyboard, and more liked using a console gamepad. 

Then they said they were stopping DLC work for a few months to concentrate on fixing core game engine issues... but it turned out that they were really working on tws3, where for about £50 you get to buy the same game again 🤬 

 

And that was where this little project died ☠️

 

When we get the German route in SimRail i may resurrect it ... if by then there is a joystick input system working in SimRail that is.
This time i'll be waiting for the much needed analogue inputs before i make another floor ornament 😜

Edited by Gazz292
  • Like 7
Link to comment
Share on other sites

@Gazz292

 

I am in shock. Quite a portfolio you've got, hence such experience in building various pieces. Mega well thought out constructions, respect!

As for the static part of the text, I sense scepticism from you, but I'm not surprised. It just shows the SimRail team how much they can change the sim market and attract a lot of railway enthusiasts to their site, what they love the deeper immersion in a simulator and get fun out of it.

I understand and I'm keeping my fingers crossed that what we're waiting for, with the construction of the cockpits, will come to fruition.

 

  • Like 1
  • I agree 2
Link to comment
Share on other sites

I am really impressed @Gazz292, excellent and professional work from Your side. I am rally shocked how realistic it looks like. For sure my approach of the desktop is not event comparable with Yours due to my amateur approach. I am looking forward to a video of usage of the desktop (of course when Simrail team finally provide proper I/O support for external controllers)...

  • Like 1
  • I agree 1
Link to comment
Share on other sites

i really am looking forwards to the day SimRail releases the home cockpit input/output system,   

I have this lot in storage to connect to a computer at some point: 

image.thumb.png.feaea0c5b389b564daa8b922e4a905cb.png

The driving desk from a BR111 Whittenberger steuerwagen, plus the drivers seat, the MFA panel, brake gauges panel etc... i do have an EBuLa unit, but it got damaged and the front glass smashed, but i think i will be using a set of touchscreens to replicate the MFA panel, gauges and EBuLa, then they can change for the different loco's (once we get the German routes and trains in SimRail)

  • Like 1
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

Terms of Use Privacy Policy