Main > Main Forum

World Series Baseball 99 - Arcade Build HELP!!

Pages: << < (5/9) > >>

Nitro0602:

Sorry I meant one joystick to aim/move cursor  and another for the spring loaded bat

Nitro0602:

Forgot to mention… could I use the joystick you posted below for the bat or was to aim with it?



--- Quote from: PL1 on May 18, 2022, 06:08:34 pm ---
--- Quote from: Nitro0602 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?

--- End quote ---
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

--- End quote ---


PL1:


--- Quote from: Nitro0602 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?

--- End quote ---

--- Quote from: PL1 on May 18, 2022, 06:08:34 pm ---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.



--- End quote ---
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:

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:

Here's a first draft version of the "hub and bat" code for the above-the-panel part of this controller.


--- Code: ---// 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
//

--- End code ---

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

Pages: << < (5/9) > >>

Go to full version