Ok, I understand better what you are trying to do here. I think we are pretty
close
I think we have a more accurate measurement of the distance between the motors
than the sled rotation radius, so I would want to measure motor distance and
calculate rotation radius rather than the other way around.
In an earlier discussion the possibility that the motors are not centered on the
work area was raised. I’d also like to avoid having people enter in machine
dimensions at all if we can.
I believe that we can do this by:
-
say that one of the locations is 0,0 (or possibly as close to this as a full
tooth movement allows so that the chains can be marked for this location) -
have the user manually move up/down/left/right to mark out the
limit of the allowable space
We then don’t need to have them measure/input anything other than the distance
between the two cuts.
I think it would be interesting to test this in two ways
-
Low Precision, Long Baseline
use as large a distance as possible with a tape measure (I’m good with
requiring this measurement be done in mm, even in the US most new tape measures
cover metric as well as imperial). -
High Precision, Short Baseline
use a small distance (about 6") so that a high precision measurement can be
made with a cheap electronic caliper
It would be interesting to see which approach is more accurate and easier to do
(and it may be worth offering both options and letting the user specify)
So where you list the steps as:
- Enter sled rotation disk radius and validate Machine Parameters are
correct - Calibrate chain lengths, then connect chains to sled
- Move sled vertically only to top of work space and make first cut/mark
- Record programmed chain length for first cut/mark below
- Move sled vertically only to bottom of work space and make second
cut/mark - Record programmed chain length for second cut/mark below
- Measure the distance from the top of the workspace to the centerpoint of
the first cut/mark and record below - Measure the distance between centerpoints of the first cut/mark and the
second cut/mark and record below
I think it should be.
- if using non-standard motors/gears enter:
- stepsPerRotation
- link size
- sprocket tooth count
- measure the distance between the motors using the chain
- adjust the chain lengths to attach to the sled in the center of the work area. Mark the chains for this location.[1]
- do one small cut/mark
- move vertically as much as possible and still be in the work area
- do a second small cut/mark
- move the sled out of the way
- measure the distance between the cuts and enter it into the software
- move to the top/left corner and tell the machine we are at the limit there
- move to the bottom/right corner and tell the machine we are at the limit there.
- trace the full boundry of the work area to confirm everything is clear (possibly in both directions). This is sort of a ‘victory lap’, but it’s also a valid confirmation that the sled doesn’t hit anything or fall off anywhere along the way.
This only requires one measurement to be entered, the distnce between the cuts.
It also only requires three positions to be tagged (home and two corners), no
matter what the machine size is.
Since there are two unknowns here, I as thinking that we can’t just guess an
iterate to find the right answer (that’s why I took the more mathamatical
approach). But if we can, that is great (given that this only needs to happen
once, it doesn’t matter if it takes 1000 interations of 10,000 iterations, we
are talking seconds at most. Have it output what it thinks it’s accuracy is
every few hundred iterations so we can show a progress bar
If we can do this, I would not implement this calibration in GC, but rather in
the firmware. That way we can use literally the same code to do the calibration
calculations that is used to do the calculations during movement. (and the fact
that this is done in C will probably mean it’s faster than Python in GC, even on
a faster desktop)
If we need to, we can add a third mark (down from center) as a sanity check,
with three points and only two unknowns, I know we can calculate the unknowns.
David Lang
[1] this is a couple of steps as far as the user is concerned, but only one as
far as the machine is concerned because they all move both motors the same
amount ane they can be done on one screen without any prompts other than chain
movement.
First feed out a guess of the right length, then allow the user to adjust the
lengh by a multiple of one tooth movement until it’s convienient to attach the
sled, then move (again by multiples of one tooth) until the sled is in the
center of the work area
We don’t care when during this process the sled gets attached.