Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Thinking about starting a project...

Status
Not open for further replies.
Little bit confused about what you are asking about this???
I was talking about the embossed scale shown around the base of the lever in the image here:
1629629140577.png
 
does anyone know of a way of creating such a switch???
I think I'd set one of these

1629632446690.png


into the top of a bench or table and cut a disk of MDF and carve a groove into the bottom something like this:
1629632544579.png

You can then mount some microswitches elsewhere under the disk and cut a groove to clear the switch buttons and put a peg into trigger them.
 
I have an old joystick... I wanted to use said joystick on my raspberry pi..

So... I got hold of an Arduino micro ( with 32u4 chip on ) .. I mounted the micro to a piece of stripboard and soldered a 9 pin d socket at the end..

I got them both on fleabay.. less than a fiver! Thing is... The source code is openware so I can now do pretty much what I like.. I could do what you wanted with a "normal" 6 way switch and use software to trick the system..

Now!! The big thing is windows / linux etc.. They expect buttons and analogue switches.. However!! they do allow an awfull amount of buttons on a game controller so buttons arranged in a circle would also do...

Just saying...
Ian...

Are arduinos hard to programme??? I've looked at them but still have no idea what you need to do...

Eric
 
Buk...

If I think you're on about what I think you're on about(!) then the small indent to the extreme right of the picture is the maximum the lever will go...This is the NOTCH UP position...

Eric
1629638682753.png

I thought the long lines would be the detent positions and the short ones the momentary ones; and was confused why there were only two detents when you had described 3.

I now see that the middle(ish) red line is the HOLD; and the left red line must be OFF. And the two green lines immediately either side of HOLD must be the momentary positions and the outer two the UP and DOWN detents?
 
Ian...

Are arduinos hard to programme??? I've looked at them but still have no idea what you need to do...

Eric
Not at all... The Arduino IDE is probably the easiest I've ever used... Most of the nuts and bolts are automatic..
 
View attachment 133296
I thought the long lines would be the detent positions and the short ones the momentary ones; and was confused why there were only two detents when you had described 3.

I now see that the middle(ish) red line is the HOLD; and the left red line must be OFF. And the two green lines immediately either side of HOLD must be the momentary positions and the outer two the UP and DOWN detents?
Buk...

The extreme left red line is OFF (detent), then moving right, RUN DOWN (detent), NOTCH DOWN (sprung returning to HOLD), HOLD (detent), NOTCH UP (sprung returning to HOLD) & RUN UP (detent).

Eric
 
  • Like
Reactions: Buk
Like I said.... Simulation... For the purpose on "near" to the mark.. A simple lever with the clicks in software..

I would like to know the complete procedure of the lever.. It looked like the driver holding it down, did something else.
 
This looks suitable to give around the correct angular movement over six positions; it would be 75' end to end:

You would need to fabricate a suitable detent quadrant and spring roller, but possibly a good starting point? And its cheap!

Align it appropriately and you even have a separate on/off contact.
 
For about the first time this week, the sun has been shining in North East Scotland. :):)

Another hour or two in the mechanical workshop, and I refined the switch mechanism which I modified last night,
and this is how it works:

A small screwdriver is inserted into the hole in the switch shaft to simulate the operating lever:

OFF, selected
Switch Modified 2 Off.JPG


Run Down, selected
Switch Modified 2 Run Down.JPG


Notch Down, selected
Switch Modified 2 Notch Down.JPG


Notch Down, released (The HOLD position).
Switch Modified 2 ND Released.JPG


Notch UP, selected
Switch Modified 2 Notch Up.JPG


Run Up, selected
Switch Modified 2 Run Up.JPG


So, there it is, that is a good as it gets I think, by modifying an off the shelf rotary switch.

Note, there are no switch contacts fitted to the switch mechanism in these pictures.

JimB
 
For about the first time this week, the sun has been shining in North East Scotland. :):)

Another hour or two in the mechanical workshop, and I refined the switch mechanism which I modified last night,
and this is how it works:

A small screwdriver is inserted into the hole in the switch shaft to simulate the operating lever:

OFF, selected
View attachment 133305

Run Down, selected
View attachment 133306

Notch Down, selected
View attachment 133307

Notch Down, released (The HOLD position).
View attachment 133308

Notch UP, selected
View attachment 133309

Run Up, selected
View attachment 133310

So, there it is, that is a good as it gets I think, by modifying an off the shelf rotary switch.

Note, there are no switch contacts fitted to the switch mechanism in these pictures.

JimB
Jim...

You've done an amazing job there so quickly... I'm so jealous!!! I suppose the next stage is how to wire it all up...

I control the game using the keyboard (you can use an xbox controller but I detest this). To apply power you press "A" on the keyboard, to decrease power, you press "D"

For example, from a stand and the controller OFF, you'd press "A" twice (passing through the RUN DOWN & NOTCH DOWN positions) so the controller is now in the HOLD position. You'd then tap "A" so the controller goes into NOTCH UP then goes back to HOLD...

You'd repeat this whilst watching the speedo & ammeters... As speed increases the load on the ammeter drops so then you can then start repeatedly notching up keeping the needles on the ammeter in the top end of the yellow section... At some point you will be able to go to RUN UP without overloading the ammeter...

Once the tap changer has reached it's maximum of 38 steps OR the required speed, the controller can then be moved back to HOLD in readiness to either RUN DOWN or NOTCH DOWN by pressing "D" as required...

How to convert the switch movement to a "keyboard press" using an arduino is well out of my comfort / knowledge zone, and then getting the game to recognise the arduino via USB is this something Ian would know more about???

Eric
 
How to convert the switch movement to a "keyboard press" using an arduino is well out of my comfort / knowledge zone, and then getting the game to recognise the arduino via USB is this something Ian would know more about???

Electrically, the switch is simply a single pole six way switch.
Wiring that switch to the digital inputs of a microcontroller, and having the software in the micro send the appropriate code for the keyboard letter is the next step.

I don't "do" arduino, but I do PIC.
In this instance I suggest that Ian is more likely to arrive quickly at a working solution than I am.

JimB
 
Jim...

I don't know if the game will work with PIC... I know nothing about programming / coding... The commercially available controllers seem to use arduino boards but if you think using PIC as an interface(?), then give it a shot... As long as it works with the game what does it matter???

Eric
 
JimB Sunny!!! I know.. I was in Berwick ( not far from Edinburgh ) last weekend.. Glorious...

ntypeman Jim's Idea can be implemented into the micro... Like I said.. From the Vid you cant really tell what the lever is doing to control the train.

I see him using it like a tilt shift ( same as Audi semi auto gear shift ) then he seems to hold it down when cruising ( or he is resting his hand there.. )
 
I see him using it like a tilt shift ( same as Audi semi auto gear shift ) then he seems to hold it down when cruising ( or he is resting his hand there.. )
Ian...

The driver is just resting his hand there... Some trains incorporate the DSD (Driver Safety Device) / Deadman's handle into the power handle whereby it must be constantly held down whilst in motion otherwise an emergency brake application will be made after 3-4 seconds after it is released but not on these particular locomotives... The Class 86 & 87 (on which this project is based) uses a treadle which must be kept depressed by the drivers feet...

In the later days (the 86's were built in the 1960's & the 87's built in the 70's) the deadman was superseded by the DSD, whereby the driver was still required to keep his feet on the treadle but if the locomotive detected no movement or manipulation of any of the controls after 60 seconds an alarm would sound requiring the driver to release the treadle & replace his feet back on it, thus making sure he was still alert... If this was not done then again, as per the original deadman function it would make an emergency brake application bringing the train to a stand... This brake application cannot be reset until the train has come to a stand...
 
Last edited:
JimB Sunny!!! I know.. I was in Berwick ( not far from Edinburgh ) last weekend.. Glorious...
Only been to Scotland once, for work a couple of years ago - we stayed in the Premier Inn at Dumfermline - and despite it been January the weather was absolutely wonderful. We went to see the Kelpies while we were there, and there was even a topless guy running along side the canal - we did think that was a little over the top :D Here's a picture off my phone - doesn't scream 'January in Scotland' does it? - or perhaps it does Jim?. I'd certainly like to go again, and all been well I plan to take my wife this time! :D

20190128_130446[1].jpg
 
How about a 4 position rotary switch and two momentary buttons

The 4 positions would be
OFF
Run Down
HOLD
Run Up

When the switch is in the HOLD position, then the two buttons implement the Notch up and down functions.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top