How to force a stepper driver into full step position?
-
@bot said in Any way to tell when motor is on full step?:
Isn't an axis flagged as unhomed when the microstepping is changed?
@DocTrucker said in Any way to tell when motor is on full step?:
That's not so much and issue. Something like the following should work...
G1 X0 Y0 Z30
M18
[enable drives?]
G92 X0 Y0 Z30I find the G92 trick worth remembering for machine commissioning of if you've been daft enough to modify a carriage and not consider if it can still hit the limit switch.
That has never happened to me...
@Danal the change microstepping may just do it for the D3 board. I'll have to get that together and running before my little one gets kicked out of nursery on Monday!
Odd there's no apparent counter to M18 though. I wonder if it is triggered by something else, or if M18 is more like a 'switch state' than an enable.
Edit: Excuse the subject change! Matches the conversation now.
-
@DocTrucker Can't you just run with no microstepping and maybe alter your test procedure to suit? No sure what exactly your repeatability test is aiming to do but if you have a grid of objects, then each time you print then, they should be the same. Individual objects might be slightly different sizes and the spacings between them might vary but that variation should be the same each time you print.
Alternatively, assuming you use 80 steps per mm @16x then you'll have 5 full steps per mm or 0.2 mm per full step. If you design your test parts multiples of 0.2 mm in size with spacings between them also multiples of 0.2mm, wouldn't that work?
Just some random thoughts because I don't know what the goal is.
-
@deckingman Morning Ian! I'm avoiding the tempation to go down discussing experimental plan in too much detail as that's a big can o' worms. Bare with me here as I am writing it up, and will share in due time. If I try and defend/discuss the work off the cuff I won't do myself or the work justice.
These are preliminary tests that I have started simple and am gradually increasing adapting the test geometry, and procedure in order to reduce measurement errors as far as practical.
In the first post I mentioned about forcing the positioning if the parts to be integer multiples of the full step size. Hopefully this will reduce the effect of microstep inaccuracies across one build. But unless I queue build after build without resetting the machine I can't escape needing to home which may result in a specific co-ordinate of the bed being in a subtly different absolute angle of the stepper than a subsequent build. One valid response would be to improve the limit sensing if that is the case, and the other is a cheaper route which is forcing a specific co-ordinate to be at a whole step position for the motors.
That said first test this morning will be testing my limits to determine how repeatable they are!
Other factors that are on-the-shelf for consideration in this body of work are:
- Local bed temperature variations caused by heater or the use of glass bed (/ another) surface
- Differences in x and y axis - ie mass.
- Belt tensions and inconsistencies between axis.
- Sticking points on the axis.
- Variations in filament diameter - ie manufactures specified tollerance.
That's just the tip of the potential causes. The stepping is the one I'm trying to investigate right now.
Ultimate aim of work? Develop a simple procedure that can optimise achievable tollerance and accuracy for a machine. Not as trivial as you might expect as part geometry, cooling rate, and even extrusion velocity is likely to have an effect on shrinkage - polymers are weird...
-
...just a final clarification on the previous post. This work is about identifying and fixing identified problems without doing the throw money at it/developer gold plating approach.
I've found strong indications that I had positional related effects on the size of parts. I'm now working theough a list of potential causes - one by one - to try and identify the cause, or causes until there is little.indication of positional related effects on accuracy.
I'm interested to benchmark what this system is capable off then compare it to another format such as core xy or improve it with controller or physical changes.
-
Ok, got the machine powered up and checked.
M18 is not a switch command it is definitely a disable command. I checked the machine and you could definitely move the steppers easily after issuing M18.
However, the home all command worked fine after M18 with the steppers moving and the process completing.
The following process seems to work fine and the machine is flagged as homed after:
G1 X0 Y0 Z0 M18 G92 X0 Y0 Z0
I've moved the machine to touching the nozzle on the bed to increase the resistance against dropping the bed. But that said I'm using 1mm pitch lead screws, so the chance of a major movement is minimal. Yes my first layer may be a little crap but I've designed the test geometry so that the measurement point is well above the section of the part that is likely to suffer the 'elephant foot' and between any significant changes in section such as the upper and lower solid areas or any change in XY section in the Z direction.
Next challenge is a deep dive into slic3r in order to directly specify the part locations of 16 parts. That's one LONG command line string!
-
@DocTrucker said in How to force a stepper driver into full step position?:
I'll read the driver docs about what happens when the current drops down then comes back up. I would have expected it to come back to the same point in the cycle, as the chip itself isn't powered down?
That's correct AFAIK. Disabling the the driver only disables the output stage. Whereas removing VIN power and reapplying it will reset the chip.
-
@dc42 Ahh ok, my responce there was my thoughts that dropping current to 0 and increasing may not do it, rather tham M18. Just to be clear you are saying M18 may not reset the chip either?
-
Confirmed for the A4982 drivers of the Duet v0.6 and 0.8.5, a power cycle will be needed. Cycling reset could achieve the 'reset to home position' but that is hard wired on the v0.6 & v0.8.5 to the 3.3V line. I've not looked over the Duet3 or Duet2 drivers spec sheets. I guess there may be an SPI command that could achieve the reset but as the use cases are limited to probably just my test it's not worth a feature request.
-
@DocTrucker I'll leave you to it then. But for info in the past, I have thought about using a machine DRO (digital readout) as a secondary means of measuring the actual print head (and or build plate) position. I've just ordered a 3 axis kit for my milling machine from Ebay for a little over £200 from China. It's exactly the same as those supplied by UK machine suppliers for 2 or 3 times the price. Claimed accuracy is something like 5um (0.005mm) so even if that's out by 10 fold then the "real accuracy" might be 0.05mm. If your budget is really tight, you can pick up a 150mm digital caliper off Ebay for £3 or £4 and chop that up - I've seen people do that as a cheap way of getting a DRO on a lathe tailstock quill. I don't really know what you are doing though, so just ignore this post if none of it is relevant.
-
@deckingman Cheers for the hints. I will invite more scrutiny of the work in the future but it is far too early to do so at the moment, I just wanted to test the set at full step for effectiveness but had no idea on how to achieve that.
In a nutshell for those still reading it is set the head to a known position, power cycle, define the current position as the previously set position using G92. Yes there will be some settlement of the drivers, but that is kind of the point!
-
When the drivers are disabled (which you can do with M18), M569 will report the current microstep position. This value isn't yet included in the object model.
-
Do any of the TMC driver options come with interpolation enabled on full step operation? That would be ideal for this purpose? I think gecko has a driver that does 1/10 interpolation while always keeping your motor on full step (so you have precision) but I am not sure, anyhow 1/256 interpolation on full step (or half step) movement would be ideal.
-
MicroPlyer Microstep interpolator for obtaining full 256 microstep smoothness with lower resolution step inputs starting from fullstep
The 5160 has it, think the 2209 as well
-
Isn't that a solution then?
-
When the driver is disabled, it's possible to read the microstep counter of a driver using the M569 command with just a P parameter to specify which drive.