Jump to content

EU07 power wheel, slugging when using rotary encoder for input


Gazz292

Recommended Posts

Probably something no one else has noticed, 

I drive trains in SimRail using a macro pad with 3 rotary encoders on it,  so i turn the knob of the 'power wheel' encoder right, it sends the key that i have set for increase power, turn the knob left it sends the key for decrease power (the key is sent for every click of the encoder)

same with the shunt lever and the brake lever's knobs, 

 

Before the update, i could rotate the power wheel knob as fast as i wanted and the wheel in the sim would follow it, i could turn the wheel faster than it rotated using the fast move key combo.

Since the update i can no longer use my rotary encoders, as when i rotate the knobs faster than about 4 clicks per second the power wheel or shunt lever stops responding or lags really badly.

The brake lever seems not to be affected,
Is it something to do with the new animations for the EU07's power wheel and shunt lever?  

 

Using a rotary encoder was a way to give a rotating control feel until we get joystick axis support.. 

Link to comment
Share on other sites

vor 6 Stunden schrieb Gazz292:

I drive trains in SimRail using a macro pad with 3 rotary encoders on it,  so i turn the knob of the 'power wheel' encoder right, it sends the key that i have set for increase power, turn the knob left it sends the key for decrease power (the key is sent for every click of the encoder)

Do you have a picture of your set up?

Link to comment
Share on other sites

7 godzin temu, Gazz292 napisał(a):

Probably something no one else has noticed, 

I drive trains in SimRail using a macro pad with 3 rotary encoders on it,  so i turn the knob of the 'power wheel' encoder right, it sends the key that i have set for increase power, turn the knob left it sends the key for decrease power (the key is sent for every click of the encoder)

same with the shunt lever and the brake lever's knobs, 

Before the update, i could rotate the power wheel knob as fast as i wanted and the wheel in the sim would follow it, i could turn the wheel faster than it rotated using the fast move key combo.

Since the update i can no longer use my rotary encoders, as when i rotate the knobs faster than about 4 clicks per second the power wheel or shunt lever stops responding or lags really badly.

The brake lever seems not to be affected,
Is it something to do with the new animations for the EU07's power wheel and shunt lever?  

Using a rotary encoder was a way to give a rotating control feel until we get joystick axis support.. 


I'm waiting for the electronics and if it goes well at the weekend I'll do tests with the encoders. I have a ^@%^ myself after this update on how to build the ride adjusters and brakes.

Link to comment
Share on other sites

5 hours ago, sf_giants15 said:

Do you have a picture of your set up?

well, the macro pad is this

image.thumb.png.2c917f512f5e8df65ad2ab5e9d286902.png

Set up so that rotating the knobs sends the relevant key stroke as if i was pressing the key on the pc's keyboard (which if i open notepad and rotate the knobs, it prints the letters as fast as i can turn the knobs, just in SimRail after the update it seems pressing keys too fast confuses things and is skips)

That is a bought item, search something like '3 knob, 12 key macropad'  to find sellers of it... it transformed driving the EU07 for me,
But i wouldn't recommend buying one right now, as the knobs / encoders no longer work in SimRail properly. 

 

 

The rest of my controllers are here: 

 

and i have been playing with making a mini notch wheel:

image.thumb.png.fc130794c30382e3e0edde9d664a63c9.png

a spring loaded lever is 'twanged' each time the wheel is moved round a notch, and that presses one of 2 microswitches depending on the direction of rotation, but that is still a work in progress, 

Link to comment
Share on other sites

3 godziny temu, Gazz292 napisał(a):

 

 

 

image.thumb.png.fc130794c30382e3e0edde9d664a63c9.png

a spring loaded lever is 'twanged' each time the wheel is moved round a notch, and that presses one of 2 microswitches depending on the direction of rotation, but that is still a work in progress, 

I think very similarly, only the gear wheel is based on metal, I think I see a 3D print here. Do you lose click when you turn the wheel quickly?

Edited by Conrad
Link to comment
Share on other sites

i like 3D printing for prototyping, the plan is to make a full sized control desk, and that will have metal parts. 

Yes, if i spin the wheel too fast the switches contacts bounce and i lose rotation in the Sim... but this is because i am using microswitches which have way too much mass in the contacts to switch fast, 
Thinking of trying using hall effect sensors and a magnet on the 'twanger' 

The other possibility is to use a rotary encoder, but there is the hassle of matching up the encoders pulses to the notches, can be done in software but i'm more a mechanical guy and coding is not my thing. 

but a rotary encoder and suitable input board would be able to keep track of every single pulse when the wheel is spun way faster than any human ever could,   which is what my marco keyboard encoders can do... in everything except SimRail atm 😄 

  • Thanks 1
Link to comment
Share on other sites

So, today i had a little play,  

i dug out some old 'minimus AVR' boards that i run KADE on,  which gives you a USB A plu with a PCB on it, that you connect switches to the solder pads, then program it in KADE to make it into a keyboard, a game pad, a mouse/trackball/spinner and so on... it only does digital inputs, so no axis. 

it was brought out about 10 years ago for the MAME scene... arcade emulation.

So, i set the KADE programmer up to set 2 of the input pins send the keyboard key for power up and power down.

Programmed the board, connected my mini EU07 wheel to it, which is just 2 microswitches, one is tapped each time i rotate the wheel right, the other tapped when i rotate it left, so it should be just as if i was tapping the keyboard keys. 

 

I opened notepad, and spun the wheel fast to the right,  i got a nice line of letters which i counted... exactly 43,  
i spun the wheel back to zero even faster,  exactly 43 letters that in the sim would move the wheel left. 

I have no problems with contact bounce, skipped inputs or anything,  i always get exactly the number of key inputs i need.

 

Started SimRail in the EU07,  moved my mini wheel to the right,  if i go more than about 3 clicks a second the wheel in the sim stops moving.

It seems to be the new animation that needs time to move the wheel 'smoothly' 
similar to how we can no longer hold down the ZEW buttons on the radio, there's now an animation that releases the button after one beep, even if your still holding the keyboard key down. 

 

i know there are a few people trying to make controllers for SimRail,  and this new animation thing has just messed things up for us big time.  
Personally i preferred the old way, where the controls moved instantly when you operated them, and you could keep the ZEW buttons held down and make it beep 3 or 4 times before releasing.

  • I agree 1
Link to comment
Share on other sites

  • 1 month later...

Just to add to this post with a 'work around' ... in-case anyone else is building controller hardware. 

Short answer... 70 millisecond delay.

Long answer:

i've since made a new set of mini EU07 style driving controls: 

image.thumb.png.314fbfe4687c989531d4cdad6ef324ca.png

I will be re-making the power wheel controller larger, as it's out of proportion to the brake valve, but that means splitting the print and joining it.

I'm using Arduino boards inside these controllers (leonardo based ones as they can send HID keyboard commands), arduino's are harder to program than the Freejoy method (writing lines of C style code v's a few clicks of a GUI)  but the arduino allows you to set it up to do exactly what you want if you can figure out the code needed.

And i discovered that a 70 millisecond delay between each repeated keyboard key sent to the sim allows all commands to be seen by SimRail and not skip any... what i think is happening is it needs about 65 milliseconds for the new control animation to 'play' that moves the wheel different amounts depending on it's position, i.e. from 0 to 1 is the span of 2 steps, same with notch 27 to 28(S) to 29, and 42 to 43(R). 

This also applies to the reverser, notch lever and EN57 control levers, but not the EU07 brake lever, that i have a separate issue (tied to frame rate varying the number of 'key presses' needed to move it)

With the delay between successive keys it does mean the notch wheel in SimRail will be moving for a little while after the 3D printed wheel has finished being rotated, as each notch it moves waits ~70ms before moving the next one, but all keys sent queue up and get executed fine... only issue i have is if i need to press the SHP/Czuwak button just as i've moved the wheel 43 notches... i have to wait for the 43 x 70 milliseconds to finish before the arduino can send the SHP/Czuwak button key. 

 

I know that FreeJoy has i think 4 timers you can play with, so maybe setting one of them to a 70 millisecond delay can do the same, but i haven't tried that as all my controllers now have arduino's in them, 
The encoder knobs on macro pads will still have problems, the chinese programming software does have a delay function, but i can't figure out how to add it to a keyboard key.

  • Like 1
  • Thanks 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