Use PWM as Measurement Tool in Calibration

I have read through a few of the calibration threads; without too much detail. I saw several comments indicating that the ability of the individual to accurately measure (the length of a cut, or the distance between holes, etc) limits the achievable accuracy of the calibration. I had an idea. Since the Maslow uses PID to control the router position, there is a mechanism for feedback within the software. Specifically, if you place something that obstructs the motion of the router-base, the location of this obstruction could be determined by the (assumed) location of the router-base when it contacted the obstruction. The PWM signal would jump when the base contacted the obstruction. This could be useful in several ways within a calibration; spanning from very simple to very comprehensive.

The simplest implementation could be a simple linear validation. A person clamps a level to the top of the Maslow. The controller moves the router base to the far left of the 4X8 work area, and slowly raises the base until it contacts the level. When contact is made, it’s location is detected by a jump in the PWM signal. The software records the location of this contact. This process is repeated in the center and right side of the work area. If the calibration is accurate, the three contact points should form a line.

The general philosophy could be extended into more of a calibration. There are methods related to Foundations of Mechanical Accuracy. Imagine a long, straight, horizontal part is cut from a piece of plywood. This piece is then flipped vertically, clamped horizontally across the workspace, and its straightness could be measured using a method similar to the above described process. Any curvature would be flipped upside-down, enabling quantification of curvature.

Depending on how accurately this contact location can be detected, this could also be used to estimate stiffness. The longer the chain, the less stiff the system, the slower the jump of the PWM signal.

I will not have a Maslow for another few months, so I cannot try this on my own, but I wanted to share the idea to see if anyone had tried it, if it is needed, if it will work, etc.



This is a very interesting idea.

I think the obstruction would have to be substantial, because the PID processes are quite noisy when you look at them. Also, with all of the gearing ,~290:1, it also means there is a lot of torque available all the time. Sadly, we don’t have any current feedback, so we don’t know how many amps the motors are using. That would probably get you exactly what you want.

The functional result could be a bit violent to watch. Or I could be over estimating things, it is certainly an interesting concept.


I could see this detecting going straight up in the middle, but the problem you will run into in general is that when the sled hits something it deflects rather than stops and forces the motor to work harder

1 Like

You have the GPIO you use for auto z axis. Could that not be used here?

Edit: You could mount a simple contact switch at the top of the sled so that it closes when it touches something. That could be plugged into the GPIO to let the controller know it touched-down.

1 Like

The G38 code has variations like that, but only the G38.2 for the Z axis has been implemented here.

1 Like

Yes, but it’s possible to reuse the code in a calibration routine. There’s really nothing special about it (i.e., checkForProbeTouch).

That makes sense. It bypasses the uncertainty of whether or not the PWM sensing technique would work. At least it would be more accurate. It would be an additional setup item, though.

For some reason, I was thinking the PWM signal was analogous to a sensed current.

Even though the PWM technique may not work, I am interested to know if using a form of touch-sensing (PWM technique and electrical contact sensor are two options) to improve the accuracy of measured locations is a value-add. In other words, given the developments using triangulation and other calibration efforts, is there any need to improve calibration accuracy?

the problem with trying to use a sensor for the sled position is that the sled
is round and can tip, so positioning the sensor is hard, and you only know what
tripping the sensor means if you know the length of the other chain.

as a thought excercise, assume that you don’t know where the sled is, what
movement is it safe to make with either motor that won’t run the risk of

  1. pulling the sled apart between the motors
  2. run a chain off of the motors

Can use similar bumper sensors like on a robot lawn mower :grinning:

Couldn’t you do it manually? Just move up till it touches and just push a button on the screen? You could put a piece of paper between the sled and the level/strip of plywood and move it a bit, that way you feel exactly when it touches.

1 Like

you could, but how do you know where the strip is with sufficient accuracy?