Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: $2 USB Optical rotary upgrade for most joysticks  (Read 14334 times)

0 Members and 1 Guest are viewing this topic.

Le Chuck

  • Saint, make a poll!
  • Wiki Contributor
  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5509
  • Last login:March 26, 2024, 08:00:17 pm
  • <insert personal text here>
Re: $2 USB Optical rotary upgrade for most joysticks
« Reply #40 on: September 12, 2012, 04:26:29 pm »
You wait until the part won't float or sink.  I'd say closer to 25% set.  As soon as possible.  Just with some of the cheaper resins, even tho they say they're self bonding, I still notice a faint join line.  The big pain in the ass is polishing off the sprue and mould seams at the end.  I used to have a good three part mold to do embeds but it is too small for this application.  I also don't know which resin would have the durability the trackball would need.  Most of the resins look great but won't stand up very long to that kind of use. 

griffindodd

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1514
  • Last login:June 29, 2023, 02:43:19 pm
  • Builds Stuff
Re: $2 USB Optical rotary upgrade for most joysticks
« Reply #41 on: September 12, 2012, 04:46:48 pm »
Ordered some resin and some ping pong balls, should be here in 2 days (I love Amazon Prime) the rotary encoders are already en-route, so first of all I have to figure out how to wire them
Outputs on the encoder...

Datasheet here

quote from a post on the sparkfun web site...

Quote
The datasheet doesn’t say which pin goes to what, so here you go: The side with 3 pins is the rotary encoder output – central pin looks to be common. The easiest way to use this with an arduino is to connect common to ground, and then use the Arduino inputs in pull-up mode.

The LEDs and central button are interfaced using the side with 5 pins. With the shaft facing away from you, looking at the bottom of the device, with the 5-pin side on the top and 3-pin side on the bottom, the pins are: Common (+5v), Blue, Button, Green, Red. Pressing the shaft button shorts the +5v common and the center pin. There are no internal resistors, so be sure to use one on each of the 3 LED pins. Use a 120ohm (or higher) resistor on the red, and a 68ohm (or higher) resistor on the other two, if you’re using 5v.

Looks like a will need a U-HID nano or A-PAC

- U-HID Analog  ---------------------------- Pin B   
- U-HID +5V     ---------------------------- Pin A
- U-HID -5V   ---------------------------- Pin C

On Pac64
- +5V   ---------------------------- Pin 5
- BLUE   ---------------------------- Pin 4
- GREEN   ---------------------------- Pin 2
- RED   ---------------------------- Pin 1

On iPac (If you want to use the button)
- Button   ---------------------------- Pin 3

Pressing the button shorts pin 3 to pin 5
« Last Edit: September 12, 2012, 05:55:44 pm by griffindodd »
I drink and I know things.

pinballjim

  • Guest
  • Trade Count: (0)
Re: $2 USB Optical rotary upgrade for most joysticks
« Reply #42 on: September 12, 2012, 05:24:42 pm »
All I know is I want a Dia de los Muertos trackball.   :P  I can buy the ceramic skulls for a couple of bucks each and they're just about the perfect size.

Gray_Area

  • -Banned-
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3363
  • Last login:June 23, 2013, 06:52:30 pm
  • -Banned-
Re: $2 USB Optical rotary upgrade for most joysticks
« Reply #43 on: September 12, 2012, 05:59:38 pm »
Here I was about to object and you covered it in the last ten seconds.


Brilliant.

Yah, I was waiting for that part, too, although then I noticed I had overlooked the obvious.


The embedded idea is cool, though not everybody is going to want to replace their shafts.

The miniaturation happening is making this look better and better.
« Last Edit: September 12, 2012, 06:01:48 pm by Gray_Area »
-Banned-

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:Yesterday at 09:47:02 pm
  • ...
Re: $2 USB Optical rotary upgrade for most joysticks
« Reply #44 on: September 12, 2012, 06:25:53 pm »
A-Pac is for potentiometer based controls.

A U-hid or U-hid nano can be configured to work.
An Opti-Pac or Opti-Wiz(groovygamegear) are made specifically for optical encoders.

An old roller ball mouse hack is the other option.
Not sure if the low resolution of this encoder would be an issue.
« Last Edit: September 12, 2012, 10:27:36 pm by BadMouth »

griffindodd

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1514
  • Last login:June 29, 2023, 02:43:19 pm
  • Builds Stuff
Re: $2 USB Optical rotary upgrade for most joysticks
« Reply #45 on: September 12, 2012, 06:29:04 pm »
Thanks for that Badmouth, now I know what I should be looking at.
I drink and I know things.

griffindodd

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1514
  • Last login:June 29, 2023, 02:43:19 pm
  • Builds Stuff
Re: $2 USB Optical rotary upgrade for most joysticks
« Reply #46 on: September 13, 2012, 05:05:31 pm »
After yesterdays banter backward and forward my brain got stewing on this.

I think I have come up with a dirt cheap (Under $4) 12 step rotary switch solution that will mount to any joystick and will not require anything other than a standard button controller that most people are using already anyway.

I didn't like the fact that the rotary encoders I bought from Sparkfun would require me to spend another $35+ on a controller board like the U-HID Nano.

So first I am going to attack this mechanical switch approach for the rotary games like Ikari Warriors and develop a way to be able to engage/disengage the shaft rotation for switched vs optical mode.

Stay tuned on this one.
I drink and I know things.

Gray_Area

  • -Banned-
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3363
  • Last login:June 23, 2013, 06:52:30 pm
  • -Banned-
Re: $2 USB Optical rotary upgrade for most joysticks
« Reply #47 on: September 15, 2012, 03:34:01 pm »
After yesterdays banter backward and forward my brain got stewing on this.

I think I have come up with a dirt cheap (Under $4) 12 step rotary switch solution that will mount to any joystick and will not require anything other than a standard button controller that most people are using already anyway.

I didn't like the fact that the rotary encoders I bought from Sparkfun would require me to spend another $35+ on a controller board like the U-HID Nano.

So first I am going to attack this mechanical switch approach for the rotary games like Ikari Warriors and develop a way to be able to engage/disengage the shaft rotation for switched vs optical mode.

Stay tuned on this one.

Well, Andy and Randy could probably augment the Sparksfun unit as a PNP solution, or make their own. But I'm eager to see your newest epiphany.
-Banned-

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:Yesterday at 09:47:02 pm
  • ...
Re: $2 USB Optical rotary upgrade for most joysticks
« Reply #48 on: September 17, 2012, 08:41:18 pm »
Just did a little testing with one of the little $3 clicky 12-position encoders from sparkfun.

https://www.sparkfun.com/products/9117

The detents aren't as pronounced as I'd hoped and will probably seem even less so after installed since the joystick top will provide more leverage.

I had my doubts at first.  The guy in Ikari Warriors flipped to seemingly random positions, but after playing the hi/lo game with the sensetivity in MAME, I got close enough to the correct setting that it worked properly.  The guy faces whichever direction the encoder is pointing, rotating one position for each detent without getting screwed up.  :)
EDIT: THESE WORK ON IKARI WARRIORS, BUT DON'T EVEN REGISTER FOR MAPPING ON HEAVY BARREL AND VICTORY ROAD, PRESUMEABLY FROM THE LOW RESOLUTION.

Now to fit them to my joysticks and see if they affect the feel while playing other games. 
Not sure when I'll get around to it, since this is one of too many projects and I haven't had any free time in a month.  :'(

I hope this works out well, as it's a fairly cheap solution using all new parts.
$6 for a pair of these and $15 for an Opti-Wiz, plus shipping and a few parts from the hardware store for mounting.
« Last Edit: October 31, 2012, 08:23:04 pm by BadMouth »

griffindodd

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1514
  • Last login:June 29, 2023, 02:43:19 pm
  • Builds Stuff
Re: $2 USB Optical rotary upgrade for most joysticks
« Reply #49 on: September 17, 2012, 10:13:13 pm »
Good stuff.

I just received my parts for my little mechanical experiment so I'm going to see if I can get them working and report back.
I drink and I know things.

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9394
  • Last login:Today at 06:17:45 am
  • Designated spam hunter
Re: $2 USB Optical rotary upgrade for most joysticks
« Reply #50 on: September 17, 2012, 11:31:23 pm »
Here's another of my crazy spitball ideas to throw into the mix.

The concept uses a flat metal semi-circular pivot like those found in the old analog joysticks to position the rotary encoder at the end of the shaft and keep it from twisting out of alignment.

Bottom view -

Haven't worked out the exact "clicker pen" mechanism to engage and disengage the sliding sleeve, or if it would be better to move the encoder to engage with the sleeve and shaft.


Scott

griffindodd

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1514
  • Last login:June 29, 2023, 02:43:19 pm
  • Builds Stuff
Re: $2 USB Optical rotary upgrade for most joysticks
« Reply #51 on: September 18, 2012, 12:13:00 am »
Ok here's where I am up to so far...



- The 12 tooth metal sprocket is attached to the end of the joystick shaft with a locking bolt, the sprocket cost $2.79 from Surplus Center.
- The switch plate (represented by the mini CD) spins freely around the sprocket shaft but it restricted from rotating by slots around poles/screws at the edges.
- The switch is a momentary-off-momentary giving two switch positions, click momentary left and click momentary right, hook these up to your keyboard controller of choice. The switch always flicks back to off when released. $0.50 from BG Micro.

Unfortunately this is as much as I have been able to construct due to my lack of small cutting tools to make a decent slotted switch plate, it's starting to get very frustrating that I can't fabricate some of these more precise pieces that I need to test ideas. But I'm sure you guys can see the concept here. I think I need to invest in a good Dremel and various spinny cutting doo hickeys
« Last Edit: September 18, 2012, 12:14:44 am by griffindodd »
I drink and I know things.

Gray_Area

  • -Banned-
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3363
  • Last login:June 23, 2013, 06:52:30 pm
  • -Banned-
Re: $2 USB Optical rotary upgrade for most joysticks
« Reply #52 on: September 18, 2012, 05:22:02 pm »
Ok here's where I am up to so far...

How is 'return-to-center' of the guy on-screen handled?...or is it a factor?
-Banned-

griffindodd

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1514
  • Last login:June 29, 2023, 02:43:19 pm
  • Builds Stuff
Re: $2 USB Optical rotary upgrade for most joysticks
« Reply #53 on: September 18, 2012, 05:29:18 pm »
I've only tested on Ikari Warriors that doesn't have that game feature, you just psin the handle to point in the direction you want
I drink and I know things.

pinballjim

  • Guest
  • Trade Count: (0)
Re: $2 USB Optical rotary upgrade for most joysticks
« Reply #54 on: September 18, 2012, 05:49:44 pm »
Here's another probably dumb idea... instead of doing this optical stuff, why not have a pin sticking off the bottom of the joystick that rotates the switch used for the mouse scroll wheel?  It'd take some creative mounting but at least you'd get a click sensation.


griffindodd

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1514
  • Last login:June 29, 2023, 02:43:19 pm
  • Builds Stuff
Re: $2 USB Optical rotary upgrade for most joysticks
« Reply #55 on: September 18, 2012, 11:50:01 pm »
Well this 'cheap' mod is getting a bit expensive, but being able to fab my own parts is essential so...

I drink and I know things.

griffindodd

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1514
  • Last login:June 29, 2023, 02:43:19 pm
  • Builds Stuff
Re: $2 USB Optical rotary upgrade for most joysticks
« Reply #56 on: September 19, 2012, 01:01:32 am »
I haven't had time to fab anything tonight as we had friends over for dinner, but I did make this template for the switch support plates. One with a 3/8 diameter hole which should fit over most stick shafts and a second to sandwich around the locking collar of the sprocket I am using. This will sandwich the cog wheel and switches in a nice small protected channel and stop the switches from rotating at all. The slot runs along a mounting bolt off the joystick mounting plate.

Artwork edge size of this image should be printed at 3" x 3" for true scale

« Last Edit: September 19, 2012, 01:03:42 am by griffindodd »
I drink and I know things.

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:Yesterday at 09:47:02 pm
  • ...
Re: $2 USB Optical rotary upgrade for most joysticks
« Reply #57 on: September 19, 2012, 09:37:48 am »
I wandered around Lowes for a bit last night looking for cheap parts to repurpose.
Spent $4 on various pieces to try as a coupler between the encoder and joystick shaft.
Wasn't really happy with any of them.  The closest thing was a nylon spacer that I'd have to drill to accept a set screw.
Ended up ordering a pair of these of fleabay:
http://www.ebay.com/itm/6-35mm-x-6-35-CNC-Motor-Jaw-Shaft-Coupler-6-35mm-x-6-35mm-Flexible-Coupling-0-/251049730539?pt=LH_DefaultDomain_0&hash=item3a73bae1eb
Now I have to wait weeks for them to come in.  :(

I'm still looking for something that could work as a yoke (or whatever you want to call the part that links the encoder to the post on the side of the joystick)


I have some 1/4" ABS that I could cut them out of.  Also considered cutting them out of project circuit board (would make mounting the encoder easy).
But I'd like to find something already slotted that anyone can buy and use without having to do much cutting.  Oh, and it should only cost a couple bucks.  :P
I've seen a paper clip used, but would like to have something more substantial.

Any ideas?

griffindodd

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1514
  • Last login:June 29, 2023, 02:43:19 pm
  • Builds Stuff
Re: $2 USB Optical rotary upgrade for most joysticks
« Reply #58 on: September 19, 2012, 10:31:58 am »
Yeah I'm having the same issue with that part.  Just spent an hour with the dremel screaming away at some rolled steel to make my own.
I drink and I know things.

griffindodd

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1514
  • Last login:June 29, 2023, 02:43:19 pm
  • Builds Stuff
Re: $2 USB Optical rotary upgrade for most joysticks
« Reply #59 on: September 19, 2012, 11:39:13 am »
Did a little this morning before I left for the office.

Made the mounting plates, not too pretty but they are steel so they will be super durable


Here's how they assemble around the sprocket with the microswitches sandwiched inbetween, I've ordered some more suitable switches but they are coming from the moon, or China or somewhere that takes about 3 weeks so I'll have to wait on those before progressing.


This is based on this idea of using two lever arm microswitches in place of the on-off-on momentary switch that gave me concerns about longevity.


One of the advantages of this design is that it could be a completely self contained sealed unit with just the wires to connect and the lock collar to attach to your joystick shaft
« Last Edit: September 19, 2012, 11:45:45 am by griffindodd »
I drink and I know things.

Le Chuck

  • Saint, make a poll!
  • Wiki Contributor
  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5509
  • Last login:March 26, 2024, 08:00:17 pm
  • <insert personal text here>
Re: $2 USB Optical rotary upgrade for most joysticks
« Reply #60 on: September 19, 2012, 11:58:36 am »
^ This is a really simple and quite elegant solution.  The acid test will be in how it plays but there is no reason why if it works that this could not become a very doable mod or even an affordable product.   :applaud: :cheers: :applaud:

Xiaou2

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4098
  • Last login:November 12, 2023, 05:41:19 pm
  • NOM NOM NOM
Re: $2 USB Optical rotary upgrade for most joysticks
« Reply #61 on: September 19, 2012, 12:35:41 pm »
I dont think the leafs on the typical sub-micros are strong enough to take that kind of abuse.  They will bend and wear quickly.

(we had a similar problem on a commercial arcade basketball machine, and that was only one-way -vs- the non-intended 2way setup)

 I think you may instead want something like a roller-bearing style or switch activation.

griffindodd

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1514
  • Last login:June 29, 2023, 02:43:19 pm
  • Builds Stuff
Re: $2 USB Optical rotary upgrade for most joysticks
« Reply #62 on: September 21, 2012, 06:48:08 pm »
Here's a very simple approach to adding analog to a switched joy using one of these...

https://www.sparkfun.com/products/9426

Now this is ultimate lo-tech, put potentially doable

I drink and I know things.

Gray_Area

  • -Banned-
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3363
  • Last login:June 23, 2013, 06:52:30 pm
  • -Banned-
Re: $2 USB Optical rotary upgrade for most joysticks
« Reply #63 on: September 22, 2012, 07:23:38 pm »
By 'return-to-center' I mean when does the game poll for the north facement of the dude? Did you notice it spontaneously jerking one direction or the other?
-Banned-

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:Yesterday at 09:47:02 pm
  • ...
Re: $2 USB Optical rotary upgrade for most joysticks
« Reply #64 on: October 31, 2012, 09:03:18 pm »
Udate on the $3 sparkfun encoders........

Long story short, they work on Ikari Warriors (which I did all my testing with) but for some reason won't even register when mapping controls on Heavy Barrel and Victory road.
Pretty sure it's caused by the super low resolution since I swapped in a 900 line encoder and it registed immediately using the same inputs on the same Opti-Wiz.  It would have been an awesome cheap solution if they'd worked out.

 :angry:

Anyways, here's the setup I came up with for others venturing down this path.
To join the joystick shaft to the encoder, I ordered a set of these 6mm shaft couplers off fleabay:


These were going on Seimitsu LS-56 joysticks which have 6mm (1/4) shafts.
Since the joystick shaft was the same size as the encoder shaft, I decided to cut it down to save height.

Here are my parts:

Optical encoder, post made by hammering aluminum rod into an aluminum base, yoke cut from 1/4" abs plastic, & the coupler.




I made the slot in the yoke 1/4" wide thinking any wiggle room would result in an unwanted dead zone.  This line of thinking was off.
It needs some wiggle room, or at least a thinner yoke, because it will bind when the joystick is at an angle.
This binding combined with the inside of the yoke not being perfectly smooth resulted in a grinding feeling being transmitted through the joystick.
If it weren't for that, I don't think it would have made the joystick feel noticeably different.

The tape on the pins of the encoder is because the motion of the joystick was causing them to make contact with each other.
The stiff wire I was using probably wasn't a good choice either, but this was just a test.
If I were to rebuild this using the same encoder, I'd extend the yoke a bit behind it and notch out a place to zip tie the wires to the yoke.

I was able to play Iraki Warriors and the stick tracks as it should, the guy moving in a 1:1 ratio with the stick.
I didn't like this so much and wanted him to turn faster. 

I was able to get the coupler to fit a Sanwa JLF by widening the hole on one side with a drill press, but the coupler hits the tabs that hold the center piece of the restrictor in place.  Although these couplers can be tightened down, they don't move very much at all, so the sizing has to be extremely accurate.

I'm disappointed.  I really wanted these cheap little encoders to work.


« Last Edit: October 31, 2012, 09:10:22 pm by BadMouth »