Build Your Own Arcade Controls Forum
Main => Main Forum => Topic started by: TheManuel on February 19, 2025, 02:02:40 pm
-
Hello, all.
My cab currently has an old spinner comprised of a 72-tooth wheel, a hard drive spindle, and an optical sensor that I think I got from Oscar controls back in the olden days (2003, maybe).
I want to upgrade it using this incremental rotary encoder (https://www.amazon.com/Signswise-Incremental-Optical-Encoder-Quadrature/dp/B085ZLCYS1/ref=sr_1_38_sspa?crid=1EAXPHBP5JEM8&dib=eyJ2IjoiMSJ9.IHwhxQY1Ly-7cCWpB-4Ar6uCR_F79W2l4W-13jaeDitrrK9jJIEJiukbHMzT47DR-I2b_Y5remf5dlObMsC_Q6upwVfydRItChry4KaoIUTOR-bouzWIobFL54gG-Iclmo-VpMQ0LRr5L7bCWYwgO6MohIe3AlJ0V9j5um1wuGWVzkMd44qeZQpCCq7tgU1i.t_1BxlTkqYpDSjULbjRaPQcF_ZWZzgoUvB3nJUuXIHs&dib_tag=se&keywords=incremental%2Brotary%2Bencoder%2B1200p%2Fr&qid=1739982613&sprefix=incremental%2Brotary%2Bencoder%2B1200p%2Fr%2Caps%2C130&sr=8-38-spons&xpid=AR59vPY5clLf0&sp_csd=d2lkZ2V0TmFtZT1zcF9tdGY&th=1), which will be connected to the spinner terminals of my Ultimarc I-PAC 2. I am a bit confused about the pulse-per-revolution count. The encoder is advertised as 600 P/R, but I have read that this number needs to be multiplied by 4 because both leading and trailing edge of each slot in the wheel is counted, and because it is a 2-phase encoder.
However, I don't know if the product description already considers one or both of these features.
Will MAME see 600x4=2,400 counts per revolution, or 1,200 or 600?
I'd like to know so that I can later make the proper sensitivity adjustments in MAME for each game, and because I'd like to have at least a 1,200 final pulse count to work with.
-
Hello, all.
My cab currently has an old spinner comprised of a 72-tooth wheel, a hard drive spindle, and an optical sensor that I think I got from Oscar controls back in the olden days (2003, maybe).
I want to upgrade it using this incremental rotary encoder (https://www.amazon.com/Signswise-Incremental-Optical-Encoder-Quadrature/dp/B085ZLCYS1/ref=sr_1_38_sspa?crid=1EAXPHBP5JEM8&dib=eyJ2IjoiMSJ9.IHwhxQY1Ly-7cCWpB-4Ar6uCR_F79W2l4W-13jaeDitrrK9jJIEJiukbHMzT47DR-I2b_Y5remf5dlObMsC_Q6upwVfydRItChry4KaoIUTOR-bouzWIobFL54gG-Iclmo-VpMQ0LRr5L7bCWYwgO6MohIe3AlJ0V9j5um1wuGWVzkMd44qeZQpCCq7tgU1i.t_1BxlTkqYpDSjULbjRaPQcF_ZWZzgoUvB3nJUuXIHs&dib_tag=se&keywords=incremental%2Brotary%2Bencoder%2B1200p%2Fr&qid=1739982613&sprefix=incremental%2Brotary%2Bencoder%2B1200p%2Fr%2Caps%2C130&sr=8-38-spons&xpid=AR59vPY5clLf0&sp_csd=d2lkZ2V0TmFtZT1zcF9tdGY&th=1), which will be connected to the spinner terminals of my Ultimarc I-PAC 2. I am a bit confused about the pulse-per-revolution count. The encoder is advertised as 600 P/R, but I have read that this number needs to be multiplied by 4 because both leading and trailing edge of each slot in the wheel is counted, and because it is a 2-phase encoder.
However, I don't know if the product description already considers one or both of these features.
Will MAME see 600x4=2,400 counts per revolution, or 1,200 or 600?
I'd like to know so that I can later make the proper sensitivity adjustments in MAME for each game, and because I'd like to have at least a 1,200 final pulse count to work with.
Ran a quick test comparing a TT2 (1200 transitions per revolution) on the X-axis to a 600 P/R encoder similar to yours on the Y-axis using StefanBurger's illuminated spinner firmware on an Arduino Pro Micro.
In Windows, the cursor movement appeared to be 1:1.
In MAME Cameltry with the dipswitch set to cocktail, P1 on X-axis, P2 on Y-axis, and analog sensitivity set to the same value for P1 and P2, it only took about 5/8ths of a rotation on Y-axis (yours) to move the same distance as 5/4ths rotation on X-axis (TT2) -- one full rotation of the playfield.
It looks like the value to use for the calculations on your rotary encoder is 2400, but double-check in Cameltry to confirm because some quadrature waveform encoders use different encoding techniques.
The usual technique for the optical circuits in a spinner/trackball/mouse is that each pulse on a data line is broken into 4 phases and each phase is one step.
For example:
Last read was A=1 and B=1, your starting point is Phase 3.
Next read
- A=1 and B=1, you are still on Phase 3 ==> no change, no movement.
- A=0 and B=1, you've changed to Phase 2 ==> one step counter-clockwise
- A=1 and B=0, you've changed to Phase 4 ==> one step clockwise
(https://upload.wikimedia.org/wikipedia/commons/thumb/6/68/Quadrature_Diagram.svg/600px-Quadrature_Diagram.svg.png)
One potentially difficult thing about that type of rotary encoder is the mount so here's a post containing two types of 3d printable mounts -- you'll need to download/print the nut and your choice of either the roundover or chamfer mount.
https://forum.arcadecontrols.com/index.php/topic,152421.msg1740629.html#msg1740629 (https://forum.arcadecontrols.com/index.php/topic,152421.msg1740629.html#msg1740629)
(https://forum.arcadecontrols.com/index.php?action=dlattach;topic=164992.0;attach=387869;image) (https://forum.arcadecontrols.com/index.php?action=dlattach;topic=164992.0;attach=387705;image) (https://forum.arcadecontrols.com/index.php?action=dlattach;topic=164992.0;attach=387890;image)
Scott
-
This is amazing, Scott! More detailed info than I would have hoped for. I appreciate you taking the time to do this. It gives me the confidence that the encoder will have plenty of resolution, and the means to verify it.
Nice bonus also with the printable mounting socket. It makes for a very compelling case of making another hole on the panel to replace the tiny one I have for the old spinner, where only the shaft comes through.
Thank you, very much!
-
Glad to assist. :cheers:
Nice bonus also with the printable mounting socket. It makes for a very compelling case of making another hole on the panel to replace the tiny one I have for the old spinner, where only the shaft comes through.
If you want an undermount version, try this one.
- If you have a wood panel, you'll probably also need a 6mm shaft extender.
https://www.thingiverse.com/thing:545842 (https://www.thingiverse.com/thing:545842)
(https://cdn.thingiverse.com/renders/93/70/3f/47/2c/Encoder_Bracket2_display_large.jpg)
Scott
-
Yes!! Exactly what I need.
Thanks again!
:cheers:
-
By the way, would there be any advantage in getting getting the 360p/r variant instead?
They cost the same and I thought better resolution would be better but I ask in case I’m missing anything.
-
By the way, would there be any advantage in getting getting the 360p/r variant instead?
Either version should be fine for most games, but low resolution game spinners like Kick (12 count) could be harder to fine tune with the 600p/r version because sensitivity is set in 1% increments in the MAME menu.
The math is a little easier with the 600p/r version -- settings are 1/2 of the commonly available TT2/SpinTrak sensitivity settings.
https://forum.arcadecontrols.com/index.php/topic,164017.0.html (https://forum.arcadecontrols.com/index.php/topic,164017.0.html)
https://wiki.arcadecontrols.com/index.php/Spinner_Turn_Count (https://wiki.arcadecontrols.com/index.php/Spinner_Turn_Count)
Sensitivity = 100 * (Counts_Per_Revolution for game) / (transitions per rotation of your spinner)
- 600p/r sensitivity for Kick = 100 * 12 / 2400 = 0.5%
- 360p/r sensitivity for Kick = 100 * 12 / 1440 = 0.83%
Scott
EDIT: Looking closer at the possible range of sensitivity values, the 360p/r is the better choice of the two.
It will handle the highest value game, Arkanoid - Revenge of Doh (972 count), with about a 68% sensitivity setting (100 * 972 / 1440 = 67.5%) and give you more fine adjustability for the lower value games.
If you can find one, a 240p/r encoder would be even closer to an exact match (100 * 972 / 960 = 101.25%) -- you probably wouldn't want to go lower than that.
-
Man, I did not even think about that. Really good point!
I think you meant to say "...could be harder to fine tune with the 360p/r version...", based on the rest of the message.
I'll be ordering that 600p/r encoder now. I'm looking forward to making Arkanoid more playable. It's nearly impossible with my current one.
Thank you for your help on this and everything else.
-
I think you meant to say "...could be harder to fine tune with the 360p/r version...", based on the rest of the message.
No, I meant what I said.
The ideal setting for Kick with a 600p/r encoder would be 0.5%.
- Since the lowest possible setting is 1%, Kick will be at 200% of the ideal sensitivity.
The ideal setting for Kick with a 360p/r encoder would be 0.83%.
- Since the lowest possible setting is 1%, Kick will be at 120% of the ideal sensitivity.
The ideal setting for Kick with a 300p/r encoder would be 1%.
- Since the lowest possible setting is 1%, Kick can be set exactly to the ideal sensitivity.
You can only adjust MAME sensitivity in 1% increments.
- 1% of 2400 (600p/r encoder) = 24 steps. Bigger # of steps per 1% increment = less able to fine tune.
- 1% of 1440 (360p/r encoder) = 14.4 steps.
- 1% of 1200 (300p/r TT2/SpinTrak) = 12 steps. Smaller # of steps per 1% increment = more able to fine tune.
Have you ever heard anyone complain that their TT2/SpinTrak (300p/r) can't handle Arkanoid? I haven't because 300p/r is high enough resolution to handle it just fine.
The higher resolution of that 600p/r encoder is largely wasted because you have to turn the sensitivity way down in MAME.
A 600p/r encoder has so many transitions that the highest count game, Arkanoid - Revenge of Doh (972 count), will only have a sensitivity setting of about 41 percent. (100 * 972 / 2400 = 40.5%)
- The 360p/r is a better choice with about a 68% MAME sensitivity setting. (100 * 972 / 1440 = 67.5%)
- A 300p/r encoder would be even better than that. (100 * 972 / 1200 = 81%)
- A 240p/r encoder (if you can find one) would be about as low as you would want to go. (100 * 972 / 960 = 101.25%)
Scott
-
Duh!!! What a thick head I have.
Thank you for clarifying all that.
-
Very old noob here. Is this going from a typical spinner to like an heavy Barrel type rotating joystick ?
-
Very old noob here. Is this going from a typical spinner to like an heavy Barrel type rotating joystick ?
No, it's WAY too high resolution for an optical rotary joystick. There were 5 games (Fighting Soccer, Caliber .50, Exterminator, Touchdown Fever, and Touchdown Fever II) that used an optical rotary joystick like the green-handled Loop-24 (http://wiki.arcadecontrols.com/index.php/Joysticks#Rotary_Joysticks) stick that is basicly an 8-way stick combined with a 24 pulses per rotation spinner.
(http://wiki.arcadecontrols.com/images/thumb/3/31/LS_30_loop24.jpg/480px-LS_30_loop24.jpg) (http://wiki.arcadecontrols.com/images/thumb/5/51/Loop-24.jpg/480px-Loop-24.jpg)
Heavy Barrel, Ikari Warriors, and similar games (http://wiki.arcadecontrols.com/index.php/Joysticks#Mechanical_Rotary_Joystick_Games_.28LS-30.2C_Happ_Mechanical_Rotary_Sticks.29) used a "clicky" mechanical rotary joystick like a yellow-handled LS-30 with a 12 position rotary switch.
Scott