Advanced Motion Control - Testing Version - Update 6

466 views
Skip to first unread message

ma...@makr.zone

unread,
Nov 8, 2020, 8:25:49 AM11/8/20
to OpenPnP
Hi Everybody

Update 6 of the Advanced Motion Control package is available!

As always, download the newest testing version here:


Details in the Pull Request:


Most of the goodies are under the hood, the biggest improvement is that the GUI log no longer slows down operation. In my measurements the logging level no longer matters for the speed of machine operation, even with the finest Advanced Motion Control move interpolation which generates a high volume of log output.

While I was at it, I made some visible improvements;-)

grafik

The other big addition is the Axis Interlock as discussed in the Safety Checks before Motion thread.


grafik

_Mark

scott.t...@gmail.com

unread,
Nov 9, 2020, 9:47:08 AM11/9/20
to OpenPnP
I'm working on a new build, and tested XYZ motion over the weekend- so far its amazing. Easy to set up, and with the new motion planing I can run significantly faster.

One problem I hit though- visual homing with backlash compensation is broken. While seeking the fiducial the moves don't complete the compensation- If you have 0.5mm set, your final 'home' will be 0.5mm off because the final .5mm move won't happen. I only tested with directional compensation.

-Scott

scott.t...@gmail.com

unread,
Nov 9, 2020, 9:48:48 AM11/9/20
to OpenPnP
This seems to happen with small moves when jogging too, but I didn't spend much time testing. Turns out my machine doesn't actually need backlash compensation.

jdlv

unread,
Nov 9, 2020, 9:49:03 AM11/9/20
to ope...@googlegroups.com
Hi Mark,

yesterday i ran a small job with update 6 , no problems all went smooth.

Now i am trying the simulated 3th order driver but I should have missed
something, no ways...
I can't see any change when switching from ModeratedConstantAcceleration
to Simulated3rdOrderControl.

Gcode controler is smoothie with your latest firmware
Attached some config screenshot.

Thanks again for your awesome work!

joël


Le 08/11/2020 à 14:25, ma...@makr.zone a écrit :
> Hi Everybody
>
> Update 6 of the Advanced Motion Control package is available!
>
> As always, download the newest testing version here:
>
> https://openpnp.org/test-downloads/
>
> Details in the Pull Request:
>
> https://github.com/openpnp/openpnp/pull/1074
>
> Most of the goodies are under the hood, the biggest improvement is that the
> GUI log no longer slows down operation. In my measurements the logging
> level no longer matters for the speed of machine operation, even with the
> finest Advanced Motion Control move interpolation which generates a high
> volume of log output.
>
> While I was at it, I made some visible improvements;-)
>
> [image: grafik]
>
> The other big addition is the Axis Interlock
> <https://github.com/openpnp/openpnp/wiki/Axis-Interlock-Actuator> as
> discussed in the Safety Checks before Motion
> <https://groups.google.com/d/msg/openpnp/CQX0uDciXp8/z3-PVwOoBwAJ> thread.
>
>
> [image: grafik]
>
> _Mark
>
Motion planner.png
Driver settings.png
Advanced settings.png

ma...@makr.zone

unread,
Nov 10, 2020, 1:37:53 AM11/10/20
to ope...@googlegroups.com

Hi Scott

I just looked at the code again, and I think it is correct. Could this be a misunderstanding?

The Directional method works differently, there is no "final move". Unlike the other backlash compensation methods it does no extra moves and no direction change, hence it is much faster and can be used together with motion blending etc.

https://github.com/openpnp/openpnp/wiki/Backlash-Compensation

BUT: You must calibrate your backlash to the real physical backlash of your machine. You can no longer over-compensate as with the other methods. If you don' calibrate, positioning will be wrong.

I doubt your machine has a full 0.5mm backlash in reality! I had less than 0.05 on my simple belt driven Liteplacer.

https://github.com/openpnp/openpnp/wiki/Backlash-Compensation#backlash-offset-calibration

This is probably one place, where the the Issues&Solutions suggestion is too easily adopted... hmmm.

_Mark

--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/da5b7663-ce9a-42df-b6ef-7d60e1322ff9n%40googlegroups.com.

ma...@makr.zone

unread,
Nov 10, 2020, 1:45:19 AM11/10/20
to ope...@googlegroups.com

Hi joël

Thanks!

What does the Diagnostics say?

Don't you get these acceleration steps?

https://github.com/openpnp/openpnp/wiki/Motion-Planner#motion-interpolation

https://github.com/openpnp/openpnp/wiki/Motion-Planner#motion-planner-diagnostics

Or look at the log. Just one G1 command issued? Or many?

Does the Issues&Solutions system say anything?

https://github.com/openpnp/openpnp/wiki/Issues-and-Solutions

_Mark

ma...@makr.zone

unread,
Nov 10, 2020, 1:53:46 AM11/10/20
to ope...@googlegroups.com

Ahh, and don't forget to set a Jerk limit on the axes where you want it:

https://github.com/openpnp/openpnp/wiki/Machine-Axes#kinematic-settings--rate-limits

If it is left at 0mm/s2, no Jerk limit is applied i.e. it works without interpolation.

_Mark

--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.

jdlv...@gmail.com

unread,
Nov 10, 2020, 5:27:27 AM11/10/20
to OpenPnP
Ok got some progress, Acceleration was set at 0m/s². I mixed it up with jerk unlimited if set at 0...
Now multiples gcode for a move and diagnostics shows steps. Acceleration is set at 5000mm/s² same value as smoothie config.
But moves are quite shaky, looks like acceleration goes to 0 between each steps:


diagnostics.png

attached is a log for a 10mm X axis move.

Vielen dank!

joël
10mm-log.txt

ma...@makr.zone

unread,
Nov 10, 2020, 9:00:18 AM11/10/20
to ope...@googlegroups.com

> looks like acceleration goes to 0 between each step

No, that's just the graphics. I made it to emphasize the interpolation, as it is hardly visible on top of the planning curve. Btw. you can also click on the graph to cycle between curves.

> But moves are quite shaky

Please elaborate.

I know it is very important to have very fast USB ping-pong and I only have experience under Windows.

Could you switch to TRACE logging level and then also post the log of the actual serial comm?

You might also have to play around with these settings:

https://github.com/openpnp/openpnp/wiki/GcodeAsyncDriver#interpolation

_Mark

jdlv...@gmail.com

unread,
Nov 10, 2020, 10:44:41 AM11/10/20
to OpenPnP
I can clearly see 3 or 4 independent moves, accelerate, slow down, accelerate, slow down ..., ... not a smooth and continuous move.
Attached is a 100mm full trace log. Looks like USB transfers are all done within 3ms.

joël
10mm-log.txt

scott.t...@gmail.com

unread,
Nov 10, 2020, 10:52:19 AM11/10/20
to OpenPnP
> I just looked at the code again, and I think it is correct. Could this be a misunderstanding?

You're absolutely right! Sorry about that- definitely not the way I thought it worked, but I like it for a machine that needs it.

ma...@makr.zone

unread,
Nov 10, 2020, 11:23:42 AM11/10/20
to ope...@googlegroups.com

This seems even faster than under Windows. Strange ...

Well, it is expected that the first move segment may prematurely decelerate, but if the subsequent segments arrive in time, it is expected to work. It does on my Smoothieware controller.

For OpenPnP most motion paths have a Safe Z move at the beginning and if you set Jerk to zero on the Z axis, this should give the controller the time needed to plan this properly. Could you please create a realistic Test Motion with two enabled Locations and Safe Z enabled between the Locations? Maybe a bit more than 10mm distance.

https://github.com/openpnp/openpnp/wiki/Motion-Planner#settings

I do plan to address this in Smoothieware etc. this was also already discussed with dc42 of Duet3D. There should be a grace period where it waits for further command before rushing into premature deceleration. It should only start executing the moves when either a M400 has been received or the input/Gcode stream has paused (or the buffers are getting full).

_Mark

jdlv...@gmail.com

unread,
Nov 10, 2020, 12:43:11 PM11/10/20
to OpenPnP
Made a short video with this test motion :
testmotion.png


joël
pnp.mp4

ma...@makr.zone

unread,
Nov 10, 2020, 1:02:32 PM11/10/20
to ope...@googlegroups.com

And this is with the newest Firmware? And you have an original MCU Smoothieboard or Azteeg X5 GT with the 120Mhz NXP LPC1769 ?

https://makr.zone/smoothieware-new-firmware-for-pnp/500/

Really very strange. Could you send the log?

_Mark

jdlv...@gmail.com

unread,
Nov 10, 2020, 2:09:18 PM11/10/20
to OpenPnP
Smoothieboard is an original. Firmware date is X-FIRMWARE_BUILD_DATE:Oct 22 2020 21:21:58 .

Maybe there is something wrong with my smoothie config file? I read somewhere in the wiki about junction_deviation but I don't know if it's only for motion blending. In my config file it is set at 0.
Could you send your smoothie config?

joël
test-motion-log.txt
firmware.txt

ma...@makr.zone

unread,
Nov 10, 2020, 3:19:03 PM11/10/20
to ope...@googlegroups.com

> I read somewhere in the wiki about junction_deviation but I don't know if it's only for motion blending. In my config file it is set at 0.

That explains it!

Theoretically, junction deviation is only used for curved trajectories, but a zero value switches off junction speeds completely, even for straight junctions:

https://github.com/Smoothieware/Smoothieware/blob/2ef08c902d870d1cc61e46cef571087bde9bd72d/src/modules/robot/Planner.cpp#L150

My config is here (towards the end):

https://makr.zone/choosing-a-motion-controller-the-panucatt-azteeg-x5-gt-32bit/455/

_Mark

jdlv

unread,
Nov 10, 2020, 3:48:23 PM11/10/20
to ope...@googlegroups.com
Works perfectly with junction_deviation = 0.005 !

Thanks a lot!

joël


Le 10/11/2020 à 21:18, ma...@makr.zone a écrit :
> /> //I read somewhere in the wiki about junction_deviation but I don't
> know if it's only for motion blending. In my config file it is set at 0./
>
> That explains it!
>
> Theoretically, junction deviation is only used for curved trajectories,
> but a zero value switches off junction speeds completely, even for
> straight junctions:
>
> https://github.com/Smoothieware/Smoothieware/blob/2ef08c902d870d1cc61e46cef571087bde9bd72d/src/modules/robot/Planner.cpp#L150
>
> <https://github.com/Smoothieware/Smoothieware/blob/2ef08c902d870d1cc61e46cef571087bde9bd72d/src/modules/robot/Planner.cpp#L150>
>
>
> My config is here (towards the end):
>
> https://makr.zone/choosing-a-motion-controller-the-panucatt-azteeg-x5-gt-32bit/455/
> <https://makr.zone/choosing-a-motion-controller-the-panucatt-azteeg-x5-gt-32bit/455/>
>
>
> _Mark
>
>
> Am 10.11.2020 um 20:09 schrieb jdlv...@gmail.com:
>> Smoothieboard is an original. Firmware date is
>> X-FIRMWARE_BUILD_DATE:Oct 22 2020 21:21:58 .
>>
>> Maybe there is something wrong with my smoothie config file? I read
>> somewhere in the wiki about junction_deviation but I don't know if
>> it's only for motion blending. In my config file it is set at 0.
>> Could you send your smoothie config?
>>
>> joël
>>
>>
>> Le mardi 10 novembre 2020 à 19:02:32 UTC+1, ma...@makr.zone a écrit :
>>
>>     And this is with the newest Firmware? And you /have /an original
>>     MCU Smoothieboard or Azteeg X5 GT with the 120Mhz NXP LPC1769 ?
>>
>>     https://makr.zone/smoothieware-new-firmware-for-pnp/500/
>>     <https://makr.zone/smoothieware-new-firmware-for-pnp/500/>
>>
>>     Really very strange. Could you send the log?
>>
>>     _Mark
>>
>>     Am 10.11.2020 um 18:43 schrieb jdlv...@gmail.com:
>>>     Made a short video with this test motion :
>>>     testmotion.png
>>>
>>>
>>>     joël
>>>     Le mardi 10 novembre 2020 à 17:23:42 UTC+1, ma...@makr.zone a
>>> écrit :
>>>
>>>         This seems even faster than under Windows. Strange ...
>>>
>>>         Well, it is expected that the /first /move segment may
>>>         prematurely decelerate, but if the subsequent segments arrive
>>>         in time, it is expected to work. It does on my Smoothieware
>>>         controller.
>>>
>>>         For OpenPnP most motion paths have a Safe Z move at the
>>>         beginning and if you set Jerk to zero on the Z axis, this
>>>         should give the controller the time needed to plan this
>>>         properly. Could you please create a realistic Test Motion
>>>         with two enabled Locations and Safe Z *enabled *between the
>>>         Locations? Maybe a bit more than 10mm distance.
>>>
>>>         https://github.com/openpnp/openpnp/wiki/Motion-Planner#settings
>>>
>>> <https://github.com/openpnp/openpnp/wiki/Motion-Planner#settings>
>>>
>>>         I do plan to address this in Smoothieware etc. this was also
>>>         already discussed with dc42 of Duet3D. There should be a
>>>         grace period where it waits for further command before
>>>         rushing into premature deceleration. It should only start
>>>         executing the moves when either a M400 has been received or
>>>         the input/Gcode stream has paused (or the buffers are getting
>>>         full).
>>>
>>>         _Mark
>>>
>>>         Am 10.11.2020 um 16:44 schrieb jdlv...@gmail.com:
>>>>         I can clearly see 3 or 4 independent moves, accelerate, slow
>>>>         down, accelerate, slow down ..., ... not a smooth and
>>>>         continuous move.
>>>>         Attached is a 100mm full trace log. Looks like USB transfers
>>>>         are all done within 3ms.
>>>>
>>>>         joël
>>>>         Le mardi 10 novembre 2020 à 15:00:18 UTC+1, ma...@makr.zone
>>>>         a écrit :
>>>>
>>>>             /> looks like acceleration goes to 0 between each step/
>>>>
>>>>             No, that's just the graphics. I made it to emphasize the
>>>>             interpolation, as it is hardly visible on top of the
>>>>             planning curve. Btw. you can also click on the graph to
>>>>             cycle between curves.
>>>>
>>>>             /> But moves are quite shaky/
>>>>
>>>>             Please elaborate.
>>>>
>>>>             I know it is very important to have very fast USB
>>>>             ping-pong and I only have experience under Windows.
>>>>
>>>>             Could you switch to TRACE logging level and then also
>>>>             post the log of the actual serial comm?
>>>>
>>>>             You might also have to play around with these settings:
>>>>
>>>>
>>>> https://github.com/openpnp/openpnp/wiki/GcodeAsyncDriver#interpolation
>>>>
>>>> <https://github.com/openpnp/openpnp/wiki/GcodeAsyncDriver#interpolation>
>>>>
>>>>
>>>>             _Mark
>>>>
>>>>
>>>>             Am 10.11.2020 um 11:27 schrieb jdlv...@gmail.com:
>>>>>             Ok got some progress, Acceleration was set at 0m/s². I
>>>>>             mixed it up with jerk unlimited if set at 0...
>>>>>             Now multiples gcode for a move and diagnostics shows
>>>>>             steps. Acceleration is set at 5000mm/s² same value as
>>>>>             smoothie config.
>>>>>             But moves are quite shaky, looks like acceleration goes
>>>>>             to 0 between each steps:
>>>>>
>>>>>
>>>>>             diagnostics.png
>>>>>
>>>>>             attached is a log for a 10mm X axis move.
>>>>>
>>>>>             Vielen dank!
>>>>>
>>>>>             joël
>>>>>             Le mardi 10 novembre 2020 à 07:53:46 UTC+1,
>>>>>             ma...@makr.zone a écrit :
>>>>>
>>>>>                 Ahh, and don't forget to set a Jerk limit on the
>>>>>                 axes where you want it:
>>>>>
>>>>>
>>>>> https://github.com/openpnp/openpnp/wiki/Machine-Axes#kinematic-settings--rate-limits
>>>>>
>>>>>
>>>>> <https://github.com/openpnp/openpnp/wiki/Machine-Axes#kinematic-settings--rate-limits>
>>>>>
>>>>>
>>>>>                 If it is left at 0mm/s^2 , no Jerk limit is applied
>>>>>                 i.e. it works /without /interpolation.
>>>>>
>>>>>                 _Mark
>>>>>
>>>>>                 Am 10.11.2020 um 07:45 schrieb ma...@makr.zone:
>>>>>>
>>>>>>                 Hi joël
>>>>>>
>>>>>>                 Thanks!
>>>>>>
>>>>>>                 What does the Diagnostics say?
>>>>>>
>>>>>>                 Don't you get these acceleration steps?
>>>>>>
>>>>>>
>>>>>> https://github.com/openpnp/openpnp/wiki/Motion-Planner#motion-interpolation
>>>>>>
>>>>>>
>>>>>> <https://github.com/openpnp/openpnp/wiki/Motion-Planner#motion-interpolation>
>>>>>>
>>>>>>
>>>>>>
>>>>>> https://github.com/openpnp/openpnp/wiki/Motion-Planner#motion-planner-diagnostics
>>>>>> <https://groups.google.com/d/msgid/openpnp/cd03f064-1308-b997-ac02-2298a7d34b87%40makr.zone?utm_medium=email&utm_source=footer>.
>>>>>>
>>>>>
>>>>>             --             You received this message because you
>>>>> are subscribed to
>>>>>             the Google Groups "OpenPnP" group.
>>>>>             To unsubscribe from this group and stop receiving
>>>>>             emails from it, send an email to
>>>>>             openpnp+u...@googlegroups.com.
>>>>>             To view this discussion on the web visit
>>>>>
>>>>> https://groups.google.com/d/msgid/openpnp/5b3c79a3-bdd4-4f92-98a4-e37bc6b3dc50n%40googlegroups.com
>>>>>
>>>>>
>>>>> <https://groups.google.com/d/msgid/openpnp/5b3c79a3-bdd4-4f92-98a4-e37bc6b3dc50n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>>>>>
>>>>
>>>>         --         You received this message because you are
>>>> subscribed to the
>>>>         Google Groups "OpenPnP" group.
>>>>         To unsubscribe from this group and stop receiving emails
>>>>         from it, send an email to openpnp+u...@googlegroups.com.
>>>>         To view this discussion on the web visit
>>>>
>>>> https://groups.google.com/d/msgid/openpnp/03e5540e-137c-4caa-81c5-77ea74dc02b3n%40googlegroups.com
>>>>
>>>>
>>>> <https://groups.google.com/d/msgid/openpnp/03e5540e-137c-4caa-81c5-77ea74dc02b3n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>>>>
>>>
>>>     --     You received this message because you are subscribed to the
>>>     Google Groups "OpenPnP" group.
>>>     To unsubscribe from this group and stop receiving emails from it,
>>>     send an email to openpnp+u...@googlegroups.com.
>>>     To view this discussion on the web visit
>>>
>>> https://groups.google.com/d/msgid/openpnp/28811647-1ea4-4719-b610-a5f1def78ee7n%40googlegroups.com
>>>
>>>
>>> <https://groups.google.com/d/msgid/openpnp/28811647-1ea4-4719-b610-a5f1def78ee7n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>>>
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "OpenPnP" group.
>> To unsubscribe from this group and stop receiving emails from it, send
>> an email to openpnp+u...@googlegroups.com
>> <mailto:openpnp+u...@googlegroups.com>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/openpnp/6dee0366-b3b1-4d9f-a8e0-a33e04ea7e93n%40googlegroups.com
>> <https://groups.google.com/d/msgid/openpnp/6dee0366-b3b1-4d9f-a8e0-a33e04ea7e93n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>>
>

greg.hj...@gmail.com

unread,
Nov 13, 2020, 6:46:48 PM11/13/20
to OpenPnP
I'm building a machine using a Duet3D6HC over ethernet and I've got it all working now and ran a simple job.  I'm hoping to try out your new motion control features this weekend.  Is there anything in particular that you'd like me to watch out for or pay attention to?  It looks incrdible!

Greg

ma...@makr.zone

unread,
Nov 14, 2020, 4:06:50 AM11/14/20
to ope...@googlegroups.com

Hi Greg

There is currently improved firmware being developed. With the standard firmware, the Simulated3rdOrderControl is not yet working. You should use ModeratedConstantAcceleration for now.

https://github.com/openpnp/openpnp/wiki/GcodeAsyncDriver#gcodedriver-new-settings

If you're testing over Ethernet: that's new to me, I would be interested in TRACE level logs to see how fast the new asynchronous communication is.

If you got a simple Job to run before/after migration to the testing version that would be great!

To get the best comparison, you could disable Vacuum sensing after pick and before place (if you have it):

Also make sure to have been through Issues&Solutions and to have entered the right feedrate/acceleration limits on all the axes (they must match the ones you set in config).

Perhaps you could note down the CPH and keep the logs for further scrutiny.  ;-)

_Mark

greg.hj...@gmail.com

unread,
Nov 14, 2020, 8:10:06 PM11/14/20
to OpenPnP
Ok I made a test job with 27 placements and 2 parts and ran it before and after the advanced motion.

First, I had a few notes from the conversion
- I'm getting an error “Visual homing is missing the FIDUCIAL-HOME part”
- Before enabling the Async g-code driver, jogging was extremely jerky
- Enabling G-Code compression made everything stop working for me
- My machine is 200 usteps per mm with 16x microstepping so I set my resolution to 0.005
*Can I improve precision if I use more microsteps?
- I noticed that Jogging is now doing some sort of backlash compensation that helps a lot when manually lining things up.

Now for the test results.
Before: 27 placements in 3.48min = 7.75 placements / min
After: 27 placements in 2.99min = 9 placements /min

I think its more accurate now too but maybe I'm wrong about that and I hope I can speed up my z-axis now.  I have the z-axis very slow (acc of 40mm/s^2) because I'm mostly using tapes in a static 'channel' and have a lot of problems with the parts bouncing out when I pick a part.  

I noticed the new backlash compenstation but I need to find out how to set its value correctly.  At a default of 1mm my machine just jumps over an extra 1mm every time I change direction (makes sense).   I'm using "OneSidedPositioning" for now and its an improvement over what I had before (nothing I guess).

The Issues and Solutions tab is amazing.  That got me through a whole bunch of issues.  You have really done a great job!

Here is a video of the standard motion test: https://www.youtube.com/watch?v=4fDHXUpdLJo
And here is the Advanced motion test:  https://www.youtube.com/watch?v=uzBRhqFYijM
LogNormalMotion.txt
LogAdvancedMotion.txt

ma...@makr.zone

unread,
Nov 15, 2020, 10:05:59 AM11/15/20
to ope...@googlegroups.com

Hi Greg

Thanks a lot for the thorough documentation and the videos!

> I'm getting an error “Visual homing is missing the FIDUCIAL-HOME part”

Yes, it seems you had Visual homing enabled in the previous version. This version silently skipped Visual Homing when the fiducial part was missing, despite the "enabled" switch. Very hard to diagnose for the user, so I changed it.

Now you will know what is missing. You can switch off Visual homing (on the Head) if you really don't want it.

Btw, I just documented Visual Homing in the Wiki:

https://github.com/openpnp/openpnp/wiki/Visual-Homing

> Enabling G-Code compression made everything stop working for me

Yes, Duet3D had this issue. It is already fixed by dc42 (along with many other things)! I'm currently conversing with him about some remaining issues but I guess we will be able to make a new firmware available soon.

> I have the z-axis very slow (acc of 40mm/s^2) because I'm mostly using tapes in a static 'channel' and have a lot of problems with the parts bouncing out when I pick a part. 

No kidding! You really need to fix these feeders then. But I'm sure you already know that ;-) 

>  My machine is 200 usteps per mm with 16x microstepping so I set my resolution to 0.005
> *Can I improve precision if I use more microsteps?

IMHO, 0.005mm is ample precision for OpenPnP even down to 0201 parts. There is a difference between resolution (what the motors can address) and actual precision (the repeatable absolute positioning accuracy). I'm no mechanical engineer but I guess with 0.005mm you're already beyond the point where true precision can be improved with more resolution. Also one should realize that microsteps are proportions of magnetic fields and frankly I doubt there will be much to be gained beyond 16 microsteps.

> I noticed the new backlash compenstation but I need to find out how to set its value correctly.

You could try and follow this guide and tell me if it works with your machine. It would really much improve the speed of your machine to use DirectionalCompensation .

https://github.com/openpnp/openpnp/wiki/Backlash-Compensation#backlash-offset-calibration

Btw, is this the new Peter Betz head? So compact, I love it!

_Mark

greg.hj...@gmail.com

unread,
Nov 15, 2020, 6:06:25 PM11/15/20
to OpenPnP
Ok I will look into visual homing in the future.  Looking forward to the firmware updates for Duet too.  

Without micro-stepping, my resolution is 12 steps/mm or 0.0833mm.  I have the ability to use Nema23 steppers now so I could switch to those if their micro-steps might have enough torque to hold position.  Maybe there are other places I need to look to improve the precision/repeatablity - maybe visual homing.

These strip feeders came from some 'manual' assembly feeders I bought off of ebay.  They seemed pretty good at first but there's enough play in the slots that the whole tape can bounce which is disastrous if the head hits it too quickly.  I've also tried the blinds feeders but I can't print them reliably on my CR-10 and they tend to warp on me.  I'm trying to get your push-pull feeder working but its also difficult for me to print, it looks amazing though.  The hunt continues! :-)

Yes, this is the new Peter Betz head.  He had an option to buy replacement plates and I wanted the rotational connectors for my vacuum lines so I just got the new plates while I was at it.  Its really nice.  I think you can put 4 heads in a row too but I'm not really going for speed anyway (as you may have noticed!)

ma...@makr.zone

unread,
Nov 16, 2020, 7:00:25 AM11/16/20
to ope...@googlegroups.com

> Without micro-stepping, my resolution is 12 steps/mm or 0.0833mm.  I have the ability to use Nema23 steppers now so I could switch to those if their micro-steps might have enough torque to hold position.  Maybe there are other places I need to look to improve the precision/repeatablity - maybe visual homing.

Could you explain what issues you actually see? Is the positioning not repeatable without this huge 1mm OneSided compensation?

Does this not work?
https://github.com/openpnp/openpnp/wiki/Backlash-Compensation#backlash-offset-calibration

The machine looks very nice. Something like this* is what I would try to build if I were to start from scratch: 3D-printed but bulky brackets, linear rails, the new light Peter's head. It looks very light and well-balanced overall.

I can't spot the problem, this machine should be able to fly!!!

(The feeders aside ;-)

_Mark

*I would probably stick with the CP40 nozzle tips, they seem less problematic for vacuum sealing etc.

greg.hj...@gmail.com

unread,
Nov 16, 2020, 11:07:07 AM11/16/20
to OpenPnP
Thanks, I'm actually pretty happy with how the machine is working now.  I'm sure it can be sped up a lot too.

The 1mm one-sided backlash compensation was an improvement for me for a couple reasons:
1) I didn't have any backlash compensation - I thought I had set it in the machine config but I never noticed it working
2) When manually aligning things like feeder holes, the 0.01mm jog doesn't always actually move (for two reasons, backlash or due to the fact that we're micro-stepping at this level and there isn't enough torque).  With the one-sided compensation, there is enough momentum for the microsteps to actually land where they're supposed to (at least it seems like that is the case).

I'm able to very easily place 0603s and I actually haven't tried 0402s yet because my feeders are so bad.  So my list of things to do are:
- Better feeder solution 
- Directional backlash compensation
- Bottom vision

I just read how directional backlash compensation works and I think it will be great.  

I'm not sure if this is a valid idea but I wish I could select one-sided compensation while doing the smallest 0.01mm jogging and directional compensation at all other times.  

ma...@makr.zone

unread,
Nov 16, 2020, 12:01:44 PM11/16/20
to ope...@googlegroups.com

> When manually aligning things like feeder holes, the 0.01mm jog doesn't always actually move ... due to the fact that we're micro-stepping at this level and there isn't enough torque

Hmmm... I think it should. You should not post-pone these basic motion issues. It's not only about speed. If positioning is so weak that you need a 1mm one-sided compensation, then the machine will not make you happy in the next steps. For both bottom vision and the fiducial locator, you need to be able to adjust the machine position in tiny increments. It should definitely not have to do 1mm excursions on each move! These "excursions" will also conflict with the nozzle tip changer you surely also have on your TODO list.

First double-check your micro-step calculation. You said you had 0.005mm micro-steps (200 steps/mm), but that seems odd as it does not match the usual step angle, belt and pulley factors. For instance I have 20 teeth pulley on 2mm belt and 1.8° steppers with 16 micro-steps, so I get 20*2mm*1.8°/360°/16 = 1mm/80 = 0.0125mm per step. If you have the same, it is perfectly normal to not have a step on each 0.01mm Jog! Only 4 out of 5 Jogs actually move.

Once double-checked, set the verified value in your axis as the Resolution.
https://github.com/openpnp/openpnp/wiki/Machine-Axes#controller-settings

Maybe you can attach a long, thin "needle" to one of the pulleys like a very long chimney match, bicycle spoke, broom twig whatever ;-). Now jog 0.01mm and observe if it rotates.

If not, check your controller's motor current settings. In Duet you can easily set this with the M906 command:

https://duet3d.dozuki.com/Wiki/Gcode#Section_M906_Set_motor_currents

I would definitely set it to the full rated current of your X and Y steppers. They won't go up in flames so easily! It is also normal for them to become quite hot. Plus Duet has an idle factor.

Speaking of which: You might also have to experiment with the M906 I word, controlling the idle factor. The motor might lose position if too low. Unfortunately I have no real machine experience with the Duet yet, so this is all theory. ;-)

My Liteplacer is very "maker style" with simple sandwiched plastic wheels on maker slot, everything is clamped together using hand-guesstimated ex-center tensioning. Yes, ugly. The construction is also quite unbalanced, the head is huge, with the cable chain janking off-center. But it moves precisely enough for 0402. No problems.

https://makr.zone/pick-place-machine-first-simulated-small-test-run/66/

So it is is simply unthinkable that your machine, sporting linear rails etc. should not perform much better!

_Mark

greg.hj...@gmail.com

unread,
Nov 16, 2020, 11:12:31 PM11/16/20
to OpenPnP
Your video gives me a goal!  :-) 
I didn't have the motor current as high as it could go and now it is stepping on every 0.01.  I have 0.9deg steppers, 16-tooth pulleys and 16x micro-stepping which works out to 200 micro-steps per mm.  This isn't where I started out; I've been replacing every element to get more precision.  I replaced the 200step motors with 400step motors and I have gone through several pulley sizes.  I think I can stop now :-)

I just tried the estimation of backlash and I cant see any backlash on my machine now so maybe my problem was simply that the motor current was too low for the stepper to hit micro-steps reliably! 

ma...@makr.zone

unread,
Nov 17, 2020, 3:03:29 AM11/17/20
to ope...@googlegroups.com

> 16-tooth pulleys

Ahh, that explains it.

> I replaced the 200step motors with 400step motors

Funny, I did the opposite ;-) The 0.9° steppers of the Liteplacer kit did limit the max. speed too much (halved it more or less).

> I just tried the estimation of backlash and I cant see any backlash on my machine now

Excellent!

_Mark

greg.hj...@gmail.com

unread,
Nov 17, 2020, 9:35:23 AM11/17/20
to OpenPnP
Oh wow, well I suppose I could swap back!  The other motors had more torque (both because they're 200-step and they're a little bigger).  I finally put my finger on what the "problem" I'm seeing is.  When I set the location of anything (a feeder for example) the machine doesn't always hit the exact same location if I move away and come back.  This seems to correlate with what direction and speed the head is coming at the location from.  In addition to this effect, re-homing the machine can offset the entire coordinate system.  The offsets are very small (probably within 0.1mm) because I have to be zoomed in on the camera to see them.  It seems like this 'error' could come from a few places:

1) homing isn't as precise as everything else on the machine at this point
2) the machine doesn't reliably stop on micro-steps
3) backlash in the system - but its definitely hard to see backlash when I jog the machine

I've slowed the final step of homing way down.  Probably the visual homing will be even better.  As far as micro steps, Ive heard some people say they're only for smoothing out motion, not actually improving accuracy but the truth is probably they do a little of both?  This is why I tried to get the actual step accuracy as high as possible. 

ma...@makr.zone

unread,
Nov 17, 2020, 11:01:18 AM11/17/20
to ope...@googlegroups.com

IMHO you need visual homing anyway, so you can start with this guide and simply exclude any end-switch inaccuracies from the equation.

https://github.com/openpnp/openpnp/wiki/Visual-Homing

If this resolves the issue, fine.

If not, you should probably also look at the belt tension.

People often have them too tight. Guidance is rare. I was pretty lost when I built my machine. Most guides are uselessly theoretical or require special (expensive) instruments or tools. Finally, I found a good and most importantly, a practical guide after a very long search. But stupid me hasn't bookmarked it and I can't find it again :-(.

What I remember from the good guide (applicable to a typical PnP machine X, Y belt length): If you pluck the belt it should sound with a very low tone, something like the lowest piano key (whatever that is). The belt feels surprisingly lose. You can easily deflect it, almost no deflection tension felt. Certainly not like bow and arrow. At first it feelt wrong, but it turned out to perform very well.

If you had it very tight you probably need to replace the belt. Apparently, it is not so hard to damage it permanently through over-tensioning.

_Mark

greg.hj...@gmail.com

unread,
Nov 17, 2020, 1:06:32 PM11/17/20
to OpenPnP
Ok I'm excited to try these!  I do have my belts very tight.  It seemed to make sense that you'd want them tight.  I guess it is probably easier on the belts if we use backlash compensation and reasonable jerk/acceleration. 
So top of the list is to implement visual homing and make new belts.  I need to figure out some git so I can merge my Mjpg code with your advanced motion code too. 

greg.hj...@gmail.com

unread,
Nov 17, 2020, 2:23:30 PM11/17/20
to OpenPnP
My Head doesn't seem to have the options described in the Visual Homing guide.  This is all I see:


Harjit Singh

unread,
Nov 17, 2020, 9:34:42 PM11/17/20
to ope...@googlegroups.com

ma...@makr.zone

unread,
Nov 18, 2020, 3:00:51 AM11/18/20
to ope...@googlegroups.com

Hi Greg

this is only with the OpenPnP Testing Version/Advanced Motion Control:

https://makr.zone/openpnp-advanced-motion-control/553/

_Mark

ma...@makr.zone

unread,
Nov 18, 2020, 3:09:31 AM11/18/20
to ope...@googlegroups.com

No, it was specifically for pragmatic DIY machine belt tensioning. But with similar practical outcome as your examples. It was a long time ago, I don't remember exactly. At the time I've looked at many such guides and theories so everything blends together.

_Mark

ma...@makr.zone

unread,
Nov 18, 2020, 9:56:00 AM11/18/20
to ope...@googlegroups.com

Much more Advanced Motion Control:

https://youtu.be/ItzOya7qWmk

;-)


bert shivaan

unread,
Nov 18, 2020, 12:07:41 PM11/18/20
to OpenPnP
not gonna lie, I sort of want one of them

--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages