Recommended timing belt width

375 views
Skip to first unread message

Christian Thomasser

unread,
Nov 18, 2019, 7:24:22 PM11/18/19
to OpenPnP
Hello again,

Does anyone of you have any idea which timing belt width makes sense with a HTD-5M timing belt?
Off course, I realize that this is mainly related to the weight of the moving mass and the desired acceleration, but is it generally possible to say, which is certainly too little, and what is certaunly too much??

Thanks and best regards!!

Jim

unread,
Nov 19, 2019, 10:54:16 AM11/19/19
to OpenPnP
Hello Christian,

I am using HTD3M (optibelt, 15mm width) for x/y-axis, a HTD with 5mm pitch would be a overkill.

The belt-system is robust, has zero backlash and does not generate high costs at first sight.
But the linearity errors (from pulleys, sticking friction, etc.) prevent placing small parts with sufficient accuracy.
This errors have to be corrected somehow - in my case the costs have exploded.

When I had foreseen the accuracy problems with the cheap belts, then I would have built myself a ball-screw machine.

Marek T.

unread,
Nov 19, 2019, 11:56:25 AM11/19/19
to OpenPnP
I have ballscrew xy axes and they are driven with belts. It's Yamaha/Philips solution. They are fiberglass reinforced. 0402 with no problems. Some Japanese but don't remember the brand now, still perfect after 30 years.

Christian Thomasser

unread,
Nov 19, 2019, 12:16:41 PM11/19/19
to OpenPnP
Thank you Jim and Marek for your feedback.

To drive the x Axis I use a 12 Nm Nema 34 Closed Loop Stepper Motor. For y Axis i use two 4Nm Nema 24 Steppers with one external Encoder to close this loop to.
So a lot of power on both axis i want to use for maximum performance. I thought 5M belts would be required to properly transmit the power.

Jim, what measures have you taken to improve the accuracy of your machine? Do you know where to buy ball crews with pitches greater than 30mm to a cheap price??

Jim

unread,
Nov 19, 2019, 1:50:50 PM11/19/19
to OpenPnP
Hello Christian,

First i started with open loop stepper motors i had laying around - machine worked, but at higher speeds the steppers lost there minds.
Then i replaced them with closed loop steppers - accuracy and speed was much better, but not enough for <=402 etc.
Finally 60mm servos have been installed - they move really quiet compared to steppers, speed was doubled, but 0201 was still not possible because of belt linearity errors.
So magnetic encoders that are small and fast enough have been ordered and plugged directly to the servo drives - played one week with config and results are satisfactorily now.

I would try to get tbi, hiwin, etc. from asian dealers - most of them provide end machining to your needs.

Do not plan to use two motors for one axis - that works for 3d printers very well, but for a smt pick place machine it is not a good idea.
For the x-axis (moves a light weight head) you need normally much less power than for y-axis (moves the heavy gantry).

Marek T.

unread,
Nov 19, 2019, 1:53:20 PM11/19/19
to OpenPnP
Christian be careful with cheap ballscrew. Non linearity along its length is a problem.

Marek T.

unread,
Nov 19, 2019, 2:01:43 PM11/19/19
to OpenPnP
Linear encoder (scale) is better idea than rotary on motor axis. It eliminates an issue of non linear parts between the motor and head (pulleys, gears, ballscrew). Cheap optical Chinese scale saved my life on long x. Agree with Jim that servo is much better idea than stepper mitor however there is many problems with really not trivial tuning the driver.

Christian Thomasser

unread,
Nov 19, 2019, 3:31:57 PM11/19/19
to OpenPnP
Oh sorry, I swapped the Axis.
Of course the Gantry is driven by the 12 Nm CL
Stepper that i allready have.

I will show you the design of the whole machine as far as possible. It is much easier to talk about when you know the design.

I don‘t have to place parts smaller than 0603
I designed controll units for industrie in tht so far and just need to get a little bit smaller.

Jim

unread,
Nov 19, 2019, 4:14:14 PM11/19/19
to OpenPnP

Not smaller than 0603? How's about QFN's, BGA's, etc. with smaller pitch?
Most old high pitched cases (like SO..) are going to disappear slowly - remember DIP/DIL from 70's - no one is using them today.
For placing a modern chip case you need accuracy.



The machine is screwed to the wall because of light weight and the head makes sometimes a funny overswing (does it come from nanotec driver?).
And placing without vision is moving cph up - something i neved dared, because i know how ugly boards could look then, especially with china juki nozzle tips.


One of my favorite videos regarding desktop ball screw machine is this: https://www.youtube.com/watch?v=TXbysNI7YTo
I think the machine has good mechanical design - something you should take a look at.

Bernd Walter

unread,
Nov 19, 2019, 4:41:04 PM11/19/19
to ope...@googlegroups.com
On Tue, Nov 19, 2019 at 02:04:04AM -0800, Jim wrote:
> Hello Christian,
>
> I am using HTD3M (optibelt, 15mm width) for x/y-axis, a HTD with 5mm pitch
> would be a overkill.

I use the same HTD3M with 15mm width on both sidess of my Y axis.
Before I had been using steel GT2 mit 12mm width, which worked fine as well,
but something happened with one belt and the belt could jump.
I suspect that it was a material problem with the belt inlay.
I have had a short T5 belt skipping on my CNC Z axis as well, because the
inlay was diagonal.
My X is still running with a 6mm steel GT2.

> The belt-system is robust, has zero backlash and does not generate high
> costs at first sight.
> But the linearity errors (from pulleys, sticking friction, etc.) prevent
> placing small parts with sufficient accuracy.
> This errors have to be corrected somehow - in my case the costs have
> exploded.

I've noticed something like this as well on my Y axis.
But personal assumption however is that this is not a problem of the Y axis itself.
My cable chain to the head is horizontal with one chain for X and Y.
Depending on the position its weight can twist my X rails.
It is on my list of things to change.

> When I had foreseen the accuracy problems with the cheap belts, then I
> would have built myself a ball-screw machine.

I personally still wouldn't.
Very fast rotating ball screws produce a hell lot of new problems.
I see it with the transmission axel, which connects my Y sides, which I
had to fit with a lot of intermediate support bearings to not start swinging.
Some big CNC machines rotate the nut over a non spinning screw instead to
avoid that problem.

--
B.Walter <be...@bwct.de> http://www.bwct.de
Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.

Christian Thomasser

unread,
Nov 19, 2019, 4:51:17 PM11/19/19
to OpenPnP
Hi Jim,

No, so far just soic.
But you are right, i may also need to place qfn etc. in future.

The first youtube video i allready know.
Honestly the machine in this video inspired me to my own construction.

I saw the mount at the wall and i found this also very funny.
My design is more compact and much heavier but also with a quad head.

I think the swinging of the head of the machine in this video depends to the belt that is able to swing up and down and it may also comes from the pid configuration.

I like the machine in the second video and i try to upgrade my own design with a few new ideas.

But ball screws with a pitch higher than 20mm and Servos may be a little bit to expensive.

Christian Thomasser

unread,
Nov 19, 2019, 5:21:29 PM11/19/19
to OpenPnP
Hallo Bernd,

Vielen Dank auch für Dein Feedback!
Obwohl es einfacher wäre auf Deutsch mit Dir zu schreiben, nehme ich Rücksicht auf Die anderen Mitleser und schreibe weiterhin auf Englisch.

Do you have a pnp machine too??
If so, I would be interested in your design.

My design is not finished so far, but i try to post it in the next few minutes.
I hope it is fine. If not i hope i will get a few hints for improvement.

Jim

unread,
Nov 19, 2019, 5:44:42 PM11/19/19
to OpenPnP
Hello Bernd,

--> Very fast rotating ball screws produce a hell lot of new problems.

I know exactly what you mean, i have the speed limit on my cnc (2m x-axis) because of the critical spindle speed.

But when you make good bearings then you get with e.g. a 2040 ball screw with 1m length more than 2000 rpm - i do not see here a problem.

ballscrew.PNG




Christian Thomasser

unread,
Nov 19, 2019, 6:03:22 PM11/19/19
to OpenPnP
I build a 2,5D cnc a few years ago. It‘s servo driven with ball screws 1610 i think. I build driven nuts to avoid screw resonance swinging. I used two roller bearing and a nut to make backlash adjustable.
3AB9AEDF-ED06-4B68-BD7A-74A33FB91105.jpeg
1FD441A2-0A29-4DF0-9E9E-59121CE91F8C.jpeg

Jim

unread,
Nov 19, 2019, 6:38:34 PM11/19/19
to OpenPnP
Cool design - looks very compact. I'm sure you know Hermann's version sold here:


Christian Thomasser

unread,
Nov 19, 2019, 7:06:45 PM11/19/19
to OpenPnP
Yes i know, but its build up with normal ball bearings. They are not recommendet for axial force. So i build up som with roller bearings and a tightenable rod nut. The hole on the side is for acurate referencing using an inductive switch.

Christian Thomasser

unread,
Nov 19, 2019, 7:36:07 PM11/19/19
to OpenPnP
Okay hear is the unfinished design of my project.
You can find a closeup of the Quad-Head in this diskussion group:

Gesamt_01.JPG
Gesamt_02.JPG
Gesamt_03.JPG
Gesamt_04.JPG

Jim

unread,
Nov 20, 2019, 4:23:07 AM11/20/19
to OpenPnP
Hello Christian !

You should have access to some really great machine tools to realize such a design.

Some thoughts: 

Make the machine more wide to be able to mount as much feeders as possible, a standard feeder slot needs 16.5mm.
I hope you get at least one feeder that you want to use for drawing your cad and designing busbar before you start to built.
Pickup position and travel ways for reaching all feeders with heads, down camera (and laser height sensor) is essential for comfortable use of machine.

Leave an X engine, you do not need two locomotives for this load.
And a comfortable solution to adjust the belt tension like you have for y-belts saves a lot of trouble.

Do you know the annoying sound of the X-axis rails? I only used them once, because of low price - never again.

The sheets holding the x-axis looking too thin for me - with steep ramps, these could bend.

The bearing of Y-connection axis should be made as well as possible (i use 2 ball bearings on each side) to prevent vibrations.
The main drive belt for the Nema34 could also be geared down with 2:1 or 3:1 (I have) to have more torque and better resolution.
(Most china closed loop steppers have only a optical 1000 line encoder, resulting resolution under load is not very good)

The base plate where pcb-holder (maybe with conveyor belt), jedec trays and some manual stripfeeders are mounted needs to be absolutely even.
So, height adjustment should be possible.

I hope it is also clear that the feeder pickup position, the PCB and the height of components in the bottom vision lie on one height level to minimize optical errors.
As long as good and fast USB3 cameras (maybe we have on the fly vision someday) do not get cheaper yet, I would assemble two bottom cams - one fast for the small components and one high resolution for the larger components.
Switching the bottom vision camera's in openpnp2 will be working soon, i hope.

Christian Thomasser

unread,
Nov 20, 2019, 6:00:20 AM11/20/19
to OpenPnP
Hello Jim,

Well, I have access to a normal lathe of a lathe and a heavy diy CNC portal milling machine. The steel frame parts are laser cut. I also have a press brake available. The rest I do with manual skills.

Actually, I intended to build the autofeeder myself.
I already have a design where the 8mm Feeder is 20mm wide. The depth of the machine I can not change, because I already have the linear rails for the Y-axis.

I have taken into account that all the feeders are accessible from the valves. Only the camera does not reach the rear 2 feeders on both sides (a total of 4 feeders).

The cheeks of the X-axis are made of 5mm steel. Either I will add striving for stability. Or I make the cheeks from 20mm aluminum. Let's see. At the moment I have two Nema 24 4.0 Nm stepper motors as drive for the X-axis. Do you think that 4 Nm instead of 8 Nm are sufficient?

Yes, I know the disgusting noise, but I do not care, the engines are also quite loud :)

That's funny, exactly the same thought I had in the design of the Y-drive, so I have already installed 2 ball bearings per side here. The drive shaft, I have extra made of 20mm stainless steel, so that it does not twist.

I have also planned a reduction of 3: 1 on the Y-drive.

I would like to move the boards on a conveyor belt into the machine and out again. Thanks for the hint, I will make the height adjustable at the corners.

The feeder pickup position, the board and also the rest are constructed at the same height.

Do you think I can get enough accuracy with this machine design without using ballscrews and linear encoders, sufficiant to place QFP or 0402??

Jim

unread,
Nov 20, 2019, 8:00:08 AM11/20/19
to OpenPnP
Hello Christian,

If you want to be on safe side regarding accuracy and repeatabilty then think about placing optional linear encoders to correct belt and other errors.
You could go with cheap chineese ones (they seem to be good for < 1m/s travel speed) or very good ones from renishaw, lika etc. with symmetrical transmission of quadrature signals.
And if you find a solution (maybe a smoothie plugin or a specialized controller) to correct the error (we are talking about up to ~ 250µm estimated error in worst case) then you could place 0.5mm pitched parts easily and even smaller.

Making reliable feeders is so much work and could cost more than getting good used ones or some clones.
I was to lazy to make them by myself - i am using ready made electrical ones (adjustable pitch, CL compatible) and they are ok (no problems with 0201 or 0402).

Often cursing the mistake that I have made my machine so narrow - unfortunately I can load only 25 feeders on south side - that's not very much.

Marek T.

unread,
Nov 20, 2019, 10:26:24 AM11/20/19
to OpenPnP
Chinese optical encoder $40 works very well even at 2m/s. They have TTL outputs as standard order but possible (in theory) to order them with symetrical output. Or no big deal to put a converter into the sensor body as I did. The pain is some 40mm total height of device. No problem to use them for 0402 or BGA_0.5, they have 0.005 resolution.
Magnetical encoders are very flat but cost >$200.

Jason von Nieda

unread,
Nov 20, 2019, 10:32:06 AM11/20/19
to ope...@googlegroups.com
Marek, can you link one similar to yours?

Jason


On Wed, Nov 20, 2019 at 9:26 AM Marek T. <marek.tw...@gmail.com> wrote:
Chinese optical encoder $40 works very well even at 2m/s. They have TTL outputs as standard order but possible (in theory) to order them with symetrical output. Or no big deal to put a converter into the sensor body as I did. The pain is some 40mm total height of device. No problem to use them for 0402 or BGA_0.5, they have 0.005 resolution.
Magnetical encoders are very flat but cost >$200.

--
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/f9f1bdba-ecc3-4fad-81b7-e9a196afadc3%40googlegroups.com.
--
Sent from my BeOS enabled toaster
Message has been deleted

Marek T.

unread,
Nov 20, 2019, 11:29:04 AM11/20/19
to OpenPnP
Hi Jason,

I'm not sure what I exactly got from my Chinese partner but I have sent him the following link when explained what I ask him to find for me.
But looks like this:
(tell me pls does this shortcut link work for you properly?)

I have this on my X axis only and after some 100 hours still working good without any cleaning.


W dniu środa, 20 listopada 2019 16:32:06 UTC+1 użytkownik Jason von Nieda napisał:
Marek, can you link one similar to yours?

Jason

On Wed, Nov 20, 2019 at 9:26 AM Marek T. <marek.tw...@gmail.com> wrote:
Chinese optical encoder $40 works very well even at 2m/s. They have TTL outputs as standard order but possible (in theory) to order them with symetrical output. Or no big deal to put a converter into the sensor body as I did. The pain is some 40mm total height of device. No problem to use them for 0402 or BGA_0.5, they have 0.005 resolution.
Magnetical encoders are very flat but cost >$200.

--
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 ope...@googlegroups.com.

Jason von Nieda

unread,
Nov 20, 2019, 11:29:08 AM11/20/19
to ope...@googlegroups.com
Looks good, thanks Marek! Link works. I will get a few and play around a bit with checking the non-linearity of my cheap ballscrews.

Jason


On Wed, Nov 20, 2019 at 10:26 AM Marek T. <marek.tw...@gmail.com> wrote:
Hi Jason,

I'm not sure what I exactly got from my Chinese partner but I have sent him the following link when explained what I ask him to find for me.
But looks like this:
(tell me pls does this shortcut link is working for you?)

I have this on my X axis only and after some 100 hours still working good without any cleaning.

W dniu środa, 20 listopada 2019 16:32:06 UTC+1 użytkownik Jason von Nieda napisał:
Marek, can you link one similar to yours?

Jason

On Wed, Nov 20, 2019 at 9:26 AM Marek T. <marek.tw...@gmail.com> wrote:
Chinese optical encoder $40 works very well even at 2m/s. They have TTL outputs as standard order but possible (in theory) to order them with symetrical output. Or no big deal to put a converter into the sensor body as I did. The pain is some 40mm total height of device. No problem to use them for 0402 or BGA_0.5, they have 0.005 resolution.
Magnetical encoders are very flat but cost >$200.

--
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 ope...@googlegroups.com.
--
Sent from my BeOS enabled toaster

--
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.

Marek T.

unread,
Nov 20, 2019, 11:36:44 AM11/20/19
to OpenPnP
I think you will be glad if only the mechanical size of it fits to your machine.
Remember the interface output, the scale I got was TTL and only later I've found there are symethrical available as well.
So I have opened the body to put the converter inside it. Pity of play if can avoid it, however I have replaced this pancer cable into shielded ethernet cable at the occasion :-).

Jason von Nieda

unread,
Nov 20, 2019, 11:40:31 AM11/20/19
to ope...@googlegroups.com
I'm building a new machine - so I will make it fit :)

No worries on the TTL, easy to convert.

Thanks Marek!

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/11a4ecb1-4c57-4237-9f5f-ffddcdcac30e%40googlegroups.com.

Marek T.

unread,
Nov 20, 2019, 11:49:29 AM11/20/19
to OpenPnP
Yes it's easy, I know, I did it :-).
But just converter inside means much better shielding (I have the noises from 12A+18A servo motors).

Good luck with the new building :-)

Jim

unread,
Nov 20, 2019, 12:38:15 PM11/20/19
to OpenPnP
Hello Jason,

Wish you Good Luck (and no more back pain) for your new machine, too.

With the selfsticking € 63/m stripes from italy i am very happy - they give me 500 pulses/mm and for most boards i do panelization outside of openpnp2 and need then only 3 fids to use openpnp2 affine transformation for whole panel - accuracy is very good.

encoder.jpg


 

Marek T.

unread,
Nov 20, 2019, 12:47:57 PM11/20/19
to OpenPnP
 Hey Jim, give some link to these stripes' datasheet if you can.

Jim

unread,
Nov 20, 2019, 12:55:09 PM11/20/19
to OpenPnP
Hello Marek, we ordered them from lika directly, sensors were are custom made for us and needed several weeks for delivery.

Jim

unread,
Nov 20, 2019, 12:58:10 PM11/20/19
to OpenPnP

partnumber.PNG

Jason von Nieda

unread,
Nov 20, 2019, 1:03:34 PM11/20/19
to ope...@googlegroups.com
Jim,

When installing these, do you have to be very careful not to stretch or bend them? Is it complicated to install? How do you tell if there was any problems after install?

Jason


--
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.

Jim

unread,
Nov 20, 2019, 1:11:10 PM11/20/19
to OpenPnP
No, totally easy to mount. Just clean with IPA, mount sensor stripe first (black) and then stainless stell cover tape over.

lika2.jpg


lika1.jpg

Jason von Nieda

unread,
Nov 20, 2019, 1:14:53 PM11/20/19
to ope...@googlegroups.com
Thanks Jim, I see now the magnetic strip has a stainless backing, too. I guess this provides the rigidity to make sure that when it's mounted it is not stretched or bunched. Looks very nice!

Jason


--
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.

Marek T.

unread,
Nov 20, 2019, 1:17:17 PM11/20/19
to OpenPnP
The only shame the resolution is not too impressing, but maybe it's enough for you.

Jason von Nieda

unread,
Nov 20, 2019, 1:19:32 PM11/20/19
to ope...@googlegroups.com
Isn't it better than the optical one you mentioned? Jim said his are 1/500, or 0.002, while the optical ones are 0.005?

Jason


On Wed, Nov 20, 2019 at 12:17 PM Marek T. <marek.tw...@gmail.com> wrote:
The only shame the resolution is not too impressing, but maybe it's enough for you.

--
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.

Marek T.

unread,
Nov 20, 2019, 1:36:24 PM11/20/19
to OpenPnP
Echh, you are right, mistakenly moved on memory the comma a position too less:-).
Small dimensions, lightweight, good resolution and price - seems be perfect.
So the tape is $70/1m, and there is needed done sensor, isn't it?

I remember I talked to some Polish Lica dealer and he offered me some two types of encoders. One was very expencive, the second he didn't recomnend me because of some thermal issues. Both required long delivery time while I was in hurry. Unfortunately I don't remember the details about the types ee talked already.

Marek T.

unread,
Nov 20, 2019, 1:37:40 PM11/20/19
to OpenPnP
Typo <some sensor> of course.

Scott Wilson

unread,
Nov 20, 2019, 6:05:39 PM11/20/19
to OpenPnP
How are you guys interfacing the linear encoders? It doesn't look like smoothie supports it, so I'm guessing you're using external drivers with support or some other controller?

-Scott

Marek T.

unread,
Nov 20, 2019, 6:19:45 PM11/20/19
to OpenPnP
I use servo motors. They need special external drivers with inputs for encoders necessary to control servos' position.

Marek T.

unread,
Nov 20, 2019, 6:21:19 PM11/20/19
to OpenPnP
Not important in my case it is linear or rotary encoder.

Michael Anton

unread,
Nov 20, 2019, 6:54:00 PM11/20/19
to OpenPnP
Do these external drivers support both rotary, and linear encoders at the same time?  My understanding, is that you still need both.  The rotary closes the PID loop, and the linear is just used for final position.

Marek T.

unread,
Nov 20, 2019, 7:09:19 PM11/20/19
to OpenPnP
No, only one encoder at the same time. I have disconnected rotary encoder mounted on the motor axis and connected linear encoder to the driver in it's place, and re-tuned PID loop to the new encoder.

Michael Anton

unread,
Nov 20, 2019, 7:31:53 PM11/20/19
to OpenPnP
I'm surprised that works, as everything I've read says that is not a good idea.  If there is any backlash, or spring in the system, using only a linear encoder tends to cause the control loop to oscillate.

Michael Anton

unread,
Nov 20, 2019, 7:45:57 PM11/20/19
to OpenPnP
Here is a good article on why dual control loops are usually used: https://granitedevices.com/wiki/Dual-loop_feedback_position_control.

Jim

unread,
Nov 20, 2019, 9:45:47 PM11/20/19
to OpenPnP
Hello Michael,

You are right, most servo drive systems need both encoders to work properly.

Some manufactures called it "full closed loop".

This block schematic shows using the pulse train interface (most servo drivers have much more interfaces):

full_closed_loop.PNG






Marek T.

unread,
Nov 21, 2019, 1:48:10 AM11/21/19
to OpenPnP
Yes, I was surprised that it works too :-). Just I made this low cost experiment that finished good. Maybe because in real it's low inertial and lightweigh system to control.

ma...@makr.zone

unread,
Nov 21, 2019, 3:11:56 AM11/21/19
to ope...@googlegroups.com

Unfortunately the article does not really say why we can't close the loop all the way. It seems just to describe the limitations of current "sinusoidal" controller components available to them.

The given description is not logical, the inner loop will be stiff, yes, but it will be made less stiff by the outer loop and it is easy to see how the two can fight each other, in fact that is my expectation what happens unless the two operate on completely different time scales.

Creating a single loop that compensates on multiple overlapping oscillation time scales, that would be very interesting. Should be doable with some very low level machine learning. :-)

_Mark

Michael Anton

unread,
Nov 21, 2019, 3:21:56 AM11/21/19
to OpenPnP
I think that because the rotary encoder is only used with the PD terms, and the linear encoder drives the I term, that they are on completely different time scales.  The linear loop should be much slower than the PD loop, since the I term is usually pretty slow by comparison.

I've read many descriptions of this type of implementation, and the common theme seems to be if you try to use the linear loop only, and there is any mechanical slop in the system, you end up with oscillations, but using rotary encoder to close the inside loop fixes that.

Marek T.

unread,
Nov 21, 2019, 4:03:17 AM11/21/19
to OpenPnP
Yes this is problem. My ballscrew is 30yrs old, usage in the center part of x is much higher than at the endings. And it's hard to tune the pid universally to different loads then.
But tuning the pid for rotary encoder is also not easy as we need to don't miss the steps at very slow and very fast motions, at very short and relatively long jumps. Even changing the room temperatures and material parameters with it - everything matters for pid. Generally if anybody wants to loose the hair - tuning the pid is a good way ;).

So theory is theory, but in practice my system with linear encoder instead of rotary works very similar if we talk about the oscillations. But accuracy and linearity of the distances is just real now along the whole axis length.

Jim

unread,
Nov 21, 2019, 4:30:05 AM11/21/19
to OpenPnP

Hi Marek, your system seem to be still stiff enough that you could close the loop with linear encoder only.

On systems with long belts there is much less tension and more overswing - oscillations will occur.
I think that the inner loop (holding motor on position, providing the current) runs at much higher frequency than outer loop.

For belt systems an affordable solution that sits between e.g. smoothie and closed loop steppers (where inner loop can not be changed) would be cool.
I'm thinking of a correction loop that delays the "ok" from M500 and makes the correction moves - it would not be superfast, but it should help to gain accuracy/repeatabilty.

Or a smoothie plugin/module that makes that job.

jdlv

unread,
Nov 21, 2019, 5:08:42 AM11/21/19
to ope...@googlegroups.com
Hi Michael

I think it should be possible to do this with a smart stepper like this
one https://misfittech.net/nema-17-smart-stepper/ .and a few lines of
code to feed the I term calculation with the linear encoder and let the
P and D with the rotary encoder.
At first code sight it doesn't seem over complicated.

Joël




Le 21/11/2019 à 09:21, Michael Anton a écrit :
> I think that because the rotary encoder is only used with the PD terms, and
> the linear encoder drives the I term, that they are on completely different
> time scales. The linear loop should be much slower than the PD loop, since
> the I term is usually pretty slow by comparison.
>
> I've read many descriptions of this type of implementation, and the common
> theme seems to be if you try to use the linear loop only, and there is any
> mechanical slop in the system, you end up with oscillations, but using
> rotary encoder to close the inside loop fixes that.
>
> On Thursday, November 21, 2019 at 1:11:56 AM UTC-7, ma...@makr.zone wrote:
>>
>> Unfortunately the article does not *really *say *why *we can't close the

ma...@makr.zone

unread,
Nov 21, 2019, 5:14:14 AM11/21/19
to ope...@googlegroups.com
I love that!

Michael Anton

unread,
Nov 21, 2019, 5:24:40 AM11/21/19
to OpenPnP
I am aware of the Smart Steppers, as I originally bought a few of the Mechaduino boards that it is based on.  I had some early conversations with Trampas about his code implementation, as I was working on optimizing the Mechaduino code at around the same time.  My improved Mechaduino code can be found here: http://manton.ca/mechaduino, if you are interested.

Yes, I think that using one of the Smart Stepper or Mechaduino boards would work fine, since it has a rotary encoder that will close the fast part of the loop.  The inaccuracies of the magnetic encoder probably wouldn't matter as much, since the linear encoder is more precise, and would set the final position.

ma...@makr.zone

unread,
Nov 21, 2019, 5:30:36 AM11/21/19
to ope...@googlegroups.com

I don't think PID will ever adequately model it. The real world of high speed motion is too complex for a simple algorithm that was developed for governing the rotation of mill stones in windmills in the 17th century.

https://en.wikipedia.org/wiki/PID_controller#Origins

It would take something that has many more input and state variables with non-linear effect including absolute axis position, absolute speed, direction of motion, even temperatures, yes. If I understand it correctly, PID isn't even aware of the direction you're traveling, so things like whether the must drag chain must be rolled or unrolled can't be modeled and you'll have to do with the average friction term.

_Mark

Michael Anton

unread,
Nov 21, 2019, 6:44:01 AM11/21/19
to OpenPnP
The Wikipedia article doesn't say PID control was used for governing windmills.  It says a proportional system was used for this in the 17th century.  So this is only the first term (P), which gives pretty basic, non-predictive control, and with it alone, will never reach the final desired position (it can only come close without the I term).  Full PID control wasn't used until 1922.

Certainly the PID model cares what direction you are moving. It is contained within the first proportional term, which is the error term, positive is one direction, negative is the other.  It is certainly still used in motion systems today, but there may be additional information fed into the algorithm too, this doesn't make PID control invalid however.  Please look at the Smart Stepper or Mechaduino code, to get an idea of how this works.

In your drag chain example, if it is really disturbing the PID tuning, then the system is probably underpowered.  PID control can certain deal with non-symmetrical loads to some degree.  Take a look at some of the videos from the Smart Stepper, to get an idea.  The PID tuning on the servo system on my PnP, can certainly deal with the variable load of my umbilical cable, which ends up quite stretched at one end of the travel.

ma...@makr.zone

unread,
Nov 21, 2019, 8:54:55 AM11/21/19
to ope...@googlegroups.com

> The Wikipedia article doesn't say PID control was used for governing windmills...

I was joking/exaggerating. But I think its fair to say that even 1922 was quite a long time ago (not to say that everything old is bad)

  :-)

> Certainly the PID model cares what direction you are moving.

I'm no expert there, but are you sure? I don't see it in the formula, everything is sign agnostic/linear. Remember the sign of the error will be reversed too.

{\displaystyle
        u(t)=K_{\text{p}}\left(e(t)+{\frac {1}{T_{\text{i}}}}\int
        _{0}^{t}e(t')\,dt'+T_{\text{d}}{\frac {de(t)}{dt}}\right),}

Sure, PID has no problem to adapt to different errors developing in due time depending on which way you move. But anticipating the errors in advance differently, depending on which way you move, is not in there, I believe.

In fact it seems to me, the text talks about this case specifically:

However, this method fails if, for instance, the arm has to lift different weights: a greater weight needs a greater force applied for a same error on the down side, but a smaller force if the error is on the upside. That's where the integral and derivative terms play their part.

And then:

An integral term increases action in relation not only to the error but also the time for which it has persisted. So, if applied force is not enough to bring the error to zero, this force will be increased as time passes.

It is the "as time passes" that is the problem with high speed motion, I believe. I'm not saying a more advanced control doesn't exist (and even in the form of something built on top of PID). I'm just saying that pure PID (as in the three letters "proportional, integral, and derivative") might not be up to it.

> In your drag chain example, if it is really disturbing the PID tuning, then the system is probably underpowered.

Well, personally I'm fascinated by brainy solutions that work without throwing bigger motors at problems. :-)

_Mark

Marek T.

unread,
Nov 21, 2019, 12:07:21 PM11/21/19
to OpenPnP
My drivers have only one more parameters except P-I-D to tune. And it's not easy to set the "combination" properly. However I have impression that this driver lives with his own life and doesnt't do what is exactly expected after some parameter changing.
But SanyoDenki professional driver has some 25 parameters to tune. And costs €1500 not 100.

Marek T.

unread,
Nov 21, 2019, 12:11:54 PM11/21/19
to OpenPnP
So Christian wanted to know what the recommended belt is while got almost full explanation how the servo pids work :-) :-).

Scott Wilson

unread,
Nov 21, 2019, 12:16:59 PM11/21/19
to ope...@googlegroups.com
Still wrapping my head around reasonable solutions with linear feedback- It looks like using LinuxCNC as a motion controller with dumb stepper driver would give you tons of options for DIY prices. I couldn't find much about openpnp and linuxcnc, but since it can just be a generic gcode controller I assume its pretty straightforward.

On Thu, Nov 21, 2019 at 12:07 PM Marek T. <marek.tw...@gmail.com> wrote:
My drivers have only one more parameters except P-I-D to tune. And it's not easy to set the "combination" properly. However I have impression that this driver lives with his own life and doesnt't do what is exactly expected after some parameter changing.
But SanyoDenki professional driver has some 25 parameters to tune. And costs €1500 not 100.

--
You received this message because you are subscribed to a topic in the Google Groups "OpenPnP" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openpnp/_VJgo6AQtu0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openpnp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/8ddee081-1ae9-4f71-ad74-374038941119%40googlegroups.com.

Christian Thomasser

unread,
Nov 21, 2019, 3:38:51 PM11/21/19
to OpenPnP
Doesn't matter :)

To the belt width:
I will use HTD-5M width 25mm - i know it is overkill but i think this provides a little bit more stability because of the smaller elongation and the higher inertia that benefits vibration damping.

To PID explaination and all other feedback:
I'm pretty good at designing and building machines, but I'm an absolute novice in the field of PNP machines.
That's why I'm extremely grateful for all the suggestions and experiences that you share with me. I only want to build the machine once - so I can not make irreversible mistakes


So do not let that bother you ;-)

Christian Thomasser

unread,
Nov 21, 2019, 3:42:36 PM11/21/19
to OpenPnP
In any case I will design my machine to include a possible linear scale upgrade on the X and Y axes.

Michael Anton

unread,
Nov 21, 2019, 5:20:48 PM11/21/19
to OpenPnP


On Thursday, November 21, 2019 at 6:54:55 AM UTC-7, ma...@makr.zone wrote:

> The Wikipedia article doesn't say PID control was used for governing windmills...

I was joking/exaggerating. But I think its fair to say that even 1922 was quite a long time ago (not to say that everything old is bad)

  :-)


I'm always amazed by how advanced some of the math and physics was way back then.  Sure, as a society we have expanded on much of that stuff, but those base laws that were figured out, are still largely unchanged to this day.
 

> Certainly the PID model cares what direction you are moving.

I'm no expert there, but are you sure? I don't see it in the formula, everything is sign agnostic/linear. Remember the sign of the error will be reversed too.

{\displaystyle
        u(t)=K_{\text{p}}\left(e(t)+{\frac {1}{T_{\text{i}}}}\int
        _{0}^{t}e(t')\,dt'+T_{\text{d}}{\frac {de(t)}{dt}}\right),}


It isn't sign agnostic, in that you do have to pay attention to the sign.  The error term e(t), can be positive or negative, as can the integral, and differential terms.  If the SV is less than the PV, then that would result in motion in one direction, if SV is greater than the PV, then the motion would be in the other direction, and if SV is equal to PV, then there is no motion.  Otherwise, the PID control loop wouldn't work at all.  It has to be able to move the PV in either direction.  Think of the motion in absolute position terms, and then it starts to make much more sense.
 

Sure, PID has no problem to adapt to different errors developing in due time depending on which way you move. But anticipating the errors in advance differently, depending on which way you move, is not in there, I believe.


Your are correct, it can't make a prediction, which is why other feed forward methods are often used along with PID control, which the text also talks about.
 

In fact it seems to me, the text talks about this case specifically:

However, this method fails if, for instance, the arm has to lift different weights: a greater weight needs a greater force applied for a same error on the down side, but a smaller force if the error is on the upside. That's where the integral and derivative terms play their part.

And then:

An integral term increases action in relation not only to the error but also the time for which it has persisted. So, if applied force is not enough to bring the error to zero, this force will be increased as time passes.

It is the "as time passes" that is the problem with high speed motion, I believe. I'm not saying a more advanced control doesn't exist (and even in the form of something built on top of PID). I'm just saying that pure PID (as in the three letters "proportional, integral, and derivative") might not be up to it.


Yes, PID alone may not give you the absolute fastest performance, but it will generally give pretty good performance, and it will allow you to reach the desired position in time, with high accuracy. 

We have been discussing home built PnPs here, which generally don't have the highest performance, and as others have pointed out, getting the highest performance without adding significant mass to the structure to stabilize it is pretty impossible anyhow.  But, there are certainly gains to be made by using linear encoders, in that the final machine position is then known accurately.  The control system to add these into the mix doesn't have to be all that complicated in order to get better accuracy, but if you also want increased performance, now you have a much bigger problem.

Christian Thomasser

unread,
Nov 21, 2019, 5:59:49 PM11/21/19
to OpenPnP
How much influence does the polygon effect have on the accuracy??

Jim

unread,
Nov 21, 2019, 10:32:27 PM11/21/19
to OpenPnP
The pulley diameter goes into resolution, torque and speed.

With GT2 on your nema24 you wont see a polygon effect, but with HTD5M on a 12T it could be "feelable" when tension is high.
But we do not care because with a pnp-machine there is no need to produce gloss surfaces.

The pulley quality (perfect center bore, precision machined brass or cheap alu type) has a lot of influence to linearity, too.

ma...@makr.zone

unread,
Nov 22, 2019, 3:22:10 AM11/22/19
to ope...@googlegroups.com

I think, it turns out that on a closer look we're on the same page.

_Mark

Am 21.11.2019 um 23:20 schrieb Michael Anton:

Your are correct, it can't make a prediction, which is why other feed forward methods are often used along with PID control, which the text also talks about.
 

Trampas Stern

unread,
Nov 22, 2019, 8:03:34 AM11/22/19
to OpenPnP
Christian, 

On your mechanical design it would be best to turn the machine upside down.  That is envision taking your machine and removing base plate and then turning upside down.  This will give you all 4 sides for pick locations with shorter throw on the head. 

Trampas

Trampas Stern

unread,
Nov 22, 2019, 8:08:52 AM11/22/19
to OpenPnP
As far as mechanics go and using PID, it does help but at the end of the day F=MA, thus if you are accelerating (or decelerating) a mas like the PnP head you need a force do this. Every force has an equal and opposite force.  Therefore to keep machine from bouncing you need mass.  My commercial PnP weighs as much as car for a reason.  When I built a PnP it would vibrate the parts out of the feeders, because it did not have the mass for the speed I was running it.  

Mike M.

unread,
Nov 22, 2019, 8:27:26 AM11/22/19
to OpenPnP
Hello,
At the end of the day the best is to avoid belts of any type if possible, or have short belt distaance just from motor to screw pulley if needed, but direct drive with coupling would be the best solution...
Mike

Marek T.

unread,
Nov 22, 2019, 9:04:31 AM11/22/19
to OpenPnP
In my industrial machine this distance that Mike said is near 80mm.

Christian Thomasser

unread,
Nov 22, 2019, 12:30:18 PM11/22/19
to OpenPnP
Hello Trampas,

thank you for your feedback!!
The total space that my design provides for feeders is 1000mm. Thats enough space for 50 pcs of my selfmade feeders up to reel width of 18mm. For my tasks this is absolute enough.

For me it makes no sense to plug in feeders on front or backside of the machine. I just have limited space so i want to design a compact and heavy machine in table top size.

I will design for timing belts but i also plan the possibility to upgrade the machine with linear scales or to be screw driven if necassary.

At the moment the total travel of the placement head is 500x700mm. In this area, all of the 4 single nozzles can reach every of the 50 autofeeders, every vibration feeder or optional pick up position and of course the maximum pcb working area of 300x500mm. That is more than I will ever need.

Maple_Dude

unread,
Nov 22, 2019, 9:29:49 PM11/22/19
to OpenPnP
Wow, sounds pretty cool.
Reply all
Reply to author
Forward
0 new messages