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 --- Bug Reports --- Site News

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

  

Author Topic: World Series Baseball 99 - Arcade Build HELP!!  (Read 5944 times)

0 Members and 1 Guest are viewing this topic.

Nitro0602

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 123
  • Last login:Yesterday at 04:04:51 am
  • I want to build my own arcade controls!
World Series Baseball 99 - Arcade Build HELP!!
« on: July 08, 2021, 10:44:27 am »
Hey guys, I wanted to either remake this machine or use an existing pedestal machine I have.
Biggest question is I wanted to include the bat on the control panel.. anyway of doing that? Picture of the control panel attached. I used to play this game back in uni and would love to play this to my son as well. The bat winds back and release to hit the ball.

Thanks!

NuclearWarren

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 59
  • Last login:Yesterday at 11:30:20 am
  • I want to build my own arcade controls!
Re: World Series Baseball 99 - Arcade Build HELP!!
« Reply #1 on: July 08, 2021, 02:12:59 pm »
I think you could map the analog inputs to an analog USB stick to see if that gets any results. If you can get ahold of one of those spring loaded flick sticks, then you could wire that to a Teensy and program it to output the analog range the game is looking for. I wired and programmed one of those for the game Quarterback. It would be vertical, not horizontal like the original, but would perform the same way.

You could scratch make one, you'd need a pot and a spring loaded handle, again wiring it to a Teensy with the right script. I also wired a gas pedal which is the same thing, a spring loaded lever with a pot.

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8916
  • Last login:Today at 06:54:26 am
  • Designated spam hunter
Re: World Series Baseball 99 - Arcade Build HELP!!
« Reply #2 on: July 08, 2021, 07:42:42 pm »
I wanted to either remake this machine or use an existing pedestal machine I have.
Biggest question is I wanted to include the bat on the control panel.. anyway of doing that?
There are two main areas you'll need to deal with to recreate that Super Major League / World Series Baseball (GDS-0010) (wsbbgd in MAME?) panel from scratch.

1. An analog (potentiometer) encoder -- the easy part.
- Lots of choices like A-Pac, U-HID, gamepad hack, or a 32u4 series Arduino or AVR board like the Teensy that NuclearWarren suggested.
- The two joysticks on that panel are analog and so are the two bats.  You'll need a total of six analog axes. (see page 41 of the manual here for the schematic diagram)

2. The physical setup of a spring-loaded potentiometer -- the challenging part.
- Check out Menace's SW Yoke scratch-build for some ideas.  http://arcadecontrols.com/hosted/yoke/
- He used the springs from 5 ĹĒ-8Ē plate hangers.

- You should only need one spring per bat.

- I recommend using a direct drive system with a shaft coupler instead of gears.

- To maintain smoothly increasing spring tension through the 180 degrees of travel, you'll want something round for the spring to wrap around.  The cotter pin setup shown above will cause a non-linear increase in spring tension.  You can either design and 3d print a part or use three hole saw cutouts -- one for the spring to wrap around sandwiched between two larger ones that keep the spring from slipping off the side.

- You might want to use stop blocks on the shaft and control body so the spring doesn't damage the potentiometer.


Scott
« Last Edit: July 08, 2021, 07:47:53 pm by PL1 »

Nitro0602

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 123
  • Last login:Yesterday at 04:04:51 am
  • I want to build my own arcade controls!
Re: World Series Baseball 99 - Arcade Build HELP!!
« Reply #3 on: July 09, 2021, 01:25:33 am »
That is so cool, first time hearing about that board. Seems to be a bit out of my expertise to be honest. Does anyone know how the original mechanics was done? Iíll do a bit more research on the Teensey board. Thanks and appreciate the reply!



I think you could map the analog inputs to an analog USB stick to see if that gets any results. If you can get ahold of one of those spring loaded flick sticks, then you could wire that to a Teensy and program it to output the analog range the game is looking for. I wired and programmed one of those for the game Quarterback. It would be vertical, not horizontal like the original, but would perform the same way.

You could scratch make one, you'd need a pot and a spring loaded handle, again wiring it to a Teensy with the right script. I also wired a gas pedal which is the same thing, a spring loaded lever with a pot.

Nitro0602

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 123
  • Last login:Yesterday at 04:04:51 am
  • I want to build my own arcade controls!
Re: World Series Baseball 99 - Arcade Build HELP!!
« Reply #4 on: July 09, 2021, 01:32:26 am »
Thatís cool thx! I have a 4 player pedestal I made using 4 PS4 encoders. Was thinking of using 2 of the joysticks: one joystick to aim and the second joystick to swing..(pressing up to swing and down to bunt) however the positioning wonít be the same as per the original, but serves its purpose. I would like to actually make a custom bat controller like the game one dayÖ Iíll do a bit more research in the meantime.

I wanted to either remake this machine or use an existing pedestal machine I have.
Biggest question is I wanted to include the bat on the control panel.. anyway of doing that?
There are two main areas you'll need to deal with to recreate that Super Major League / World Series Baseball (GDS-0010) (wsbbgd in MAME?) panel from scratch.

1. An analog (potentiometer) encoder -- the easy part.
- Lots of choices like A-Pac, U-HID, gamepad hack, or a 32u4 series Arduino or AVR board like the Teensy that NuclearWarren suggested.
- The two joysticks on that panel are analog and so are the two bats.  You'll need a total of six analog axes. (see page 41 of the manual here for the schematic diagram)

2. The physical setup of a spring-loaded potentiometer -- the challenging part.
- Check out Menace's SW Yoke scratch-build for some ideas.  http://arcadecontrols.com/hosted/yoke/
- He used the springs from 5 ĹĒ-8Ē plate hangers.

- You should only need one spring per bat.

- I recommend using a direct drive system with a shaft coupler instead of gears.

- To maintain smoothly increasing spring tension through the 180 degrees of travel, you'll want something round for the spring to wrap around.  The cotter pin setup shown above will cause a non-linear increase in spring tension.  You can either design and 3d print a part or use three hole saw cutouts -- one for the spring to wrap around sandwiched between two larger ones that keep the spring from slipping off the side.

- You might want to use stop blocks on the shaft and control body so the spring doesn't damage the potentiometer.


Scott

Nitro0602

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 123
  • Last login:Yesterday at 04:04:51 am
  • I want to build my own arcade controls!
Re: World Series Baseball 99 - Arcade Build HELP!!
« Reply #5 on: July 09, 2021, 02:10:55 pm »
Also does anyone know how to swing in this game lol! Iím using Demul emulator and I can do everything else.. just canít swing the damn bat.

Hey guys, I wanted to either remake this machine or use an existing pedestal machine I have.
Biggest question is I wanted to include the bat on the control panel.. anyway of doing that? Picture of the control panel attached. I used to play this game back in uni and would love to play this to my son as well. The bat winds back and release to hit the ball.

Thanks!
« Last Edit: July 09, 2021, 02:56:50 pm by Nitro0602 »

javeryh

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7793
  • Last login:Today at 11:11:18 am
Re: World Series Baseball 99 - Arcade Build HELP!!
« Reply #6 on: July 09, 2021, 02:17:50 pm »
Nothing to add other than Scott is awesome.

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8916
  • Last login:Today at 06:54:26 am
  • Designated spam hunter
Re: World Series Baseball 99 - Arcade Build HELP!!
« Reply #7 on: July 09, 2021, 03:27:43 pm »
Also does anyone know how to swing in this game lol! Iím using Demul emulator and I can do everything else.. just can swing the bat.
There are game play directions starting on page 9 of the manual PDF.
- Looks like you have to pull back on the bat axis control before the pitch, aim with the analog stick, then release the bat at the right time to hit the ball.
- If you look at the panel diagram on page 7, you'll see that the analog stick goes from 00H (full down) to FFH (full up) however the bat axis goes from 00H (full forward) to FFH (full back) -- the opposite direction.
- If the bat axis moves opposite the expected direction, you might be able to reverse the axis like you can in MAME.   :dunno
https://www.gamesdatabase.org/Media/SYSTEM/Arcade//Manual/formated/Super_Major_League_-_World_Series_Baseball_-_2001_-_Sega.pdf

Nothing to add other than Scott is awesome.
Thanks.  :lol   :cheers:

If anyone's interested, I've worked out about 70% of the rough design and materials for a 3d printable version of the bat controller.


Scott

Nitro0602

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 123
  • Last login:Yesterday at 04:04:51 am
  • I want to build my own arcade controls!
Re: World Series Baseball 99 - Arcade Build HELP!!
« Reply #8 on: July 09, 2021, 04:12:50 pm »
Thanks for this! I tried again by holding the analog 2 keyboard keys and nothing. Iíve seen this on YouTube fully playable.. I must be missing something.  Also Iíd be interested in purchasing the bat as well if I could add it to my existing pedestal cabinet.  Iíll send a quick pic of the Demul setup after this.

Also does anyone know how to swing in this game lol! Iím using Demul emulator and I can do everything else.. just can swing the bat.
There are game play directions starting on page 9 of the manual PDF.
- Looks like you have to pull back on the bat axis control before the pitch, aim with the analog stick, then release the bat at the right time to hit the ball.
- If you look at the panel diagram on page 7, you'll see that the analog stick goes from 00H (full down) to FFH (full up) however the bat axis goes from 00H (full forward) to FFH (full back) -- the opposite direction.
- If the bat axis moves opposite the expected direction, you might be able to reverse the axis like you can in MAME.   :dunno
https://www.gamesdatabase.org/Media/SYSTEM/Arcade//Manual/formated/Super_Major_League_-_World_Series_Baseball_-_2001_-_Sega.pdf

Nothing to add other than Scott is awesome.
Thanks.  :lol   :cheers:

If anyone's interested, I've worked out about 70% of the rough design and materials for a 3d printable version of the bat controller.


Scott

Nitro0602

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 123
  • Last login:Yesterday at 04:04:51 am
  • I want to build my own arcade controls!
Re: World Series Baseball 99 - Arcade Build HELP!!
« Reply #9 on: July 09, 2021, 04:19:15 pm »
How do I swing the damn bat!! Help please!

Analog 1 Controls: moves cursor / throwing direction
Analog 2 Controls: No clue! Lol
PUSH1: pitch/throw the ball.

Nothing else works other than that!

Always a mission trying to relive your childhood..lol!
« Last Edit: July 09, 2021, 10:05:16 pm by Nitro0602 »

Nitro0602

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 123
  • Last login:Yesterday at 04:04:51 am
  • I want to build my own arcade controls!
Re: World Series Baseball 99 - Arcade Build HELP!!
« Reply #10 on: July 14, 2021, 01:53:47 pm »
Okay got it all sorted out! The only way I know how to swing the bat is if the joystick has an x/y axis point.. that being said used 2 mayflash joysticks.. 1st joystick was set to D-Pad and second to x/y. D-pad is used for aim and throwing direction and the second mayflash set to x/y is to swing.  Is there anyway to manipulate this with current encoders? To make matters worse I cannot use my current pedestal cabinet as it has PS4 encoders which of course is not recognized on Demul emulator lol! So I want to create a joystick panel just for that game. Iíve attached an image of the exact panel. Fee free to pm if someone can make it.. or let me know if thereís an easier way to make this happen. I know a lot of info.. thanks for reading!

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8916
  • Last login:Today at 06:54:26 am
  • Designated spam hunter
Re: World Series Baseball 99 - Arcade Build HELP!!
« Reply #11 on: November 22, 2021, 12:18:34 am »
 :bump

If anyone's interested, I've worked out about 70% of the rough design and materials for a 3d printable version of the bat controller.
Nitro0602 PM'd me a few weeks ago and expressed interest in a 3d printable version of the baseball bat controller.

Here's what I have so far for the below-the-panel portion of the design.
- Red dots are screw holes/spring attachment points.
- A potentiometer attaches to the bottom of the magenta shaft coupler.
- The black part is a rubber grommet. (shock absorber) 
- The purple parts are bronze flange bearings




Scott

Nitro0602

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 123
  • Last login:Yesterday at 04:04:51 am
  • I want to build my own arcade controls!
Re: World Series Baseball 99 - Arcade Build HELP!!
« Reply #12 on: May 15, 2022, 11:53:10 am »
Hey guys! Apologies for being mia.. had some personal things that I had to deal with. All is good or good as can be!
That being said I wanted to circle back to get this game working as true as possible. (I mentioned above regarding Mayflash working in x/y mode.. I have to test that out again along with an Xbox 360 controller just to see how the mechanics work again.

As of now my current setup (universal 4 player pedestal with a microswitch  plunger)
Joystick moves the cursor to hit the ball (but itís not analog so it only moves 8 way in a stiff movement  not a smooth/fluent 8 way directional  (could be the emulator version)

Plunger is set to ďupĒ on the encoder: when I pull it back and release, then the batter swings (plunger has a micro switch, not true to the game as well.

All in all the game plays ok as my current setup, but would like it to be more true to the arcade of course.

How it should play:
Joystick should move just like an analog PlayStation/Xbox controller
Bat: I believe this is where a potentiometer input is required as the baseball bat is setup in an up position (facing the screen) then you push down and release to swing.. also to note if you press halfway down and release.. the player bunts (not too worried about that lol)

Iíve posted a YouTube link of the exact game

Hope this helps understanding how the game plays.

Video link: (forward to 2:55)


PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8916
  • Last login:Today at 06:54:26 am
  • Designated spam hunter
Re: World Series Baseball 99 - Arcade Build HELP!!
« Reply #13 on: May 15, 2022, 01:37:47 pm »
Found a spring that should work well for this controller.
- Model Number: 88061 Menards ģ SKU: 2018702
- 3/16" x 2" extension spring
- 2.13 pound safe working load
https://www.menards.com/main/hardware/fasteners-connectors/specialty-fasteners/springs/midwest-fastener-reg-3-16-x-2-zinc-extension-spring-1-count/88061/p-1444440191733.htm

It's long enough to allow a reasonable range of motion and short enough so the controller should have a footprint that's close to normal joystick.

The end loops are a good size for either #4-40 or M3 hardware.   ;D

Encoder selection:
You'll need P1 and P2 A/B/Start/Coin buttons, analog stick, and bat controller for your control panel so that's 4 buttons and 3 analog axes per player ==> 8 buttons and 6 analog axes total.

The A-Pac only has 4 analog inputs so you'd need two of those if you choose to go that route.

Another option to consider is a full-size U-HID.

IMHO the best bang for your buck is an Arduino using either the 32u4 or 328P processor since they have six analog inputs.   ;D

An Arduino Pro Micro doesn't have enough analog input pins (pins 40 and 41 on the 32u4 are not connected on that board), but a Micro, a Leonardo, or an Uno do.





Another option is the the Adafruit ItsyBitsy 32u4 5v 16MHz board.
https://www.adafruit.com/product/3677
https://www.amazon.com/Adafruit-ItsyBitsy-32u4-5V-16MHz/dp/B079SMYDRQ/




Scott
EDIT: Don't use an Uno.

Looking into this further, it appears that some expert users have turned specific Uno boards with the 328P processor into a USB HID device, but the Uno has to have a 32u2 in the chipset and the program you use to do it is very unstable and hard to use.   :banghead:

It's much easier and way more reliable to stick with the Micro or Leonardo for this application.
« Last Edit: May 16, 2022, 05:36:54 pm by PL1 »

Nitro0602

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 123
  • Last login:Yesterday at 04:04:51 am
  • I want to build my own arcade controls!
Re: World Series Baseball 99 - Arcade Build HELP!!
« Reply #14 on: May 15, 2022, 07:41:58 pm »
Awesome man! Really appreciate the info.. I forgot to mention my 4 player pedestal has 4 PS4/PS5 encoders. So Iíd guess Iíd make the baseball bat a stand-alone (I could technically make 1 bat usable for both players) would this work as a pinball plunger as well? I donít mind that route as well, not sure how adding a bat joystick would look like on my machine currently.

Nonetheless Iíd love to have this anyways for nostalgia!  Iím away till next week, but would love to look into this further.

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8916
  • Last login:Today at 06:54:26 am
  • Designated spam hunter
Re: World Series Baseball 99 - Arcade Build HELP!!
« Reply #15 on: May 16, 2022, 12:07:32 am »
Pretty sure that one bat control for two players is going to be a disaster.

A standalone box with just the bat control plopped on top of your 4P panel will almost certainly be less than satisfactory, too.

Your current 4P panel uses 8-way sticks, right?
- If so, you probably want analog sticks for this game.

Trying to add two analog sticks and two bat controls to an existing 4P panel sounds like a not-so-good idea.
- Is there enough room for the sticks and bats?
- What analog sticks would you use?

For those reasons, I thought you were planning on either:

1. Swappable panels for your pedestal (4P panel + bat panel)
- Storage of the one not currently in use can be a pain especially a big heavy 4 player panel.   :(

    or

2. A USB standalone bat controller box with the full set of controls for two players.

You could put the standalone controller box on a folding stand in front of the pedestal or build it into a separate pedestal that plugs into the current 4P pedestal.
- When not in use, maybe you can store it behind the main 4P pedestal.   :dunno


Scott

Nitro0602

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 123
  • Last login:Yesterday at 04:04:51 am
  • I want to build my own arcade controls!
Re: World Series Baseball 99 - Arcade Build HELP!!
« Reply #16 on: May 16, 2022, 12:28:41 am »
You know what..  Making interchangeable control panels might be the answer. My pedestal opens like a piano hinge (magnet push devices.. forgot the exact terminology lol) I also ran 3 front usb covers so I could create something that would somehow clip onto the front of the panel than simply have a 1-2Ē hole where the usbs connect to.. thought about it in the past but now might give that a serious go! 

My current setup is running 8 way joysticks.. however I believe there is space above each joystick to add an analog joystick followed by the bat below the 8 buttons I currently have for players 1 and 2.. but doing that way might just look really clutteredÖ Iím starting to really like the idea of add-on panels.. always wanted to do one for Tron and Stargate and some others.. thanks for the advice!

Would each bat be its own usb? If so Iíd need 4 usb inputs.. 2 for the bats and 2 for the analog joysticks right?
Would it be possible for you to make the bat devices for me? I can do everything else..

Thanks again!


PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8916
  • Last login:Today at 06:54:26 am
  • Designated spam hunter
Re: World Series Baseball 99 - Arcade Build HELP!!
« Reply #17 on: May 16, 2022, 04:15:39 am »
Stargate
Have you tried the LUA plugin here (MAME v0.227 or newer) that lets you use an 8-way stick for Defender and Stargate instead of Reverse, Thrust, and 2-way stick?

Would each bat be its own usb? If so Iíd need 4 usb inputs.. 2 for the bats and 2 for the analog joysticks right?
Nope.  You can easily fit all of the controls for the bat controller panel -- 8 (or more) buttons + 6 analog axes -- on just one of the Arduino devices listed above so you only need one USB cord for the whole panel.
- The analog axes go on the inputs labeled A0 thru A5.  (See pics of boards above.)
- That leaves plenty of other inputs for buttons.
- For the Arduino sketch (the code that you use to turn it into a gamepad encoder), you can combine/adapt Baritonomarchetto's ArcadeHID potentiometer and button sketches like Vee21 did for his custom driving cab encoder here.

As long as Demul can map both player controls to a single gamepad device, you're all set with just one Arduino.
- Worst case scenario is if Demul needs separate gamepads for P1 and P2 so you use two Arduinos.
-------------------------
PM sent.


Scott

Nitro0602

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 123
  • Last login:Yesterday at 04:04:51 am
  • I want to build my own arcade controls!
Re: World Series Baseball 99 - Arcade Build HELP!!
« Reply #18 on: May 18, 2022, 04:10:40 pm »
Could I use the links below for either the analog aim and or modify it with a spring to add a bat for swinging?

360 Ultimarc Stick
https://www.ultimarc.com/arcade-controls/joysticks/ultrastik-360-oval-top-clone/

KEYESTUDIO 5V Leonardo R3 ATmega32u4 Board with USB Cable Kit for Arduino Microcontroller MCU Project https://www.amazon.ca/dp/B0786LJQ8K/ref=cm_sw_r_cp_api_i_XMNJ33TAVQ9X73X8BERP?_encoding=UTF8&psc=1

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8916
  • Last login:Today at 06:54:26 am
  • Designated spam hunter
Re: World Series Baseball 99 - Arcade Build HELP!!
« Reply #19 on: May 18, 2022, 06:08:34 pm »
Could I use the links below for either the analog aim and or modify it with a spring to add a bat for swinging?
You can use the U360 for the analog aim.
- AFAIK the design of the U360 does not allow you to add a 3rd-axis spring-loaded potentiometer on the bottom of that stick.

The closest thing I've seen to combining an analog stick and the bat control in a single control is a 3 axis analog stick like this one.



The two problems with this approach are that:
(1) The twist top is spring loaded to the center position.
(2) Not sure how combining the joystick and bat into a single control would mess with game play.   :banghead:

. . . or did you mean use one U360 for aim and mod a second U360 for the bat control?
- That might be doable, but would be a bit on the expensive side.
-----------------
You can use the Leonardo board you linked to as an analog encoder for the bat control design shown in the diagram in reply #11 above.   ;D


Scott
« Last Edit: May 18, 2022, 06:17:49 pm by PL1 »

Nitro0602

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 123
  • Last login:Yesterday at 04:04:51 am
  • I want to build my own arcade controls!
Re: World Series Baseball 99 - Arcade Build HELP!!
« Reply #20 on: May 19, 2022, 03:07:37 am »
Sorry I meant one joystick to aim/move cursor  and another for the spring loaded bat

Nitro0602

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 123
  • Last login:Yesterday at 04:04:51 am
  • I want to build my own arcade controls!
Re: World Series Baseball 99 - Arcade Build HELP!!
« Reply #21 on: May 19, 2022, 03:15:49 am »
Forgot to mentionÖ could I use the joystick you posted below for the bat or was to aim with it?


Could I use the links below for either the analog aim and or modify it with a spring to add a bat for swinging?
You can use the U360 for the analog aim.
- AFAIK the design of the U360 does not allow you to add a 3rd-axis spring-loaded potentiometer on the bottom of that stick.

The closest thing I've seen to combining an analog stick and the bat control in a single control is a 3 axis analog stick like this one.



The two problems with this approach are that:
(1) The twist top is spring loaded to the center position.
(2) Not sure how combining the joystick and bat into a single control would mess with game play.   :banghead:

. . . or did you mean use one U360 for aim and mod a second U360 for the bat control?
- That might be doable, but would be a bit on the expensive side.
-----------------
You can use the Leonardo board you linked to as an analog encoder for the bat control design shown in the diagram in reply #11 above.   ;D


Scott

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8916
  • Last login:Today at 06:54:26 am
  • Designated spam hunter
Re: World Series Baseball 99 - Arcade Build HELP!!
« Reply #22 on: May 19, 2022, 11:29:18 am »
Forgot to mentionÖ could I use the joystick you posted below for the bat or was to aim with it?
The closest thing I've seen to combining an analog stick and the bat control in a single control is a 3 axis analog stick like this one.


To be clear, I do not recommend this stick for use as a baseball bat controller and the one I linked to is WAY overpriced.
- I posted it as an example of an approach not to follow.

There are no off-the-shelf controls I've seen that will work well for this type of controller.
- I doubt you'll be happy with the mods you can do to those off-the-shelf controls that makes them kinda-sorta-almost work.

I'll let you know if there's some fatal flaw in my 3d printed control design.
- Unless and until a flaw like that is found, there's no reason for me to waste any more time on other approaches.
----------
Just ordered these 1/4" shaft collars.
- You'll need 2 per bat control.  One to mount the cam (green/blue) to the shaft. (yellow)  The other to mount the hub+baseball bat lever to the shaft.




Scott

Nitro0602

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 123
  • Last login:Yesterday at 04:04:51 am
  • I want to build my own arcade controls!
Re: World Series Baseball 99 - Arcade Build HELP!!
« Reply #23 on: May 20, 2022, 11:08:05 am »
Beauty! Pm on pricing details please when you can! Iím sure I can get the analog stick to work.. Iíll wait for your 3D testing

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8916
  • Last login:Today at 06:54:26 am
  • Designated spam hunter
Re: World Series Baseball 99 - Arcade Build HELP!!
« Reply #24 on: May 21, 2022, 06:19:55 pm »
Here's a first draft version of the "hub and bat" code for the above-the-panel part of this controller.

Code: [Select]
// Hub and Bat - Bat Controller (v0)

// The diameter values may need to be *very slightly* larger to account for the 180-sided polygon used to render circles -- see "undersized holes" at https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Primitive_Solids#cylinder

/////////////////////////////
//  Adjustable variables
/////////////////////////////

// Hub body variables
HubHeight = 40; // Overall hub height

HubDia = 25; // Hub diameter

HubTopHeight = 8; // Rounded hub top height


// Bat variables
BatLength = 75; // Overall length of the bat

BatBarrelLength = 35; // Length of the bat barrel (the large un-tapered part of the bat)

BatBarrelRound = 4; // Length of the rounded end of the bat barrel

BatDia = 12; // Diameter of the bat barrel

BatHandleDia = 7; // Diameter of the bat handle

StandDia = 8; // Diameter of the cylinder that fills the gap between the hub and bat knob

StandHeight = 4; // Height of the cylinder that fills the gap between the hub and bat knob

KnobDia = 12; // Diameter of the bat knob

KnobHeight = 6; // Height of the bat knob

KnobOffset = 0.8; // Distance the knob is moved to remove the gap between the knob and stand


// Shaft collar and screw variables
ShaftCollarOD = 13.2; // Shaft collar outer diameter

ShaftCollarHeight = 8.1; // Shaft collar height

ShaftCollarScrewDia = 4.85; // Shaft collar screw diameter

ShaftCollarOffset = 20; // Distance from top of hub to center of shaft collar

SocketCapScrewHeadDia = 8; // Diameter of the socket cap screw head hole

SocketCapScrewHeadDepth = 10; // Depth of the socket cap screw head hole


// Number of fragments (polygon sides) used to render a full circle.
    $fn = 180; // Default = 180  Typical range = 6 - 360
    // 6 will render a circular hole as a hexagon, 8 will render a circular hole as an octagon.
    // Lower the number for faster rendering, raise the number for smoother rendering.


/////////////////////////////
//  Make the part
/////////////////////////////

difference(){ // Hub and bat shapes minus shaft collar holes, shaft collar setscrew notch, and setscrew holes

union(){ // Hub and bat shapes

// Hub body
rotate([90, 0, 0])
translate([0, 0, HubHeight/2 - HubTopHeight/4])
cylinder (HubHeight - HubTopHeight/2, d = HubDia, center=true);

// Hub rounded top
rotate([90, 0, 0])
translate([0, 0, HubHeight - HubTopHeight/2])
scale ([1, 1, HubTopHeight/HubDia])
sphere (d = HubDia, center=true);

// Bat stand (fills the gap between the hub and bat knob)
rotate([90, 0, 0])
translate([0, HubDia/2 - StandHeight/2, HubHeight - ShaftCollarOffset/2])
rotate([90, 0, 0])
cylinder (StandHeight, d = StandDia, center=true);

// Bat knob
rotate([90, 0, 0])
translate([0, HubDia/2 + KnobHeight/2 - KnobOffset, HubHeight - ShaftCollarOffset/2])
rotate([90, 0, 0])
scale([1,1,KnobHeight/KnobDia])
sphere (d = KnobDia, center=true);

// Bat body
hull(){ // Shape enclosing the handle and barrel spheres

// Handle
rotate([90, 0, 0])
translate([0, HubDia/2 + KnobHeight/2, HubHeight - ShaftCollarOffset/2])
rotate([90, 0, 0])
cylinder (KnobHeight, d = BatHandleDia, center=true);

// Lower barrel sphere
rotate([90, 0, 0])
translate([0, HubDia/2 + BatLength - BatBarrelLength, HubHeight - ShaftCollarOffset/2])
rotate([90, 0, 0])
scale([1,1,BatBarrelRound/BatDia])
sphere (d = BatDia, center=true);

// Upper barrel sphere
rotate([90, 0, 0])
translate([0, HubDia/2 + BatLength - BatBarrelRound/2, HubHeight - ShaftCollarOffset/2])
rotate([90, 0, 0])
scale([1,1,BatBarrelRound/BatDia])
sphere (d = BatDia, center=true);

} // End shape enclosing the handle and barrel spheres
//
} // End hub and bat shapes
//

// Remove shaft collar holes, shaft collar setscrew notch, and setscrew holes from the hub and bat shapes

// Shaft collar hole
rotate([90, 0, 0])
translate([0, 0, HubHeight - ShaftCollarOffset/2])
color("cyan")
cylinder (ShaftCollarHeight, d = ShaftCollarOD, center=true);

// Shaft collar hole through hub (enlarged)
rotate([90, 0, 0])
translate([0, 0, HubHeight/2 - ShaftCollarOffset/2])
color("purple")
cylinder (HubHeight - ShaftCollarHeight + .01, d1 = ShaftCollarOD + 0.5, d2 = ShaftCollarOD, center=true);

// Shaft collar setscrew notch
rotate([90, 0, 0])
translate([0, ShaftCollarOD/2, HubHeight/2 - ShaftCollarOffset/4])
color("red")
cube ([ShaftCollarScrewDia, 0.8, HubHeight - ShaftCollarOffset/2 + 0.1], center=true);

// Setscrew hole
rotate([90, 0, 0])
translate([0, HubDia/2 + BatLength/2, HubHeight - ShaftCollarOffset/2])
rotate([90, 0, 0])
cylinder (HubDia/2 + BatLength + 2, d = ShaftCollarScrewDia, center=true);

// Socket cap screw head hole
rotate([90, 0, 0])
translate([0, HubDia/2 + BatLength - SocketCapScrewHeadDepth/2, HubHeight - ShaftCollarOffset/2])
rotate([90, 0, 0])
color("white")
*cylinder (SocketCapScrewHeadDepth, d = SocketCapScrewHeadDia, center=true);
// Note regarding the previous line of code:
// "*cylinder" ==> don't include this hole (use for headless screws like setscrews)
// "cylinder" ==> include this hole (use for screws with heads like socket cap screws)

} // End hub and bat shapes minus shaft collar holes, shaft collar setscrew notch, and setscrew holes
//

To see the model in 3d, install OpenSCAD, copy the code above into the editor window, and press F5 or click on the "preview" icon. (3rd from right in this screenshot)



The "hub and bat" code above is parametric so you can adjust any variable on lines 10 - 50 to change the model.
- For example, to change the diameter of the bat barrel from 12mm to 16mm, change line 24 "BatDia = 12;" to "BatDia = 16;" then F5 or "preview" to update the view.

To generate a 3d printable STL file, you'll need to render the model before it will export as an STL.
- Press F6 or click on the "render" icon. (2nd from right)
- When OpenSCAD finishes rendering the model, click on the "STL" icon. (farthest right)

----------------------------------------------

Next thing to do is measure how stretchy the spring is so the cam is the right diameter.   ;D


Scott

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8916
  • Last login:Today at 06:54:26 am
  • Designated spam hunter
Re: World Series Baseball 99 - Arcade Build HELP!!
« Reply #25 on: May 22, 2022, 04:18:37 pm »
The objective of this spring test is to determine initial values for the minimum and maximum amount of spring stretch/tension.
- If you're using a different spring than this one, you'll need to do this test to find the right numbers for your spring.

Test process:
- Draw a line on a board.
- Mount the spring on that line using a wood screw.
- Use something like a hook from a Harbor Freight hook/pick set to stretch the spring like a pinball plunger -- it worked really well.   ;D
- Mark the no stretch, minimum stretch, and maximum stretch points on the line.
-- Minimum stretch is slightly greater than the least spring tension required to turn the potentiometer so the cam is always pulled back to the bumper when the bat is released.
-- Maximum stretch is the most spring tension desired for this controller.
- Measure the three marks relative to the wood screw.

Spring stretch test measurements:
  No stretch = 50mm
  Minimum stretch = 80mm
  Maximum stretch = 160mm

The distance between minimum stretch and maximum stretch (80mm) is the distance we want to use for the cam circumference.

The formula for the circumference of a circle = 2 * π * circle radius.

The cam only turns 180 degrees (half of a circle) so the cam circumference = π * cam radius.

π * cam radius = cam circumference ==> 3.14 * cam radius = 80mm ==> cam radius = 26mm.

Next thing to do is write the code for the cam model.


Scott

Nitro0602

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 123
  • Last login:Yesterday at 04:04:51 am
  • I want to build my own arcade controls!
Re: World Series Baseball 99 - Arcade Build HELP!!
« Reply #26 on: May 28, 2022, 02:23:25 am »
Holly crap.. that is really cool.. totally out of my expertise.. but amazing work man! This looks very promising!

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8916
  • Last login:Today at 06:54:26 am
  • Designated spam hunter
Re: World Series Baseball 99 - Arcade Build HELP!!
« Reply #27 on: May 28, 2022, 05:54:15 am »
totally out of my expertise..
You don't need any fancy programming skills.
- Install the OpenSCAD software.
- Run the OpenSCAD program.
- Highlight/copy/paste the 156 lines of code from reply #24 into OpenSCAD.
- Save the file.  I used the filename "Hub and Bat - Bat Controller.scad".
- Press F5 to generate a preview of the part.
- Right click + drag to slide the view of the part. (no rotation)
- Left-click + drag to rotate the view of the part.
- Scroll wheel to zoom the view in/out.

Right now, the baseball bat is 75mm/3" long and the barrel (fat part you hit the ball with) is 12mm diameter. (12.7mm = 1/2")

Do the shapes and proportions look good to you?
-------------------
Code for the cam is almost done.
- Had to increase the cam radius from 26mm to 33mm so there's just enough room for the shaft collar hub, bumper notches, and the mounting block for the spring screw.
- The increased cam radius changes the amount of spring stretch from 80mm to 104mm.
- This should still be within a reasonable range of stretch and tension for the spring.   ;D


Scott

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8916
  • Last login:Today at 06:54:26 am
  • Designated spam hunter
Re: World Series Baseball 99 - Arcade Build HELP!!
« Reply #28 on: May 28, 2022, 08:35:12 pm »
Here's the first draft for the cam.

"Cam - Bat Controller.scad"
Code: [Select]
// Cam - Bat Controller (v0)

// The diameter values may need to be *very slightly* larger to account for the 180-sided polygon used to render circles -- see "undersized holes" at https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Primitive_Solids#cylinder

/////////////////////////////
//  Adjustable variables
/////////////////////////////

// Shaft collar and screw variables
ShaftCollarOD = 13.2; // Shaft collar outer diameter

ShaftCollarHeight = 8.1; // Shaft collar height

ShaftCollarScrewDia = 4.85; // Shaft collar screw diameter

ShaftCollarHubDia = 22.2; // Shaft collar hub dia


// Screw block variables
ScrewBlockX = 6; // Screw block X-axis size

ScrewBlockY = 10; // Screw block y-axis size

SpringScrewDia = 3.2; // Screw hole diameter for spring screw


// Cam variables
CamRadius = 33; // Cam radius

CamThick = 8; // Cam thickness

BumperOffset = 18; // Bumper offset

BumperDia = 13.5; // Bumper diameter

ShaftNotchDia = (ShaftCollarHubDia + ShaftCollarOD)/2; // Ensures notch is larger than the shaft collar and smaller than the shaft collar hub.


// Number of fragments (polygon sides) used to render a full circle.
    $fn = 180; // Default = 180  Typical range = 6 - 360
    // 6 will render a circular hole as a hexagon, 8 will render a circular hole as an octagon.
    // Lower the number for faster rendering, raise the number for smoother rendering.


/////////////////////////////
//  Make the part
/////////////////////////////

difference(){ // Cam body cylinders minus cam back half, shaft notch, bumper notches, and skeleton holes

    union(){ // Cam body cylinders

    // Cam lower half cylinder
translate([0, 0, - CamThick/4])
cylinder (h = CamThick/2 + 0.01, r1 = CamRadius + CamThick/2, r2 = CamRadius, center=true);

    // Cam upper half cylinder
translate([0, 0, + CamThick/4])
cylinder (h = CamThick/2 + 0.01, r1 = CamRadius, r2 = CamRadius + CamThick/2, center=true);

    } // End cam body cylinders
//

// Cam back half
translate([0, - (CamRadius + CamThick/2)/2 - 1, 0])
cube ([CamRadius * 2 + CamThick + 2, CamRadius + CamThick/2 + 2, CamThick + 2], center=true);

// Shaft notch
cylinder (CamThick + 2, d = ShaftNotchDia, center=true);

// Left bumper notch
translate([- BumperOffset, 0, 0])
color("white")
cylinder (CamThick + 2, d = BumperDia, center=true);

// Right bumper notch
translate([BumperOffset, 0, 0])
color("white")
cylinder (CamThick + 2, d = BumperDia, center=true);

// Left skeleton hole
rotate([0, 0, 120])
translate([BumperOffset, 0, 0])
color("pink")
cylinder (CamThick + 2, d = BumperDia, center=true);

// Right skeleton hole
rotate([0, 0, 60])
translate([BumperOffset, 0, 0])
color("pink")
cylinder (CamThick + 2, d = BumperDia, center=true);

} // End cam body minus shaft collar and bumper notches
//

difference(){ // Shaft collar hub minus shaft collar hole and setscrew hole

// Shaft collar hub
cylinder (CamThick, d = ShaftCollarHubDia, center=true);

// Shaft collar hole
color("blue")
cylinder (CamThick + 2, d = ShaftCollarOD, center=true);

// Setscrew hole
translate([0, - ShaftCollarHubDia/2, 0])
rotate([90, 0, 0])
color("red")
cylinder (ShaftCollarHubDia, d = ShaftCollarScrewDia, center=true);

} // End shaft collar hub minus shaft collar hole and setscrew hole
//

difference(){ // Screw mount block minus spring screw hole

// Screw mount block
translate([CamRadius - ScrewBlockX/2, - ScrewBlockY/2, 0])
cube ([ScrewBlockX, ScrewBlockY + 0.01, CamThick + 0.01], center=true);

// Spring screw hole
translate([CamRadius - ScrewBlockX/2, - ScrewBlockY/2, 0])
rotate([0, 90, 0])
color("aqua")
cylinder (ScrewBlockX + 2, d = SpringScrewDia, center=true);

} // End screw mount block minus spring screw hole
//

Printing the handle and cam now -- they should be done in a few hours.

While they're printing, it's time to make the next test rig by scribbling on a board and drilling a few holes.   ;D


Scott

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8916
  • Last login:Today at 06:54:26 am
  • Designated spam hunter
Re: World Series Baseball 99 - Arcade Build HELP!!
« Reply #29 on: May 29, 2022, 04:37:42 am »
Two swings and two misses.   :badmood:

1.  The vertical setscrew hole in the bat/hub is too small.   :banghead:
- Might need to make a test print so people can find the perfect setscrew hole size for their 3d printer and slicer program.

2.  After less than a dozen full pulls/releases, the cam suffered some major layer adhesion failures.
- You can see in the attached picture that the setscrew has rotated clockwise relative to the body of the cam and forced a piece out.

I should have anticipated this problem because the force is transfered via a setscrew engaging with only 4.5mm of the wall of the setscrew hole and the screw hole is parallel to the print layers -- the plane in a 3d print that is easiest to break.   :embarassed:

A flange shaft coupler like this one should be a good replacement for the shaft coupler in the cam.
- Four M3 x 15mm screws through the flange and cam body should transfer the torque without damaging the cam.   ;D




Scott

Nitro0602

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 123
  • Last login:Yesterday at 04:04:51 am
  • I want to build my own arcade controls!
Re: World Series Baseball 99 - Arcade Build HELP!!
« Reply #30 on: May 30, 2022, 03:14:19 am »
Canít tell you how exciting this is! And I think stupid me just found out about why I couldnít move the joystick fluently in the game.. I have the directional joystick set to up,down,left,right keyboard keys.. the only issue is that Sega Naomi doesnít recognize PlayStation encoders.. therefore I had to buy those Mayflash magic usb sticks.. (sorry I think I mentioned that before) so Iím going to re-configure switching it to xbox mode.. as Iím sure that should do the trick.  Now all I need is those beauties youíre working on!

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8916
  • Last login:Today at 06:54:26 am
  • Designated spam hunter
Re: World Series Baseball 99 - Arcade Build HELP!!
« Reply #31 on: May 30, 2022, 04:32:07 am »
The flange shaft couplers should be here on Friday.   ;D

Things to do:

- Make a test print to determine the hole size for the bat setscrew.

- Change the cam model so it uses a flange shaft coupler.
-- Add four screw holes, change the size of the coupler hole, and adjust the angle of the setscrew hole if needed.

- Add three screw holes near the outer edge of the cam so the spring doesn't split the layers apart.
-- If you look closely at the left side of the cam layer failure pic, there's a small crack where the top and bottom halves of the cam meet.

- Hardware store run for the additional screws and washers.


Scott

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8916
  • Last login:Today at 06:54:26 am
  • Designated spam hunter
Re: World Series Baseball 99 - Arcade Build HELP!!
« Reply #32 on: June 03, 2022, 07:23:25 am »
Good news:
The flange shaft couplers arrived earlier than expected.

Cam model updated for flange shaft coupler, spring is now connected to the cam using safety wire instead of a screw, and added screw holes along the cam radius to keep the spring from splitting the cam in half.   ;D

"Cam - Bat Controller.scad" (second draft)
Code: [Select]
// Cam - Bat Controller (v0)

// The diameter values may need to be *very slightly* larger to account for the 180-sided polygon used to render circles -- see "undersized holes" at https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Primitive_Solids#cylinder

/////////////////////////////
//  Adjustable variables
/////////////////////////////

// Flange shaft collar and screw variables
ShaftCollarOD = 10.8; // Shaft collar outer diameter (not the flange outer diameter)

ShaftCollarHeight = 10; // Shaft collar height, not including the flange thickness

ShaftCollarSetscrewDia = 3; // Shaft collar setscrew diameter

ShaftCollarSetscrewHeight = 6.5; // Distance from the bottom of the cam to the center of the setscrew.

ShaftCollarSetscrewAngle = 0; // Number of degrees to rotate the Z-axis of the setscrew hole -- 0 = parallel with the Y-axis, 10 = 10 degrees counter-clockwise

ShaftCollarFlangeScrewDia = 3.5; // Shaft collar flange screw diameter

ShaftCollarFlangeScrewOffset = 8; // Shaft collar flange screw offset from center

ShaftCollarHubDia = 22.2; // Shaft collar hub diameter


// Screw block variables
ScrewBlockX = 8; // Screw block X-axis size

ScrewBlockY = 8; // Screw block Y-axis size

SpringHole = 2; // Diameter of hole for 0.020" or 0.032" safety wire to attach the spring to the cam


// Cam variables
CamRadius = 33; // Cam radius

CamThick = 10; // Cam thickness

BumperOffset = 18; // Bumper offset

BumperDia = 13.5; // Bumper diameter

ShaftNotchDia = ShaftCollarHubDia - 0.2; // Ensures notch is smaller than the shaft collar hub.

CamRadiusScrewDia = 3.5; // Diameter of screw holes around the outer radius of the cam -- these screws and washers prevent layer separation due to force applied by the spring

CamRadiusScrewInset = 2.5; // Inset distance of the screw holes around the outer radius of the cam

CamRadiusScrewAngle1 = 80; // Angle of screw hole 1 on the outer radius of the cam

CamRadiusScrewAngle2 = 30; // Angle of screw hole 2 on the outer radius of the cam

CamRadiusScrewAngle3 = -20; // Angle of screw hole 3 on the outer radius of the cam

CamRadiusScrewAngle4 = -70; // Angle of screw hole 4 on the outer radius of the cam


// Number of fragments (polygon sides) used to render a full circle.
    $fn = 180; // Default = 180  Typical range = 6 - 360
    // 6 will render a circular hole as a hexagon, 8 will render a circular hole as an octagon.
    // Lower the number for faster rendering, raise the number for smoother rendering.


/////////////////////////////
//  Make the part
/////////////////////////////

difference(){ // Cam body cylinders minus cam back half, shaft notch, bumper notches, skeleton holes, and cam radius screw holes

    union(){ // Cam body cylinders

    // Cam lower half cylinder
translate([0, 0, - CamThick/4])
cylinder (h = CamThick/2 + 0.01, r1 = CamRadius + CamThick/2, r2 = CamRadius, center=true);

    // Cam upper half cylinder
translate([0, 0, + CamThick/4])
cylinder (h = CamThick/2 + 0.01, r1 = CamRadius, r2 = CamRadius + CamThick/2, center=true);

    } // End cam body cylinders
//

// Cam back half
translate([0, - (CamRadius + CamThick/2)/2 - 1, 0])
cube ([CamRadius * 2 + CamThick + 2, CamRadius + CamThick/2 + 2, CamThick + 2], center=true);

// Shaft notch
cylinder (CamThick + 2, d = ShaftNotchDia, center=true);

// Left bumper notch
translate([- BumperOffset, 0, 0])
color("purple")
cylinder (CamThick + 2, d = BumperDia, center=true);

// Right bumper notch
translate([BumperOffset, 0, 0])
color("purple")
cylinder (CamThick + 2, d = BumperDia, center=true);

// Left skeleton hole
rotate([0, 0, 120])
translate([BumperOffset, 0, 0])
color("green")
cylinder (CamThick + 2, d = BumperDia, center=true);

// Right skeleton hole
rotate([0, 0, 60])
translate([BumperOffset, 0, 0])
color("green")
cylinder (CamThick + 2, d = BumperDia, center=true);

// Cam radius screw hole 1
rotate([0, 0, CamRadiusScrewAngle1])
translate([0, CamRadius - CamRadiusScrewInset, 0])
color("orange")
cylinder (CamThick + 2, d = CamRadiusScrewDia, center=true);

// Cam radius screw hole 2
rotate([0, 0, CamRadiusScrewAngle2])
translate([0, CamRadius - CamRadiusScrewInset, 0])
color("orange")
cylinder (CamThick + 2, d = CamRadiusScrewDia, center=true);

// Cam radius screw hole 3
rotate([0, 0, CamRadiusScrewAngle3])
translate([0, CamRadius - CamRadiusScrewInset, 0])
color("orange")
cylinder (CamThick + 2, d = CamRadiusScrewDia, center=true);

// Cam radius screw hole 4
rotate([0, 0, CamRadiusScrewAngle4])
translate([0, CamRadius - CamRadiusScrewInset, 0])
color("orange")
cylinder (CamThick + 2, d = CamRadiusScrewDia, center=true);

} // End cam body cylinders minus cam back half, shaft notch, bumper notches, skeleton holes, and cam radius screw holes
//

difference(){ // Shaft collar hub minus shaft collar hole, shaft collar flange screw holes, and setscrew hole

// Shaft collar hub
cylinder (CamThick, d = ShaftCollarHubDia, center=true);

// Shaft collar hole
color("white")
cylinder (CamThick + 2, d = ShaftCollarOD, center=true);

// Shaft collar flange hole 1
rotate([0, 0, 45])
translate([0, ShaftCollarFlangeScrewOffset, 0])
color("blue")
cylinder (CamThick + 2, d = ShaftCollarFlangeScrewDia, center=true);

// Shaft collar flange hole 2
rotate([0, 0, 135])
translate([0, ShaftCollarFlangeScrewOffset, 0])
color("blue")
cylinder (CamThick + 2, d = ShaftCollarFlangeScrewDia, center=true);

// Shaft collar flange hole 3
rotate([0, 0, 225])
translate([0, ShaftCollarFlangeScrewOffset, 0])
color("blue")
cylinder (CamThick + 2, d = ShaftCollarFlangeScrewDia, center=true);

// Shaft collar flange hole 4
rotate([0, 0, 315])
translate([0, ShaftCollarFlangeScrewOffset, 0])
color("blue")
cylinder (CamThick + 2, d = ShaftCollarFlangeScrewDia, center=true);

// Setscrew hole
rotate([0, 0, ShaftCollarSetscrewAngle])
translate([0, - ShaftCollarHubDia/2, - CamThick/2 + ShaftCollarSetscrewHeight])
rotate([90, 0, 0])
color("red")
cylinder (ShaftCollarHubDia, d = ShaftCollarSetscrewDia, center=true);

} // End shaft collar hub minus shaft collar hole, shaft collar flange screw holes, and setscrew hole
//

difference(){ // Screw mount block minus spring hole

// Screw mount block
translate([CamRadius - ScrewBlockX/2, - ScrewBlockY/2, 0])
cube ([ScrewBlockX, ScrewBlockY + 0.01, CamThick + 0.01], center=true);

// Spring hole
translate([CamRadius - ScrewBlockX/2, - ScrewBlockY/2, 0])
color("aqua")
cylinder (CamThick + 2, d = SpringHole, center=true);

} // End screw mount block minus spring hole
//

Test rig confirms that this combination of cam and spring should work well together.
- Mounting the spring just 10mm past the zero tension point provides enough tension to always return the potentiometer to minimum when the lever is released so it is good on the low end of the tension range.
- Looks like the spring, cam, and potentiometer work well together throughout the 180 degree range of motion.

Bad news:
The M3 setscrews for the flange shaft coupler can't maintain tension against the shaft during the mechanical stresses involved in this application.
- This weakness is due to a combination of short setscrew length, thin side walls, and very loosely cut female threads.
- It takes less than a dozen half-power twangs on the lever arm for the setscrew to work it's way loose.   :banghead:
- AFAIK the only way around this is to drill into the shaft and use a longer M3 screw in place of the setscrew.
- I could drill a 3mm hole in the shaft that's 3 or 4 mm deep, but the screw might eventually work it's way loose.   :-\
- Worst case, I drill all the way through the shaft and use a 12mm M3 screw and locknut to attach the flange coupler to the shaft.
------------------------------------------
Next steps are to make a hardware store run and write the code for the mount plate and bottom plate.


Scott