When in PUMP mode, enbable sensorless z axis probing

Suggestion / Idea: When in PUMP mode, add G CODE command for sensorless Z axis stallguard probing - Maybe SEEKZ or something like that. This way, once object location x,y identified, the pneumatic picker could seek downward to establish contact with an object. Once established due to stall guard event, return OK. Then we could call PICK and move the arm.

This would allow the arm to pick up objects of different sizes and heights, leveraging the stallguard sensorless homing normally associated with bed leveling to be used for the picker.

Disallow this command if not in PUMP mode.

Hi Inzi,

Thanks for your feedback and suggestions!

Actually, we’ve developed and tested that feature but the TMC2209 chip has a sensitive stallguard value and it’s really difficult to get the perfect stallguard value.

We will try to add this mode in the next version of firmware but users need to tune the stallguard value deeps on their applications.

Can you share code with me, or tell which branch on GitHub has it? Perhaps I can tweak and modify, provide an abstraction and issue a pull request.

I’m a c# and Python software developer l, but new to this project.

Just talked with our hardware engineer @duzhipeng, and he said that he has put that code into the main branch. He will post a document here later to show you how to get started it.

Hi
Please refer this link:

Ok, I’ve gone through this, trying to determine exactly how to use this.

In pseudocode - would I do it this way?

Store original Home (x,y,z).
Move arm over target.
Begin seek:
Set home to current x,y,z.
Move arm on Z axis downward 10mm.
Repeat seek until stallguard is triggered.
Move arm down 5 mm.
Engage pneumatic pump.
Reset home position to original.
Move arm up and to location to place item.
Begin seek:
Set home to current x,y,z.
Move arm on Z axis downward 10mm.
Repeat seek until stallguard is triggered.
Release pneumatic pump to place item.
Move arm up.
Repeat this process until all items have been moved, determining completion by z axis being zero.

From what I can tell in the code, when stall guard is trigger, the arm returns to “home” position?

Thus, if set home, then move down, and if stall guard is not tiggered, use that as my new “home”, I should be able to get the dex arm to pick up a stack of coins, poker chips, or whatever, without having to the specific height of the stack?

How can I adjust the stallguard sensitivity to test different scenarios?

For example, I may want the sensitivity higher while seeking, then insensitive or outright disabled while relocating an object to another location.

Storing the original home location and moving the arm I understand how to do in GCode.

What is unclear is how to use G28 to take advantage of the stallguard to attempt what I’m trying to accomplish.

Thanks for any tips you may be able to provide.

After a bit more reading of this:
Marlin_For_DexArm/G28.cpp at DexArm_Dev · Rotrics-Dev/Marlin_For_DexArm (github.com)

It seems like what I need to do is enhance this module to do something different.

The stall guard endpoint determinations seem to be in only one direction, and related to bed leveling.

For Z homing in a negative direction, what I would need to add to the code is a method where I would do a G28 C. Then, I’d need to reverse the process with something like G28 -C (for example). This would do exactly what G28 C does, but taking Z downward.

I fear the stallguard would be unable to detect this, however? As the stallguard triggers on endpoints, and what I’m trying to do is detect the resistance by the spring in the pneumatic effector.

Thus, I’d also need to add a method to adjust the sensitivity of stallguard detection programatically.
This indicates that I’d also need a method to “reset” stallguard to defaults.

I see they’re currently set to 60. Likely 8 was much too, low? However - these appear to be hard coded.

Am I on the right track?

Hi
M914 TMC Bump Sensitivity

That reports 60 on all axis, but does not accept changes?

Sorry - my mistake. It accepts. Trying different values to trigger a stop.

M914 Z0 sets sensitivity to 0 (the lower the number, the more sensitive based on documentation) doesn’t cause a stop.

Does this only work when bed leveling?

My goal is to tell the arm to move down and when it encounters resistance stop, at which point I’ll reset the sensitivity, then enable the pneumatic.

When moving, I see the debug message of busy, processing - so it’s moving. It just doesn’t stop.

I also tried M914 Z255.

Moving Z axis down actually lifts the dexarm.

My goal is to have either a vision detected or stack of objects, and once positioned over them, have the arm seek until contact. Then I can reset sensitivity, engage pneumatic, and move it.

G30 is an unknown command, but seems to be exactly what I’m trying to do, but by taking advantage of stallguard.

Have you tried G28 A or B C? Referring to the previous link, G28 ABC should have no problem.

The sensor homing of tmc2209 supports single motor motion very well, but the z-axis motion of dexarm is actually two motors moving at the same time.

Our testing has not been very successful on two motors moving at the same time. Maybe you need to develop your own adaptation. We look forward to your success and share your experience.

Yes. G28 C will raise the arm to the vertical endstop.

However, I need it to move down.

I’ll see if there’s a way to tell G28 C to home downward.