Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X gantry squaring process, perhaps something for a wizard in IOSender? #392

Open
5ocworkshop opened this issue Jun 30, 2024 · 5 comments
Open

Comments

@5ocworkshop
Copy link

Hi Terje,

I'm afraid it has been almost a year since my move and I am still trying to find workshop space so my tools are in storage and I am still between machines. I see the project has continued to grow in leaps and bounds. Nice work.

I wanted to share a short PDF I prepared back at my old workshop that details how to use a probe and a corner block to square the X gantry to the Y rails on a CNC machine using math and the machine itself to measure the deviation. I realize there are multiple ways to get close to square but this is deterministic and easily repeated. And it should result in virtually perfect square (it did for me and others who have tried it). The docs are for grblHAL and IOSender. I added it to github here: https://github.com/5ocworkshop/squarecnc

Perhaps an idea for a future wizard in IOSender?

@phil-barrett
Copy link
Collaborator

phil-barrett commented Jun 30, 2024

Nice. Using probing to help square the machine is a great idea.

One thing, when you cut the pocket with an unsquared machine, the pocket will be a parallelogram. Probably close to a rectangle. Inserting the probe base into the pocket will likely not have the Y Sides of the probe precisely parallel to the Y Axis. So, you may need to oversize the pocket and make sure that the Y axis is pressed firmly against a Y side of the pocket.

I think the distance between the screws (your triangle "height") should actually be the distance between the sensor contact points. The sensor targets on my Avid are about 10 mm from the rack (no Y screws, rack and pinion) so measuring between the rails would be off by 20mm or 20/1250 (1.6%).

Also, a small typo - you wrote the distance between your Y rails is 1248 and in the calculator you used 1428.

[edit] By the way, you could also use a 1-2-3 Block instead of a fancy probe. That is more likely to be square.

@phil-barrett
Copy link
Collaborator

On a wizard (or probe panel). I like the idea. It should also support 3D touch probes.

@5ocworkshop
Copy link
Author

Nice. Using probing to help square the machine is a great idea.

Thanks. It always struck me as strange that we have these high precision measuring machines and then people use things like jogging and dropping a pin in a hole to try and solve this issue.

One thing, when you cut the pocket with an unsquared machine, the pocket will be a parallelogram. Probably close to a rectangle. Inserting the probe base into the pocket will likely not have the Y Sides of the probe precisely parallel to the Y Axis. So, you may need to oversize the pocket and make sure that the Y axis is pressed firmly against a Y side of the pocket.

It has been quite a while since I did it (I'm without a machine at the moment) but I used MDF on purpose to ensure I have a little bit of give on the insertion. As I recall it went in fine but was difficult to get out. I took the MDF off the machine and pressed it through IIRC.

I think the distance between the screws (your triangle "height") should actually be the distance between the sensor contact points. The sensor targets on my Avid are about 10 mm from the rack (no Y screws, rack and pinion) so measuring between the rails would be off by 20mm or 20/1250 (1.6%).

I've been thinking about this since I saw your comment. In relation to a ball screw driven machine, the carriages on the Y axis are centered on the ball screw and represent the mechanical anchor points of the X gantry so using that centerline will result in the adjustment to get, conceptually, to perfect mechanical square. (my typo that you note below aside, thanks for catching that.)

I'm not familiar enough with the mechanics of your rack and pinion driven machine, but I would think you still ultimately want the centerline of the mechanics of the axis for use in the calculation.

Also, a small typo - you wrote the distance between your Y rails is 1248 and in the calculator you used 1428.

I'll see if I can find the original word doc and fix that. The larger value is the correct value (the one I used in the calculation) for my particular machine. My machine is a bit odd, it has more X and Y travel as it was a custom build.

[edit] By the way, you could also use a 1-2-3 Block instead of a fancy probe. That is more likely to be square.

You are correct, a 1-2-3 block would be the typical thing to use (I thought I mentioned that in the doc?) but I don't have one, and the corner probe I had was custom made for me on a professional mill so I was pretty comfortable with the squareness and finish.

I hope this helps someone new setting up a machine or calibrating their machine. The fact it is deterministic and returns measured values really appealed to me.

@5ocworkshop
Copy link
Author

I couldn't resist feeding the PDF to Claude 3.5 Sonnet and asking how it would work for rack and pinion driven systems. I have no idea if this is correct but if you want to give it a go and let us know I can update the document to make it useful to a wider audience:

"Excellent question! Applying this concept to a rack and pinion drive machine requires some adaptation, but the underlying principles remain similar. Let's break down how this would work:

  1. Fundamental Difference:
    In a ballscrew system, the linear motion is directly related to the rotation of the screw. In a rack and pinion system, linear motion is created by the rotation of a pinion gear along a fixed rack.

  2. Measurement Points:

rack-pinion-diagram

Instead of measuring between ballscrew centers, you would measure:
a) The distance between the centers of the two pinion gears that drive the gantry along the Y-axis.
b) Alternatively, you could measure between the points where the pinions engage with the rack, which should be equivalent.

  1. Probing Process:
    The probing process to determine the angle of misalignment would remain the same as described in the original document.

  2. Calculation:
    The trigonometric calculation would be identical. You would use:

    • The angle measured by the probe
    • The distance between pinion centers (or engagement points)
  3. Applying the Correction:
    In a rack and pinion system, the correction would be applied by:
    a) Adjusting the position of one pinion gear relative to the other along the rack
    b) This might be done through a software offset, similar to the ballscrew system
    c) Some systems might allow for mechanical adjustment of one pinion's position

  4. Considerations Specific to Rack and Pinion:

    • Backlash: Rack and pinion systems can have more backlash than ballscrew systems. This might require additional considerations in the probing process or when applying the correction.
    • Gear Mesh: The quality of the gear mesh between the pinion and rack can affect accuracy. Ensure the system is well-maintained and properly adjusted.
    • Rack Straightness: The straightness of the rack itself is crucial. Any deviation in the rack could introduce errors in the squaring process.
  5. Implementation:

    • The software implementation (like in grblHAL) would need to support offsetting one side of the gantry in a rack and pinion system.
    • The exact method might vary depending on the control system used.
  6. Verification:
    After applying the correction, you would verify the squareness using the same probing method as in the ballscrew system.

In essence, the core concept of measuring the misalignment and calculating a correction remains the same. The main differences lie in the physical points of measurement and potentially in how the correction is applied. The rack and pinion system might require more frequent checking and adjustment due to its mechanical characteristics, but the principle of squaring the gantry using probing and trigonometry is equally applicable."

@phil-barrett
Copy link
Collaborator

R&P vs Ball Screw doesn't matter. It is the measurement points of the sensors since that is what grblHAL is offsetting from. The sensors form one leg of the triangle, not the anchor points.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants