Main > Main Forum

Trackball Resolution

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

Ropi Jo:

Thanks again Scott.

Excuse me for being a bit thick please.


--- Quote from: PL1 on October 22, 2022, 12:46:36 am ---
When you flip a mouse on it's back with the "tail" toward you and mount a ball over it, the X-axis works right but the Y-axis is reversed.

Reversing an axis is easy with optos -- you just swap data lines A and B.

Two possible approaches to reversing an optical mouse axis:
- The easy way is to reverse the axis in MAME. (Analog Controls -- Track Y Reverse)  Obviously, this doesn't work outside of MAME.
- The hard way is to modify the optical mouse circuit like StefanBurger did.


Scott

--- End quote ---

I'm not sure that he did mod the mouse in that way. He brings the curser to the middle of the screen using a mouse out of screen shot, and then takes over with the trackball. The curser then does not follow his trackball movements and he takes over again with the off screen mouse.

Only when he goes into mame does the trackall work as required so he must me relying on the mame settings.

Unless I'm seeing it wrong.

But, it's still great. His resolution looks miles out but assuming he can put that right in the game settings.

Intresting that some mice work better on the smooth surface than others. I've got a box of old mice so hopefully I'll find one that fits the bill.



--- Quote from: PL1 on October 22, 2022, 12:46:36 am ---
Would a USB mouse get lost by hot swapping?

No, assuming your trackball panel doesn't have two trackballs or a trackball and a spinner or two.
- By default, Windows adds similar axes so a mouse and a trackball can both control a single cursor.  For example, moving the mouse 5 steps right while moving the trackball 2 steps left moves the cursor 3 steps right.
- As long as you only need one of each axis for gameplay you're fine.

You can keep Windows from adding similar axes by using raw inputs ("-multimouse" option in MAME), but you might run into the Windows device renumbering issue.


Scott

--- End quote ---

The 2 spinners are on another CP and wire to the optipac and work perfectly. This CP will have only the single trackball, and theres no other mice anywhere. Can you confirm if I need multimouse ON or OFF, and if the desired option will stop windows messing with the USB ports?

EDIT..... Forgot this...... for getting out of trouble if things get messed up I planned to have a bluetooth KB inside the coindoor, with built in scroll pad. The USB reciever would be permanently connected to the mobo. Would this cause any issues?

Thanks again.


PL1:


--- Quote from: Ropi Jo on October 23, 2022, 04:45:42 am ---
--- Quote from: PL1 on October 22, 2022, 12:46:36 am ---- The hard way is to modify the optical mouse circuit like StefanBurger did.

--- End quote ---
I'm not sure that he did mod the mouse in that way. He brings the curser to the middle of the screen using a mouse out of screen shot, and then takes over with the trackball. The curser then does not follow his trackball movements and he takes over again with the off screen mouse.

Only when he goes into mame does the trackall work as required so he must me relying on the mame settings.

Unless I'm seeing it wrong.

--- End quote ---
D'oh!  You are seeing it right.  I remembered wrong.   :banghead:  :embarassed:

He didn't natively fix the inverted Y-axis.

There should be a way to natively invert the Y-axis since optical mice and optical trackballs use the same types of sensors, but doing that mod would depend on researching the specific sensor/chipset/PCB.   :dunno


--- Quote from: Ropi Jo on October 23, 2022, 04:45:42 am ---Intresting that some mice work better on the smooth surface than others. I've got a box of old mice so hopefully I'll find one that fits the bill.

--- End quote ---
Most regular mice are poor candidates because the IPS (inches per second) rating is way too low.
- Related post here.

Gaming mice like the Logitech M500 or the one that StefanBurger recommended in the other thread are much better candidates.

If you want to test your various mouse and trackball combinations, I updated the parametric 3d printable testbed posted in the other thread to use hardware like this:
- 3x6x2.5mm bearings like these. (3 ea.)

- M3 x 20mm screws like these. (3 ea.)


45 and 30 degree testbed .STL files: http://forum.arcadecontrols.com/index.php?action=dlattach;topic=164992.0;attach=392227
- Haven't tried the 30 degree one, but it should be better than the 45 degree one. (less likely for the ball to fall out)

Here's the parametric OpenSCAD code in case you want to adjust the variables for trackball size, clearance, angle of contact, etc.
- To see the bearing placeholder, change "*cylinder" (disable cylinder -- doesn't include it in the render) on line 46 to "cylinder". (regular cylinder -- includes it in the render)
- To see the trackball placeholder, change "*sphere" on line 51 to "sphere".
- Disable both of these before you do the final render and output to .STL.


--- Code: ---// Trackball Test for Roller Bearings V2 (hex base)

/////////////////////////////
//  Define variables
/////////////////////////////
TBDia = 57.15; // Trackball Diameter 2.25" = 57.15mm  3" = 76.2
VertWiggleRoom = 1; // Vertical wiggle room so TB clears base/sensor

HexRadius = 39.7; // Hex base radius
HexHeight = 11; // Hex base height
HexBlockSupportHeight = 4.5; // Hex bearing block support height
HexThick = 5;   // Hex base wall thickness

SROD = 73.7; // Support ring outer diameter
SRID = 40; // Support ring inner diameter
SRH = 3; // Support ring height

BBAngle = 30; // Bearing Block Angle (degrees below horizontal where the bearing makes contact with the trackball)
BBHeight = 4.5; // Bearing Block Height
BBDepth = 16; // Bearing Block Depth
BBWidth = 9; // Bearing Block Width
BBOffset = -3; //Bearing Block Top Offset from center
BBBaseDepth = 12; //Bearing Block Base Depth
BBBaseOffset = 20; //Bearing Block Base Offset from center

BearClear = 1; //Bearing clearance
BearID = 3.1; // Bearing inner diameter
BearOD = 6; // Bearing outer diameter
BearWidth = 2.5; // Bearing width

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

//Bearing placeholder
color("red")
translate([0, 0, TBDia/2+VertWiggleRoom])
rotate([-BBAngle, 0, 0])
translate([0, TBDia/2+BearOD/2, 0])
rotate([0, 90, 0])
*cylinder (BearWidth, d = BearOD, center=true);  // Use "*" to disable bearing placeholder
// "*cylinder" disables it rendering it invisible, "cylinder" enables it rendering it visible.

// TB placeholder
translate([0, 0, TBDia/2+VertWiggleRoom])
*sphere (d=TBDia); // Use "*" to disable TB placeholder
// "*sphere" disables it rendering it invisible, "sphere" enables it rendering it visible.

// Hex base
hull() { // Hex side 1
    rotate([0, 0, 330])
    translate([0, HexRadius, HexHeight/2+HexBlockSupportHeight/2])
    cylinder (HexHeight+HexBlockSupportHeight, d = HexThick, center=true);

    rotate([0, 0, 30])
    translate([0, HexRadius, HexHeight/2+HexBlockSupportHeight/2])
    cylinder (HexHeight+HexBlockSupportHeight, d = HexThick, center=true);
    }// End hex side 1
//
hull() { // Hex side 2
    rotate([0, 0, 30])
    translate([0, HexRadius, HexHeight/2])
    cylinder (HexHeight, d = HexThick, center=true);

    rotate([0, 0, 90])
    translate([0, HexRadius, HexHeight/2])
    cylinder (HexHeight, d = HexThick, center=true);
    }// End hex side 2
//
hull() { // Hex side 3
    rotate([0, 0, 90])
    translate([0, HexRadius, HexHeight/2+HexBlockSupportHeight/2])
    cylinder (HexHeight+HexBlockSupportHeight, d = HexThick, center=true);

    rotate([0, 0, 150])
    translate([0, HexRadius, HexHeight/2+HexBlockSupportHeight/2])
    cylinder (HexHeight+HexBlockSupportHeight, d = HexThick, center=true);
    }// End hex side 3
//
hull() { // Hex side 4
    rotate([0, 0, 150])
    translate([0, HexRadius, HexHeight/2])
    cylinder (HexHeight, d = HexThick, center=true);

    rotate([0, 0, 210])
    translate([0, HexRadius, HexHeight/2])
    cylinder (HexHeight, d = HexThick, center=true);
    }// End hex side 4
//
hull() { // Hex side 5
    rotate([0, 0, 210])
    translate([0, HexRadius, HexHeight/2+HexBlockSupportHeight/2])
    cylinder (HexHeight+HexBlockSupportHeight, d = HexThick, center=true);

    rotate([0, 0, 270])
    translate([0, HexRadius, HexHeight/2+HexBlockSupportHeight/2])
    cylinder (HexHeight+HexBlockSupportHeight, d = HexThick, center=true);
    }// End hex side 5
//
hull() { // Hex side 6
    rotate([0, 0, 270])
    translate([0, HexRadius, HexHeight/2])
    cylinder (HexHeight, d = HexThick, center=true);

    rotate([0, 0, 330])
    translate([0, HexRadius, HexHeight/2])
    cylinder (HexHeight, d = HexThick, center=true);
    }// End hex side 6
//

// Bearing Blocks
    // Bearing Block 1
difference(){ // Block hull minus Bearing Hole, Bearing Slot, and Bearing Axle Hole

    hull() { // Block hull
        translate([0, 0, TBDia/2+VertWiggleRoom])
        rotate([-BBAngle, 0, 0])
        translate([0, TBDia/2+BBHeight/2+BearClear, BBOffset])
        cube ([BBWidth, BBHeight, BBDepth], center=true); // Block face

        rotate([0, 0, 0])
        translate([0, BBBaseOffset+(BBBaseDepth/2), 0.1])
        cube ([BBWidth, BBBaseDepth, 0.2], center=true); // Block base

    } // End block hull
//
        color("white")
        translate([0, 0, TBDia/2+VertWiggleRoom])
        rotate([-BBAngle, 0, 0])
        translate([0, TBDia/2+BearOD/2, 0])
        rotate([0, 90, 0])
        cylinder (BearWidth+0.5, d = BearOD, center=true); // Bearing Hole

        color("purple")
        translate([0, 0, TBDia/2+VertWiggleRoom])
        rotate([-BBAngle, 0, 0])
        translate([0, TBDia/2, 0])
        cube ([BearWidth+0.5, BearOD, BearOD], center=true); // Bearing Slot

        color("blue")
        rotate([0, 0, 0])
        translate([0, 0, TBDia/2+VertWiggleRoom])
        rotate([-BBAngle, 0, 0])
        translate([0, TBDia/2+BearOD/2, 0])
        rotate([0, 90, 0])
        cylinder (BBWidth+0.5, d = BearID, center=true); // Bearing Axle Hole
    } // End Bearing Block 1
//
    // Bearing Block 2
    difference(){ // Block hull minus Bearing Hole, Bearing Slot, and Bearing Axle Hole

    hull() { // Block hull
        translate([0, 0, TBDia/2+VertWiggleRoom])
        rotate([-BBAngle, 0, 120])
        translate([0, TBDia/2+BBHeight/2+BearClear, BBOffset])
        cube ([BBWidth, BBHeight, BBDepth], center=true); // Block face

        rotate([0, 0, 120])
        translate([0, BBBaseOffset+(BBBaseDepth/2), 0.1])
        cube ([BBWidth, BBBaseDepth, 0.2], center=true); // Block base

    } // End block hull
        color("white")
        translate([0, 0, TBDia/2+VertWiggleRoom])
        rotate([-BBAngle, 0, 120])
        translate([0, TBDia/2+BearOD/2, 0])
        rotate([0, 90, 0])
        cylinder (BearWidth+0.5, d = BearOD, center=true); // Bearing Hole

        color("purple")
        translate([0, 0, TBDia/2+VertWiggleRoom])
        rotate([-BBAngle, 0, 120])
        translate([0, TBDia/2, 0])
        cube ([BearWidth+0.5, BearOD, BearOD], center=true); // Bearing Slot

        color("blue")
        rotate([0, 0, 120])
        translate([0, 0, TBDia/2+VertWiggleRoom])
        rotate([-BBAngle, 0, 0])
        translate([0, TBDia/2+BearOD/2, 0])
        rotate([0, 90, 0])
        cylinder (BBWidth+0.5, d = BearID, center=true); // Bearing Axle Hole
    } // End Bearing Block 2
//
    // Bearing Block 3
difference(){ // Block hull minus Bearing Hole, Bearing Slot, and Bearing Axle Hole

    hull() { // Block hull
        translate([0, 0, TBDia/2+VertWiggleRoom])
        rotate([-BBAngle, 0, 240])
        translate([0, TBDia/2+BBHeight/2+BearClear, BBOffset])
        cube ([BBWidth, BBHeight, BBDepth], center=true); // Block face

        rotate([0, 0, 240])
        translate([0, BBBaseOffset+(BBBaseDepth/2), 0.1])
        cube ([BBWidth, BBBaseDepth, 0.2], center=true); // Block base

    } // End block hull

        color("white")
        translate([0, 0, TBDia/2+VertWiggleRoom])
        rotate([-BBAngle, 0, 240])
        translate([0, TBDia/2+BearOD/2, 0])
        rotate([0, 90, 0])
        cylinder (BearWidth+0.5, d = BearOD, center=true); // Bearing Hole

        color("purple")
        translate([0, 0, TBDia/2+VertWiggleRoom])
        rotate([-BBAngle, 0, 240])
        translate([0, TBDia/2, 0])
        cube ([BearWidth+0.5, BearOD, BearOD], center=true); // Bearing Slot

        color("blue")
        rotate([0, 0, 240])
        translate([0, 0, TBDia/2+VertWiggleRoom])
        rotate([-BBAngle, 0, 0])
        translate([0, TBDia/2+BearOD/2, 0])
        rotate([0, 90, 0])
        cylinder (BBWidth+0.5, d = BearID, center=true); // Bearing Axle Hole
    } // End Bearing Block 3
//

// Support ring
difference(){ // Outer cylinder minus Inner cylinder

translate([0, 0, SRH/2])
cylinder (SRH, d = SROD, center=true); // Outer cylinder

translate([0, 0, SRH/2])
cylinder (SRH+0.2, d = SRID, center=true); // Inner cylinder
} // End difference
//

--- End code ---


--- Quote from: Ropi Jo on October 23, 2022, 04:45:42 am ---The 2 spinners are on another CP and wire to the optipac and work perfectly. This CP will have only the single trackball, and theres no other mice anywhere. Can you confirm if I need multimouse ON or OFF, and if the desired option will stop windows messing with the USB ports?

EDIT..... Forgot this...... for getting out of trouble if things get messed up I planned to have a bluetooth KB inside the coindoor, with built in scroll pad. The USB reciever would be permanently connected to the mobo. Would this cause any issues?

--- End quote ---
You aren't going to accidently nudge a spinner during trackball play or vice-versa so you should be fine with multimouse OFF which eliminates the Windows device renumbering issue.
- The possible exception is if one of your spinners is on the Z-axis and you run into the Windows scroll wheel issue where 1 step on the scroll wheel = 4(?) steps.  IIRC raw inputs (multimouse ON) eliminates the scroll wheel issue.

Having a wireless keyboard with a trackpad hidden inside the coin door only becomes a problem if a mouse (the rodent variety) starts nosing around on the trackpad while you're trying to play a game.   :lol


Scott

Ropi Jo:

Scott you are a star.

I've got no idea what that code means or even refers to. You've got to remember the computer boat sailed and left me behind years ago. My son will make more sense of it I'm sure.

Before redesigning the trackball for the 3 bearing design (instead of 3 rollers / 6 bearings and encoder wheels) we'll try all the mice we have stashed in the PC junk box.There's some gaming mice in there with switchable resolutions. Plenty to try.

I'll have to buy more filament for his 3D printer, that's for sure!

I'll give an update ASAP, and I can't thank you enough.

Did I mention you're a star?

PL1:


--- Quote from: Ropi Jo on October 23, 2022, 02:28:54 pm ---Scott you are a star.

--- End quote ---
Glad to assist.   :cheers:


--- Quote from: Ropi Jo on October 23, 2022, 02:28:54 pm ---I've got no idea what that code means or even refers to. You've got to remember the computer boat sailed and left me behind years ago. My son will make more sense of it I'm sure.

--- End quote ---
It's OpenSCAD Constructive Solid Geometry (CSG) code that builds the part by applying math functions like union (U = addding), intersection (∩ = the overlap), and difference (- = subtracting) to basic geometric shapes like spheres, cubes, and cylinders.



You can download the OpenSCAD program here.

There's a very useful cheat sheet here with links to the user manual.

Check out this blog post for a quick overview and example of how OpenSCAD works.

The Instructable here is a must-read IMHO with info on CSG and OpenSCAD syntax that makes it easier to understand and apply the user manual.

Some quick things to understand the basics of the OpenSCAD code in this model:
- "//" indicates that the rest of the line is a comment.
- "sphere", "cylinder", and "cube" are self-explanatory.  The rest of the code on the line describes the radius, diameter, or the ([X, Y, Z]) dimensions of the shape.
- ";" is like Picard saying, "Make it so."  The semicolon tells the program to set the variable or make the shape at the current location+orientation.
- "rotate([10, 20, -30])" means rotate 10 degrees on the X-axis, 20 degrees on the Y-axis, and negative 30 degrees on the Z-axis.  If you start by looking straight forward and level, tilt your head 10 degrees up (X=10) then tilt your head 20 degrees to the right (Y=20) then turn your head 30 degrees counter-clockwise. (Z=-30)
- "translate([5, -10 ,TBDia])" means move 5mm right on the X-axis, 10mm toward you on the Y-axis, and the value of the variable "TBDia" mm up (or down if it is a negative value) on the Z-axis.
- A "hull" is like wrapping a rubber band around objects like these two cylinders.  The hull includes everything inside the rubber band, in this example the oval.
 


Scott

Daniel B.:

Following along. This is a sweet project!

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

Go to full version