Motion Controller Designed for OpenPnP

1,829 views
Skip to first unread message

Lance Endres

unread,
May 23, 2021, 1:36:28 PM5/23/21
to OpenPnP
It seems to me that the specifics of a pick-and-place machine warrants its own motion control card.  The combination of high accuracy and high speed is unique to pick-and-place machines.  And the number of motors being driven is higher than most applications.  Jarosław Karwik has already done some really promising work:
But in the end, all those cards were designed as general cards or even aimed more towards things like 3D printers.  And I think we are all aware that pick-and-place machines come with their own specific challenges.

My friend and I were discussing what that controller should look like and here's what we came up with:
  • Mother and daughterboard pair (to allow remote mounting of daughterboard in the head)
  • Microprocessor capable of 3-order motion
  • On board USB hub, only 1 connection required to the computer
  • Capable of driving up to NEMA 23 motors for X and Y-axes
  • Able to reconfigure controller without having to compile new firmware (like Smoothieware)
  • Built-in vacuum sensors
  • Built-in protection against solenoids
  • Capable of running up to 4 nozzles
Besides the hardware challenges of pick-and-place machines, I think having our own control card would bring additional benefits:
  • The firmware could be pick-and-place specific.  No need to have a bunch of extra stuff related to 3D printers or laser cutters cluttering things up.  Updates could happen faster.
  • Tighter integration with OpenPnP could make setup much easier for new users/builders.
What other major features should this motion controller have?  It's my understanding that the Duet3 has a web interface for configuration, would that make setup easier for new users/builders?

I am interested to hear any discussion points people have about this topic.  Are there additional features required?  Do you think such a controller card is warranted?  I feel certain it will happen at some point.  Are we ready for it now?

Lance



Arthur Wolf

unread,
May 23, 2021, 1:52:11 PM5/23/21
to ope...@googlegroups.com
On Sun, May 23, 2021 at 7:36 PM Lance Endres <lance...@gmail.com> wrote:
It seems to me that the specifics of a pick-and-place machine warrants its own motion control card.

Just for reference/if you are curious about the opposed idea to this:

The *whole point* of the Smoothie project (smoothieware.org, currently recommended for OpenPNP by the project I believe), is to have a system that is *not* dedicated to a machine type in particular (the way things were before Smoothie was first started years ago), but instead to make a system that is designed from the ground up to support different machine types.

The reason why, is that instead of having 10 people working on a laser controller, and 15 other people working on a pick and place controller ( and 30 for 3D printing, and 20 for CNC milling, etc etc, the list is *actually* long ), you instead have *all* of those people all working together on a single thing.

So when some improvement to the acceleration code, or to the electronic components for the endstops, is added to the project, it doesn't just benefit *one* machine type, say the laser, but it benefits *all* of the machines.

The goal here, is that work is optimized, there is less duplication of labor.

This was the intended goal of the project at the beginning, and it has work beautifully since, this hasn't been just a theoretical thing, in practice this pooling of ressources/efforts has actually massively functionned.

Of course, anyone can do anything, and I'm sure there are benefits to making a "more dedicated" controller for a given machine type.

Actually, you should probably read the history of this mailing list, the idea of making a controller dedicated controller just for the OpenPNP project isn't new, and is something I've seen many conversations/projects about, I sort of get the feeling we get a new "openpnp-specific" controller design maybe once a year or so around here.

So talking about "pooling efforts", maybe take a look at what people have already been doing, I'm sure there's a lot of their work you could re-use/extend/benefit from.

And maybe it would even make more sense to contribute to existing boards/projects/efforts, rather than re-inventing the wheel starting from scratch.


  The combination of high accuracy and high speed is unique to pick-and-place machines.  And the number of motors being driven is higher than most applications.  Jarosław Karwik has already done some really promising work:
But in the end, all those cards were designed as general cards or even aimed more towards things like 3D printers.

There are other, OpenPNP-dedicated boards around, you should search this mailing list for them (and I'm sure their authors would be glad to talk to you about them).

  And I think we are all aware that pick-and-place machines come with their own specific challenges.

My friend and I were discussing what that controller should look like and here's what we came up with:
  • Mother and daughterboard pair (to allow remote mounting of daughterboard in the head)
  • Microprocessor capable of 3-order motion
  • On board USB hub, only 1 connection required to the computer
  • Capable of driving up to NEMA 23 motors for X and Y-axes
  • Able to reconfigure controller without having to compile new firmware (like Smoothieware)
  • Built-in vacuum sensors
  • Built-in protection against solenoids
  • Capable of running up to 4 nozzles
Besides the hardware challenges of pick-and-place machines, I think having our own control card would bring additional benefits:
  • The firmware could be pick-and-place specific.  No need to have a bunch of extra stuff related to 3D printers or laser cutters cluttering things up.  Updates could happen faster.
  • Tighter integration with OpenPnP could make setup much easier for new users/builders.
What other major features should this motion controller have?  It's my understanding that the Duet3 has a web interface for configuration, would that make setup easier for new users/builders?

I am interested to hear any discussion points people have about this topic.  Are there additional features required?  Do you think such a controller card is warranted?  I feel certain it will happen at some point.  Are we ready for it now?

Lance



--
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/1260cb7e-863c-45c2-9e16-7fde92e81611n%40googlegroups.com.


--
勇気とユーモア

dc42

unread,
May 23, 2021, 4:33:00 PM5/23/21
to OpenPnP
If you want to mass produce PnP machines, then of course a dedicated board makes sense to reduce costs and perhaps simplify wiring. However, unless you are making at least a thousand machines, the costs of development and small production runs make a dedicated solution expensive, and a general purpose board such as Duet or Smoothieboard will be more economical, even if it offers some functionality that you don't need.

Looking at your wish list:

  • Mother and daughterboard pair (to allow remote mounting of daughterboard in the head)
  • Microprocessor capable of 3-order motion
  • On board USB hub, only 1 connection required to the computer
  • Capable of driving up to NEMA 23 motors for X and Y-axes
  • Able to reconfigure controller without having to compile new firmware (like Smoothieware)
  • Built-in vacuum sensors
  • Built-in protection against solenoids
  • Capable of running up to 4 nozzles
Duet 3 MB6HC provides all of those, except for the on-board USB hub and built-in vacuum sensors (would you really want the vacuum sensors on the main board anyway?). Duet 3 Mini likewise, except for the ability to drive Nema 23 motors.

I guess you might want to make a new head-mounted board to drive multiple small motors, to more easily handle a head with 4 nozzles. The options currently available from Duet3D are the Tool Board 1LC, which has just one motor driver; and the EXP3HC, which has three high-current ones and is therefore quite large. You could design a new head-mounted board based on the Duet3D EXP3HC expansion board design, but use TMC2209 drivers to reduce cost and space, and leave off any other parts that you don't need.

Or perhaps the 4-nozzle solution you had in mind was an IDEXY configuration, with two heads moving independently in XY having two nozzles each? IDEXY 3D printers already exist (using Duets); maybe OpenPnP can support this arrangement too?

Bear in mind that now is not a good time to be designing new electronics that uses microcontrollers or FPGAs, because these are getting very hard to source. Lead times for many parts are around 1 year. You might be able to buy a few MCUs for prototyping, only to find that none are available when you want to manufacture.

Arthur Wolf

unread,
May 23, 2021, 4:38:03 PM5/23/21
to ope...@googlegroups.com
On Sun, May 23, 2021 at 10:33 PM dc42 <dcro...@duet3d.com> wrote:
If you want to mass produce PnP machines, then of course a dedicated board makes sense to reduce costs and perhaps simplify wiring. However, unless you are making at least a thousand machines, the costs of development and small production runs make a dedicated solution expensive, and a general purpose board such as Duet or Smoothieboard will be more economical, even if it offers some functionality that you don't need.

Looking at your wish list:
  • Mother and daughterboard pair (to allow remote mounting of daughterboard in the head)
  • Microprocessor capable of 3-order motion
  • On board USB hub, only 1 connection required to the computer
  • Capable of driving up to NEMA 23 motors for X and Y-axes
  • Able to reconfigure controller without having to compile new firmware (like Smoothieware)
  • Built-in vacuum sensors
  • Built-in protection against solenoids
  • Capable of running up to 4 nozzles
Duet 3 MB6HC provides all of those, except for the on-board USB hub and built-in vacuum sensors (would you really want the vacuum sensors on the main board anyway?). Duet 3 Mini likewise, except for the ability to drive Nema 23 motors.

I guess you might want to make a new head-mounted board to drive multiple small motors, to more easily handle a head with 4 nozzles. The options currently available from Duet3D are the Tool Board 1LC, which has just one motor driver; and the EXP3HC, which has three high-current ones and is therefore quite large. You could design a new head-mounted board based on the Duet3D EXP3HC expansion board design, but use TMC2209 drivers to reduce cost and space, and leave off any other parts that you don't need.

Or perhaps the 4-nozzle solution you had in mind was an IDEXY configuration, with two heads moving independently in XY having two nozzles each? IDEXY 3D printers already exist (using Duets); maybe OpenPnP can support this arrangement too?

Bear in mind that now is not a good time to be designing new electronics that uses microcontrollers or FPGAs, because these are getting very hard to source. Lead times for many parts are around 1 year.

I'll confirm that strongly: we are re-designing Smoothie v2 from the LPC4330 to the STM32H7 for this exact reason: nearly one year lead time on the component we initially designed around, and it's taking us only a few months to redesign around the new chip and port the firmware (both of which are nearly done now).
This was quite the crazy realization, when we were nearly ready to start shipping the board, and were arranging production of the last prototype run, as we tried getting the components for those last prototypes, realizing some components had lead-times counted in months, and others had up to 5000% price markups...
Quite the crazy situation for board design lately.

You might be able to buy a few MCUs for prototyping, only to find that none are available when you want to manufacture.

On Sunday, 23 May 2021 at 18:36:28 UTC+1 lance...@gmail.com wrote:
It seems to me that the specifics of a pick-and-place machine warrants its own motion control card.  The combination of high accuracy and high speed is unique to pick-and-place machines.  And the number of motors being driven is higher than most applications.  Jarosław Karwik has already done some really promising work:
But in the end, all those cards were designed as general cards or even aimed more towards things like 3D printers.  And I think we are all aware that pick-and-place machines come with their own specific challenges.

My friend and I were discussing what that controller should look like and here's what we came up with:
  • Mother and daughterboard pair (to allow remote mounting of daughterboard in the head)
  • Microprocessor capable of 3-order motion
  • On board USB hub, only 1 connection required to the computer
  • Capable of driving up to NEMA 23 motors for X and Y-axes
  • Able to reconfigure controller without having to compile new firmware (like Smoothieware)
  • Built-in vacuum sensors
  • Built-in protection against solenoids
  • Capable of running up to 4 nozzles
Besides the hardware challenges of pick-and-place machines, I think having our own control card would bring additional benefits:
  • The firmware could be pick-and-place specific.  No need to have a bunch of extra stuff related to 3D printers or laser cutters cluttering things up.  Updates could happen faster.
  • Tighter integration with OpenPnP could make setup much easier for new users/builders.
What other major features should this motion controller have?  It's my understanding that the Duet3 has a web interface for configuration, would that make setup easier for new users/builders?

I am interested to hear any discussion points people have about this topic.  Are there additional features required?  Do you think such a controller card is warranted?  I feel certain it will happen at some point.  Are we ready for it now?

Lance



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


--
勇気とユーモア

Jarosław Karwik

unread,
May 24, 2021, 2:11:17 AM5/24/21
to OpenPnP
Yeah, it is crazy -  especially with components. These days even highest priced STM32H7 are hard to get...
It does not help that people started buying components like never before - I have myself bought vital parts for next 12 months of my production. So the shortages will last, but not forever (saturation of stocks will happen at some pint). I can already see some light for the next year.

In my case the controller is part of commercial project - I need my own board with some specific features ( I design electronics for industrial ink printers).
When doing it - I have realized that the design is pretty good match for pick and place machines :-) and I decided to share.
It still does not work - mainly because I have to finish first one high priority design for my biggest client.

About the features - I would say you need ethernet ( even if you keep USB).  There are too many cases USB is troublesome, while ethernet works flawlessly.
In my design I use ethernet to master board ( with possibility to use USB), remaining boards are connected via high speed CAN - FD .

betzt...@gmail.com

unread,
May 24, 2021, 4:20:20 PM5/24/21
to OpenPnP
I can relate highly to this thread. My certified designs had the STM32's in it go out of stock until 2022, so I had to redesign and purchase a years worth of a different, yet available STM32, two days later those chips went out of stock world-wide!! 

Crazy times....

Peter.

Arthur Wolf

unread,
May 24, 2021, 4:34:12 PM5/24/21
to ope...@googlegroups.com
On Mon, May 24, 2021 at 10:20 PM betzt...@gmail.com <betzt...@gmail.com> wrote:
I can relate highly to this thread. My certified designs had the STM32's in it go out of stock until 2022, so I had to redesign and purchase a years worth of a different, yet available STM32, two days later those chips went out of stock world-wide!! 

Which chip was it?


Crazy times....

Peter.

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


--
勇気とユーモア

Betz Technik Industries Ltd.

unread,
May 24, 2021, 4:35:15 PM5/24/21
to ope...@googlegroups.com

 

It was the STM32F411 in LQFP, now is the STM32L072 in LQFP.

 

Jarosław Karwik

unread,
May 24, 2021, 4:35:59 PM5/24/21
to ope...@googlegroups.com
I have similiar issue with STM32F105RCT6

phil barrett

unread,
May 25, 2021, 10:38:51 AM5/25/21
to OpenPnP
I'm new to the group but have been making motion controllers for some time now. My most recent offering is a 5 Axis motion controller based on the Teensy 4.1 (iMXRT1062 at 600 mhz) using grblHAL (a 32-bit extension to Grbl that runs on 13 different microcontrollers). Supports up to 5 external Relays/TTL outputs. It has I2C and UART headers that allow for expansion. Capable of driving steppers at up to 400 kHz.  I also have several I2C daughter cards in the pipeline - one is an isolated 12 bit ADC (vac sensor?) and another is a 16 bit I/O expansion card. Adding additional ADC channels is fairly easy.  The grblHAL developer is also adding PnP extensions  and is motivated to add additional ones to support the OpenPnP community.

I have several follow on boards that also run grblHAL and am interested in creating a board that meets the needs of the OpenPnP community so I am following these discussions closely.

Harjit Singh

unread,
May 26, 2021, 6:20:16 AM5/26/21
to ope...@googlegroups.com
Please consider incorporating Pololu style 16 pin dual inline stepper motor driver board support.

It may have been your project for a carrier board for the Teensy 4.0 but that used Marlin. If so, why the change to Grbl?

Thanks.

Mike Menci

unread,
May 26, 2021, 7:36:24 AM5/26/21
to OpenPnP
and Bills Github !
mike

Arthur Wolf

unread,
May 26, 2021, 9:51:13 AM5/26/21
to ope...@googlegroups.com
On Wed, May 26, 2021 at 12:20 PM Harjit Singh <zeet...@gmail.com> wrote:
Please consider incorporating Pololu style 16 pin dual inline stepper motor driver board support.

There are very good reasons why these have progressively gotten out of fashion over the years in the Reprap and other Open-Source CNC communities, despite the carrier boards themselves seeing significant evolution/improvement over time.
Despite that betterment/progress, fewer and fewer boards support those driver boards.

The reason is, these boards are a terrible idea.
They were initially used on the RAMPs boards at the very beginning of Reprap, simply because they were the only easy thing available, and the fastest way to a working prototype/system.

But they pretty much go against the way drivers are *designed* to be used. Drivers are supposed to be cooled by the PCB below them, and those drivers simply do not have enough PCB surface to properly cool the driver from the heat usage generates.
This is why drivers rated for 2A use, when installed on Pololu carriers, have rated maximum current abilities of 1.4A typically.

They also severely limit the ability to use the more advanced features of systems like the Trinamic drivers, and create a complete mess of standards/compatibility due to trying to use the socket in situations it's really not designed for.

All in all, these are not a good idea, and it's a good thing they are falling out of favor.

Directly integrating the drivers on the board is the way the drivers are *designed* to be used, and it's a very superior way to do things.

phil barrett

unread,
May 26, 2021, 10:59:27 AM5/26/21
to OpenPnP
While the Stepstick style boards have lots of limitations as other have noted, they do meet a need. If you have an application that doesn't need a lot of current for the stepper motors, they work fine.  Especially with the newer TMC drivers.  I would not recommend them for steppers that need over 1A.  But there are lots of cases where stepsticks are a perfectly valid solution. They certainly have increased the number of motion controllers in the world and allowed price points that are not possible with external or integrated drivers.

That said, I generally do not recommend them. The low cost is alluring but if one builds a system with stepsticks and then realizes they need more power or speed, they wind up wasting time and money.  And they maybe have to get a new system case because they need a lot more room for external drivers. 

phil barrett

unread,
May 26, 2021, 11:05:00 AM5/26/21
to OpenPnP
|  It may have been your project for a carrier board for the Teensy 4.0 but that used Marlin. If so, why the change to Grbl?
No, that was not mine.  I have only used grblHAL with the Teensy 4.1. My board targets CNC machines like routers, mills, lathes, laser cutters/engravers, foam cutters and similar.

Arthur Wolf

unread,
May 26, 2021, 11:08:52 AM5/26/21
to ope...@googlegroups.com
I definitely do not deny their (stepstick/pololu) usefulness historically.

I want to note though, on the price side of things, it's generally a misconception that they are advantageous.
All in all, it costs less to solder/integrate a driver directly to your controller, than to have to pay for :
* Female headers
* Male headers
* Assembly of above (they are not SMT, that means extra manual assembly costs)
* Soldering of above (same)
* Extra PCB processing costs
* Inability to design a full-SMT board (further price increase for the design)

All of which direct integration allows you to save the cost of.




--
勇気とユーモア

bert shivaan

unread,
May 26, 2021, 11:19:55 AM5/26/21
to OpenPnP
Until I blow a drive, then how do I fix it?

I have a control right now using 3 "step stick" style drives and 2  Other high power drives. I found it just fine to grab step/dir from the header where the step stick would have been. I can agree about the cost of the headers, But if thats really an issue offer the boards sans headers. 

One could simply direct solder their step stick to the control board, and still be able to remove it when I blow the driver.

Just my 10 cents

Betz Technik Industries Ltd.

unread,
May 26, 2021, 11:22:58 AM5/26/21
to ope...@googlegroups.com

 

“Until I blow a drive, then how do I fix it?”

 

In the context of this group, it really is not difficult to replace a small surface mounted chip...

 

 

Arthur Wolf

unread,
May 26, 2021, 11:23:26 AM5/26/21
to ope...@googlegroups.com
On Wed, May 26, 2021 at 5:19 PM bert shivaan <bert.s...@gmail.com> wrote:
Until I blow a drive, then how do I fix it?

That's 2008 thinking :)

I'll replace your board.
It's so incredibly rare, it's no issue at all.

Stepstick drivers sometimes burn. On-board drivers never do (or close to never) in comparison.

I expect most other board manufacturers would do the same and just replace the entire board for free.

Modern boards have diodes protecting the drivers making it close to impossible to destroy them.
Even if you did manage to destroy a driver for a board the manufacturer doesn't want to replace for you, wiring an external driver is extremely easy and extremely cheap.

ma...@makr.zone

unread,
May 26, 2021, 11:43:14 AM5/26/21
to ope...@googlegroups.com

Is it easy to blow one of the more modern ICs today? I've made many mistakes and never blew one from outside connections.

However, I did blow one, when I inserted a stick the wrong way around. Luckily the board survived. So in my book there is no real "for dummies like me"-advantage to have sticks. ;-)

It would be nice though, for a board to break out the step/dir pins etc. and to be able to disable the on-board driver (if it matters), so one can attach external drivers. There are valid reasons to do so (cabling, special purpose drivers, motor integrated drivers, etc.).

_Mark

Arthur Wolf

unread,
May 26, 2021, 11:47:20 AM5/26/21
to ope...@googlegroups.com
On Wed, May 26, 2021 at 5:43 PM ma...@makr.zone <ma...@makr.zone> wrote:

Is it easy to blow one of the more modern ICs today? I've made many mistakes and never blew one from outside connections.

However, I did blow one, when I inserted a stick the wrong way around. Luckily the board survived. So in my book there is no real "for dummies like me"-advantage to have sticks. ;-)

It would be nice though, for a board to break out the step/dir pins etc.


All the modern controller boards I can think of, as far as I know, do break those out.
I would strongly recommend Lance/anyone else thinking of designing a new controller system, to also break those off.
Alternatively, most controller boards break out "extra" GPIO, and will allow you to use *those* for step/dir pins for any of the axes (some might require you edit the source code for this, but at least they allow you to do it *some* way).



--
勇気とユーモア

Sairfan

unread,
May 26, 2021, 11:21:54 PM5/26/21
to OpenPnP
I would strongly recommend to add Ethernet support as USB has lots of limits, Stepper motor drivers should be flexible to choose like even if some wants to use closed loop steppers, board should be open to new experiments like highly customizable. give lots of headers you can put on board jumper that can be cut off when needed and headers could be solder when needed, i believe this could be helpful because lots of people out there want to work on oipen pnp and such highly customizable board will also greatly helpful not only quickly setup a machine but for those as well who want to move forward and improve the machine. 

Phil Barrett

unread,
May 26, 2021, 11:28:16 PM5/26/21
to ope...@googlegroups.com

I would strongly recommend to add Ethernet support as USB has lots of limits,
Definitely. I have ethernet on my board and recommend it over USB.  Galvanic isolation as well as high levels of EMI resistance make it head and shoulders better than USB. It does add cost (though not that much) but the price is worth it. 

Jason von Nieda

unread,
May 26, 2021, 11:39:02 PM5/26/21
to ope...@googlegroups.com
Hi Phil,

Thanks for posting about this. I'd never heard of the board or of grblHAL and both sound really interesting!

Thanks,
Jason


Eric Norton

unread,
May 27, 2021, 12:11:12 AM5/27/21
to ope...@googlegroups.com
I figured I'd jump right in and add my two cents to this conversation so here goes...

Driver Modules - the driver modules if designed properly can handle up to 3 amps per pin on the header alone. If you design the driver board properly with four or more layers you can dissipate the heat by placing the IC and its components on the bottom side and add a suitable heatsink to the top exposed ENIG pad with sufficient vias to transfer the heat. I have designed several using the TMC2209 and the TMC2226 drivers with no performance degradation and thermal performance is well within tolerance.

USB/Ethernet - USB 2.0 is not a bad interface if used properly and understand how the protocol works to successfully transfer the data. You need it to be an isolated interface if attached to a machine as I have found ground loops cause all sorts of problems and especially with motors involved. Ethernet is a solid interface but again you need to isolate it from the machine.

ma...@makr.zone

unread,
May 27, 2021, 2:03:28 AM5/27/21
to ope...@googlegroups.com

Can Ethernet be made as fast as USB (low latency) on common MCUs?

_Mark

Jarosław Karwik

unread,
May 27, 2021, 2:18:16 AM5/27/21
to ope...@googlegroups.com
Both (usb and ethernet) have similiar latency - usually 2..3 task switches. This equals 2..3ms max. My loop driven solution on 200MHz CPU is about 0.5ms.

In hardware both solutions are DMA driven and quality of software decides the speed, altgough there is more overhead in case of processing ethernet frames. But it is still fraction of ms.

Niclas Hedhman

unread,
May 27, 2021, 2:18:16 AM5/27/21
to ope...@googlegroups.com
If you keep it on separate segments, and don't mix in other traffic (say run OpenPnp and watch YouTube meanwhile) Ethernet should be in sub-millisecond latency on all packets, which I assume is adequate. And of course it is not Ethernet itself that adds latency, it is the buffering in network cards and the Linux kernel. Anecdote; investment banks that have direct connectivity to stock exchange servers have dedicated/embedded hardware that does high frequency trading with ~10microsecond round trip and Linux kernel adds too much latency for this. 

Niclas

ma...@makr.zone

unread,
May 27, 2021, 2:48:00 AM5/27/21
to ope...@googlegroups.com

Then I guess Ethernet is definitely the better choice due to inherent isolation.

Otherwise an on-board USB isolator or other means of isolating from the machine rails, seems necessary, at least for a trouble-free setup with no special care about how many plugs away your computer is connected to the mains and how long the USB cable is. Just based on some very simple calculations with expected current pulses, bulk capacitor ESR and lead/connector resistances (not even taking inductances into account). A fast PnP is not a 3D printer.

_Mark

Niclas Hedhman

unread,
May 27, 2021, 3:20:52 AM5/27/21
to ope...@googlegroups.com

A lot will also depend on higher level protocols and how they are used. It is quite easy to not do the right thing, thanks to the packet nature of Ethernet, yet having TCP as a streaming programming model. It is less straightforward than a serial port.

Niclas





Markus Kreidl

unread,
May 27, 2021, 8:15:26 AM5/27/21
to ope...@googlegroups.com
Hi,

a while ago I was thinking about a new controller board too. My
approach was a bit more advanced using a xilinx zynq or xilinx Kria
K26 [1].

The plan was to generate stepper signals in the FPGA part and move
Real time Tasks to a bare metal Jailhouse hypervisor cell [2].
This means OpenPnP (in a Linux Cell) and controlling software could
run on the same hardware.
As soon as I have the Kria K26 Board Evalboard I will test image
processing capabilities.


just my two cents

Markus

[1] https://www.xilinx.com/products/som/kria/k26c-commercial.html
[2] https://github.com/siemens/jailhouse
> To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/CADmm%2BKcojTErW45Rrj%3D8SDWi79WLs8Qq6ACcSeKa4QCn1aagPg%40mail.gmail.com.

Juan-Antonio Søren E. Pedersen

unread,
May 27, 2021, 8:52:05 AM5/27/21
to OpenPnP
If you look at the stepper motors out there, from Nema17 to Nema 34. The highest spec. current wize is around 6 amp.

Naturally a small IC with integrated mosfets can´t handle 6 amp. No way near. 

I have been developing a controller with external mosfets. The curren-sense resistors max out at 10 amp. (The mosfets has a 60 amp rating).

Just received the components yesterday. Im about to set up my reflow oven ;)

If anyone is considering going big on the X and Y axis. Let me know...

Juan-Antonio Søren E. Pedersen

unread,
May 27, 2021, 9:47:06 AM5/27/21
to OpenPnP
The advantage of breaking out the X and Y axis is obviously that that you can place a dedicated head controller on/in the head. Less wires. Like someone said. It’s not a 3D printer. You do not need exact control on cornering a thin stream of liquid plastic on a equally thin plastic edge. You want to be fast 💨 

ma...@makr.zone

unread,
May 27, 2021, 10:39:04 AM5/27/21
to ope...@googlegroups.com

Hi Juan,

When I started, I also thought that more current is the key for better speed. But that is not the case, at least not for common stepper motors. It is more voltage, that is the key.

The reason is so-called Counter-electromotive force also known as "back EMF" that builds up at higher speeds.

So I bought these relatively high current drivers, but they can't put that current through the motors, because of the back EMF. In the scope shot below you have roughly 1V=1A scale, the motor only took a few hundred mA at best speed with 24V (it was a test rig so take the absolute numbers with a grain of salt, but the principle is still valid in relative terms for a real machine): 

https://makr.zone/wp-content/uploads/2020/06/Stepper-current-fast.png

See also here in the "Higher Voltage, please!" section:
https://makr.zone/choosing-a-motion-controller-the-panucatt-azteeg-x5-gt-32bit/455/

So unless you have special low inductance steppers or something, go for higher voltages, 48V, 60V!

A good text and illustrations here:

https://www.designworldonline.com/improving-high-speed-performance-of-hybrid-stepper-motors/

_Mark

Juan-Antonio Søren E. Pedersen

unread,
May 27, 2021, 10:59:22 AM5/27/21
to OpenPnP
Hi Mark,

what was your best speed @24v? 

Which motor are you testing on?

The plan is to use the simpleFoc library (https://community.simplefoc.com/t/the-dimmer-design-done/808)

The bridges Im working on is 40v rated, so the system will be 24v tolerant. Sorry to disappoint you there. 

The coils, like you say, are very important in this regard. There is going to be a voltage drop across the coil, there will also be BEMF, true. 

Let´s take a look at a typical 6 amp. stepper:

How does this motor compare to the one you tested on? Will it skip steps going fast? 

Are you saying that more torque does not translate to higher torque at higher speeds?





Juan-Antonio Søren E. Pedersen

unread,
May 27, 2021, 11:17:27 AM5/27/21
to OpenPnP
But there is more to it;

My plan is to introduce a closed control loop, using onboard hall sensors. 

Since the controller will be controlling the bridges(mosfets) directly, we can do a combination of microstepping and full stepping when necessary. 

There is probably tons more to tweek, like how to do passive breaking and much more. 



ma...@makr.zone

unread,
May 27, 2021, 11:28:51 AM5/27/21
to ope...@googlegroups.com

Hi Juan

> Which motor are you testing on?

I don't remember which one exactly it was, sorry. I tested Nema17 and Nema23 motors.

> Are you saying that more torque does not translate to higher torque at higher speeds?

If you're talking about adding a more powerful motor, then it depends. You need the torque curve of the motor to know.

I'm just saying that having twice higher voltage will likely bring you more speed than having twice higher current rated motors/drivers.

We're talking about high speeds, but actually it is more about acceleration at high speeds. A PnP machine does not need much torque to just move. It is getting up to high speeds fast i.e. accelerating, that matters most.

So adding larger motors, thicker cables, sturdier mechanics etc. will make your machine heavier and therefore waste more torque to accelerate. I believe it is worthwhile to go for the best voltage for any given motor size. Even if you choose very large motors, you probably want high voltage to really benefit from them and not just lug around dead weight.

> what was your best speed @24v?

The reliable X speed of my simple machine is 700mm/s or 42m/min. Less for Y. But again: the limit is actually in the acceleration at high speeds, not the speed per se.


_Mark

Juan-Antonio Søren E. Pedersen

unread,
May 27, 2021, 11:40:54 AM5/27/21
to OpenPnP
Let´s roll with this!

Do you remember if the stepper controller was doing variable micro/full stepping?

If not, then a move towards high torque steps @the exact moment of acceleration will benefit any stepper. Maybe it will be louder, that depends on the resonance of your overall setup. But who cares if we break the sound wall :P

Juan-Antonio Søren E. Pedersen

unread,
May 27, 2021, 12:00:42 PM5/27/21
to OpenPnP
In other words.

Microstepping when accelerating is a waste of torque, if the precision of the machine is based on another system

Juan-Antonio Søren E. Pedersen

unread,
May 27, 2021, 12:29:37 PM5/27/21
to OpenPnP
It has been A while since I took a look at smoothieware. @Arthur

Is it true that the acceleration and jerk control is all based on the step per mm. variable? Could you make an acceleration boost variable?

// Juan

ma...@makr.zone

unread,
May 27, 2021, 12:40:16 PM5/27/21
to ope...@googlegroups.com

> Microstepping when accelerating is a waste of torque,

Yeah, I read the data sheet of my driver, but that's only a few percent.

Increasing voltage almost proportionally increases the obtainable speed!

_Mark

Juan-Antonio Søren E. Pedersen

unread,
May 27, 2021, 12:52:08 PM5/27/21
to OpenPnP
@Mark You are not answering the question?

Could it be that the build up EMF in the coil does not have time to leave the wire when pushing 128microsteps?

ma...@makr.zone

unread,
May 27, 2021, 1:37:53 PM5/27/21
to ope...@googlegroups.com

@Juan, I must have missed that question.

> Could it be that the build up EMF in the coil does not have time to leave the wire when pushing 128microsteps?

No. This is just a curve interpolation. Microstepping makes it smoother but not altogether different. It is true that full-stepping can increase the torque at high speeds a bit by "squaring" the curve, which gives it a slight power edge in the corner.

From the Trinamic Application Note 001

2.5 High Velocity Optimization

At high velocity, the motor resonance must be kept low, in order to maintain torque as high as
possible. Microstep waveforms play a reduced role, as the waveform cannot be maintained in this
velocity range anymore (see Figure 2.2), getting worse with each increase in velocity. Fullstepping
sometimes brings a few percent increased motor torque.

https://www.trinamic.com/fileadmin/assets/Support/AppNotes/AN001-SpreadCycle.pdf

_Mark

Juan-Antonio Søren E. Pedersen

unread,
May 27, 2021, 1:41:37 PM5/27/21
to OpenPnP
I think we are back to the pulley size problem/solution.

I completely agree that higher voltage gives the potential for higher speed. 


Doubling the voltage will double the rev/sek - doubling the step/rev will half the rev/sec.

low inductance.JPG

Juan-Antonio Søren E. Pedersen

unread,
May 27, 2021, 1:57:19 PM5/27/21
to OpenPnP
In a traditional stepper motor setup (without a control loop), you loose precision doing full steps. 

What if that system was using a pulley with times X teeth and using the ability to microstep in small increments when homing in on the control loop (placement). 

Then you get the best of the two systems. Precision (relative to teeth count) and speed (relative to teeth count). 

Juan-Antonio Søren E. Pedersen

unread,
May 27, 2021, 2:50:18 PM5/27/21
to OpenPnP
I am inclined to say that the best solution, IMO,  is to switch belt type, I don't like 3D printing pulleys for GT2 belts and I need to be able to change teeth count. 

Furthermore large GT2 pulleys tend to be pricey ... 

Sandra Carroll

unread,
May 27, 2021, 8:38:17 PM5/27/21
to ope...@googlegroups.com

Hey Mark

 

This is a big topic for CNC Machining.   My CNC router I drive my steppers at 48v,   they are NEMA23’s on the X/Y and a NEMA34 on the Z

Gecko has a good writeup on this if interested

https://www.geckodrive.com/support.html

 

They also have the calculations on how much a Stepper can take in voltage

The basic gist though is Speed=Voltage, Torq=Current

As Speed goes up, Torq goes down and visa-versa.

In a PnP machine you need enough Torq to handle the load of the gantry both in acceleration and deceleration.  Otherwise you can use the voltage to increase the speed.

Also of course is a trade off with Microstepping,   the higher your micro steps you also trade off torq and speed.   Optimal is of course full stepping,   If your using Belts and gears to have a higher ratio.   You can full step a motor with a 10:1 gear ratio and achieve the same thing as 10 Micro steps but loose none of the motors speed and torq ability, you fact gain more torq due to the gearing

 

Sandra

 

From: ope...@googlegroups.com <ope...@googlegroups.com> On Behalf Of ma...@makr.zone
Sent: Thursday, May 27, 2021 10:39 AM
To: ope...@googlegroups.com
Subject: Re: [OpenPnP] Re: Motion Controller Designed for OpenPnP

 

Hi Juan,

When I started, I also thought that more current is the key for better speed. But that is not the case, at least not for common stepper motors. It is more voltage, that is the key.

The reason is so-called Counter-electromotive force also known as "back EMF" that builds up at higher speeds.

So I bought these relatively high current drivers, but they can't put that current through the motors, because of the back EMF. In the scope shot below you have roughly 1V=1A scale, the motor only took a few hundred mA at best speed with 24V (it was a test rig so take the absolute numbers with a grain of salt, but the principle is still valid in relative terms for a real machine): 

Peter Homann

unread,
May 28, 2021, 4:44:05 AM5/28/21
to OpenPnP
Saying you loose precision using full steps  is not really correct. You can't rely on micro step positioning for accuracy. I guess if you have a closed loop system with an encoder then maybe but that is such overkill for a stepper motor.
Micro stepping is there to smooth out movement at low speeds. The accuracy  should be based on the displacement from full step movement . In a squeeze you can probably rely on the half step position.
Micro stepping relies on providing the sin and Cos of the coil current to TRY and position the rotor somewhere in between the full step position.  

Think of the stepper rotor as being held in position by  four springs. There are the two permanent magnets at the full step position and there are two coils producing a magnetic fields, which are stronger than the magnetic fields from the permanent magnets. At the full step position,  one coil is fully energised, the other is off. When you do the first micro step, the unenergized coil is slightly energised depending on the micro step, the fully energised coil is slightly reduced. The permanent magnets  don't change. Depending on the micro step, the rotor may not even move, and if it does it won't be linear as the magnet is resisting the move. Then there is friction of your drive system resisting movement as well. Also add in the fact that if the two coils of the stepper motor are not likely to be wound identically, nor the stepper drive coil drivers producing exactly the correct % of the full step current.

Quality stepper drives such as Gecko drives morph from micro stepping to full stepping once the speed gets above 2-3 rps, ensuring that the motor receives the maximum voltage change in the coils as the motor steps maximising the potential motor speed. This gives the best of both worlds, micro stepping at low speeds, full stepping at high speeds and no need for pulleys. 

Cheers,

Peter

Peter Homann

unread,
May 28, 2021, 4:46:46 AM5/28/21
to OpenPnP
Hi Mark,

It's why I've chosen a controller based on the Teensy4.1. It uses an ARM Cortex-M7 at 600 MHz. This is probably the fastest processor around at the moment being used for grbl.
I'll be be running grblHAL on it. The developers are extremely responsive. The advantage of grblHAL over grbl is that the software is split into parts,
I've convinced them to add a OpenPnP plugin. :) Currently it is implementing some of the M codes needed to support OpenPnP
Once I get my machines axes converted, I'll start doing some serious testing.


I initially planned to use a Duet2 WiFi board I have, but it didn't have the step rate (100kHz+) needed for my machines servos. Additionally, a 3D printer specific board is so problematic, no opto-isolation on inputs/outputs. Paying for onboard drivers that I won't use, etc. It's a great board but not suited to my PnP needs. I know that there are new Duet 3 variants now with add on boards, but it ends up being quite an expensive solution. What may interest me in the future would be if there was a basic Duet3 processor board that I could plug into my own motherboard, as I really like the way they to their configuration via a web interface.

The Teensy4.1 is very powerful. The form factor means that I can plug it into a purpose built motherboard with the appropriate interfaces for my 24Vdc industrial I/O. A lot of the I/O on PnP machines is relatively slow, Relays, light sensors etc. These can be interfaces via SPI I/O expanders and the like. Or by a separate grbl controller.

Trying to build controller boards that cater for all sorts of uses, 3d printers, CNC machines, PnP machines, means that no-one will be completely happy with the result. They all have there good and bad points. As an example, my machine has 3 vacuum sensors, one for each head. They are connected to a small analog interface board that outputs 2 bits / sensor. The 2 bits represent the vacuum level as none, low, medium or high vacuum. So having analog sensor inputs on a controller board is of no use to me. I need 2 digital inputs per sensor on my board. I plan to add a plugin to grblHAL so that when openPnP requests the analog value, it will read the digital inputs for the Vacuum sensor and convert it to a value of 0,1,2 or 3 and return that

Once I have converted my machine to OpenPnP using the Teensy4.1, I'll look at making a number of general purpose mother boards, based on my working knowledge  of openPnP. I'm really excited to see how well grblHAL integrates into the openPnp architecture.

I just need to get the basic conversion setup and operational.

Cheers,

Peter
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/4c401874-005b-2217-6235-cb012ecc5cca%40makr.zone.





Avast logo

This email has been checked for viruses by Avast antivirus software.
www.avast.com


Juan-Antonio Søren E. Pedersen

unread,
May 28, 2021, 8:06:56 AM5/28/21
to ope...@googlegroups.com
Nice, I like morphing, where is the repository?

I am aware that closed loop is out of the norm regarding steppers and past development on openPnp machines. IMO it is not overkill. If you are able to correct the position using eg. 128x microstepping (128 x 200 = 25.600) If your pulley, and yes you need the pulley, is large enough to move the gantry 200mm, you can do position homing with 128 steps per mm. This is exactly the kind of precision we want for a pnp. The feedback system must have same or higher resolution.

If you can rotate the 200mm per rev. Pulley 4 times per sec. then you move 800mm per sec. that is within my speed target 🎯 

What is your speed target?

Juan-Antonio Søren E. Pedersen

unread,
May 28, 2021, 8:13:43 AM5/28/21
to ope...@googlegroups.com

@Mark
 The reliable X speed of my simple machine is 700mm/s or 42m/min. Less for Y. But again: the limit is actually in the acceleration at high speeds, not the speed per se. ”

Not the speed per se. So it is the torque at high speeds? 

ma...@makr.zone

unread,
May 28, 2021, 8:26:34 AM5/28/21
to ope...@googlegroups.com

I'm sure you're aware that you cannot directly interface such an MCU breakout with harsh machine signals, let alone  drive valves and pumps directly. You will likely need to design an interface board, which does all that.

Like Bill Ruckman did, also for the Teensy 4.1:

https://groups.google.com/g/openpnp/c/RL_TUvs_vSQ/m/nO-41LVxAwAJ

https://github.com/bilsef/teensy4_pnp_controller

https://github.com/bilsef/Marlin/tree/Teensy4.1_PnP_6axis

_Mark

ma...@makr.zone

unread,
May 28, 2021, 8:30:54 AM5/28/21
to ope...@googlegroups.com

> Saying you loose precision using full steps  is not really correct. You can't rely on micro step positioning for accuracy.

In the context of PnP, I disagree ;-)

For PnP the precision-relevant axes are X, Y and C. These axes are not loaded in still-stand, i.e. there is no force or weight opposing the positioning. Therefore the micro-stepping will be accurate as long as the electromagnetic forces can overcome the friction. This might of course be very different in other NC machines such as mills etc.

I just coded an automatic backlash-compensation calibration for OpenPnP (coming soon), which (implicitly) tests the accuracy of positioning. My machine has 16 micro-steps, resulting in 80 micro-steps/mm or 0.0125mm theoretical resolution. The calibration determines the needed backlash compensation offset, in order to do so, it has to repeatedly position from the other side (at different decelerations) and measure the distance, using the camera. The camera has a resolution of ~0.024mm/pixel, so the limit is the camera. Within that camera tolerance, I see perfect positioning from the other side after the calibrated backlash offset of ~0.11mm is applied.

I agree, this is not a formal proof (not testing the linearity), but unless this is an unlikely coincidence for the two sides to meet, it is quite safe to say that at least down to 8 micro-steps this works as advertised. I will do more tests...

Having said that, there is certainly a limit to the number of micro-steps. More than 16 micro-steps will likely not increase accuracy. Higher micro-step numbers can still make sense to (as you said) smooth out the motion and to reduce vibrations and audible noise. 

Also interesting (not quite the same topic):

https://www.trinamic.com/fileadmin/assets/Support/AppNotes/AN021-stealthChop_Performance_comparison_V1.12.pdf

_Mark

ma...@makr.zone

unread,
May 28, 2021, 8:33:27 AM5/28/21
to ope...@googlegroups.com

> Not the speed per se. So it is the torque at high speeds?

I was always talking about this, yes. ;-)

_Mark

Juan-Antonio Søren E. Pedersen

unread,
May 28, 2021, 8:35:59 AM5/28/21
to ope...@googlegroups.com
This 52k$ machine can place 4000 components per hour. It is a beast, take a look at those screws. How fast would you say it moves? 

What is your placement per hour target? 

I completely understand the desire to move to higher voltage motor control. All I’m saying is; 24v is still viable and I intent to keep working with 24v. 

ma...@makr.zone

unread,
May 28, 2021, 8:46:48 AM5/28/21
to ope...@googlegroups.com

I like these:

https://youtu.be/EGIkaB383DU

(OK, might be biased, they're Swiss :-)

_Mark

ma...@makr.zone

unread,
May 28, 2021, 8:49:05 AM5/28/21
to ope...@googlegroups.com

Another video, more practical:

https://youtu.be/tJ-N-6DMIe4

Juan-Antonio Søren E. Pedersen

unread,
May 28, 2021, 11:51:54 AM5/28/21
to OpenPnP
@mark

Have you thought about using 3 phase BLDC´s in a NEMA 23 / 34 format. Combined with a high res. encoder ? 

Since the controller I have been working on, should be able to control a BLDC, with a high power mosfet to spare, Maybe I have to let the stepper idea go, and focus on how accurate these NEMA format BLDC´s are @24V.

I would possibly need to find higher amp (lower mOhm) current resistors. To target 25-30 amp? 

One could eventually ad some sort of gearing to increase the precision ...

If you have been following the SimpleFoc community, there are plenty of examples of balancing robots. 


Juan-Antonio Søren E. Pedersen

unread,
May 28, 2021, 12:07:45 PM5/28/21
to OpenPnP
I quess this approach constitutes a servo motor/controller. Instead of microsteps, it would use micro-pulses to correct position overshoot..

These BLDC can go so fast. Like 50 rev/sek, which might be over the top. So with a 4 to 1 gearing, we're in the sweet spot. 

Arthur Wolf

unread,
May 29, 2021, 12:09:07 AM5/29/21
to ope...@googlegroups.com
On Thu, May 27, 2021 at 6:29 PM Juan-Antonio Søren E. Pedersen <greenh...@gmail.com> wrote:
It has been A while since I took a look at smoothieware. @Arthur

Is it true that the acceleration and jerk control is all based on the step per mm. variable?

They're constant. I'm not even sure what you're saying would even mean ...

Harjit Singh

unread,
May 29, 2021, 12:53:14 AM5/29/21
to ope...@googlegroups.com
Going back to the original topic - Phil the Teensy 4.1 based approach sounds great. It is an insanely capable microcontroller. 

I look forward to learning what you decide for the motor drivers. I looked into the breakout board you did and thought about adding the stepper drivers to it but it is in Eagle and I'm just coming up to speed on KiCAD and not ready to learn another new PCB design tool.

All the best.

Juan-Antonio Søren E. Pedersen

unread,
May 29, 2021, 9:44:05 AM5/29/21
to OpenPnP
Hey Arthur,

I think I meant the ability to variate from full step to microstep (when needed) will increase torque at higher speeds. 

I guess TMC stepper IC´s does that in their proprietary internal clockwork, to some extent.

Regarding closed loop vs. open loop control. Here is an interesting demonstration comparing the two typologies. Maybe the hunt for added speed actually lies somewhere in here.
According to this demo/experiment the closed loop stepper is significantly faster then the open loop stepper?


Arthur Wolf

unread,
May 29, 2021, 9:47:34 AM5/29/21
to ope...@googlegroups.com
Yes that's something I've seen in Trinamics, but no firmware supports it as far as I know.
Smoothie v2 has enough pins that we might have wired microstepping settings in a way that allows this, but since they're using Trinamic anyway, that would be pretty redundant.



--
勇気とユーモア

ma...@makr.zone

unread,
May 29, 2021, 12:48:56 PM5/29/21
to ope...@googlegroups.com

Theoretically, Smoothie can already do that with Trinamic drivers, not on its own, but through G-code: Before a long & fast move you could first move to a modulo microsteps = zero position, then configure the drivers for full steps (that's possible through G-code), then fast-move near to almost the target position, again to the nearest modulo microsteps = zero position, then re-enable micro-steps and move the last tiny bit to the precise target position.

This would also circumvent Smoothie's step rate limit of I think ~100kHz.

The Trinamic Application Note says that's only worth a few percent. Not sure if you would actually lose the advantage with the overhead of these pre- and post moves.

_Mark

Arthur Wolf

unread,
May 29, 2021, 1:02:07 PM5/29/21
to ope...@googlegroups.com
You also have to consider the fact that whenever you're disabling microstepping, you're loosing the benefits of those.
I'd be curious to know what effect that has, but I'm a bit suspicious about miracle advantages to doing this.
Generally, if you really want a bit more speed/torque out of your machine, increase your supply voltage by a bit, that's way easier, it's cheap, and it doesn't have downsides to worry about.



--
勇気とユーモア

Juan-Antonio Søren E. Pedersen

unread,
May 29, 2021, 1:47:44 PM5/29/21
to ope...@googlegroups.com
Just to recap the amp/speed vs closed loop control. I think the added speed comes from the fact, that these servo steppers only apply the needed current to move. Like a PID scheme. If the motion happen at 0.5 amp, there is no need to apply 2 amp and so on. This is the inherent limitation of open loop steppers. Also why they run hot. I’ll pursue the servo approach. If you look at it from a 4 nozzle angle, you gain the extra drivers for head stuff. 

ma...@makr.zone

unread,
May 29, 2021, 5:25:48 PM5/29/21
to ope...@googlegroups.com

I guess nobody is debating that closed loop steppers (or even better: closed loop servos) are better. But they are also more expensive and more complex to setup.

And if you want to drive them in "as fast as possible" mode (i.e. the feedback determines the speed), it becomes very complex, even without axis coordination. With full axis coordination (i.e. the feedback of the weakest axis determines the overall coordinated speed) I have yet to see a system.

_Mark

bert shivaan

unread,
May 29, 2021, 6:06:06 PM5/29/21
to OpenPnP
while on the subject of motion control I have a quick question to test if I am grasping things about acceleration.

x: max speed at 40000mm/min
Acceleration at 2500 mm/sec^2
80 steps per mm
So from that am i correct to say this axis is fully accelerated in less than 1 sec?
because the top speed is 667 mm/sec, so accelerating at 2500 mm/sec^2 gets us to 667 in .2668 seconds?
I am trying to see if I have grasped this correctly

Arthur Wolf

unread,
May 29, 2021, 6:11:02 PM5/29/21
to ope...@googlegroups.com

bert shivaan

unread,
May 29, 2021, 6:21:04 PM5/29/21
to OpenPnP
Thats pretty fancy stuff Arthur, Thank You.
But I don't see how the acceleration calculator answers my question.
Also it does not really help me to understand things. I am the guy that wanted to figure how to find the square root of a number.
People kept showing me the square root button on a caculator like that told me how to find it.  
Finally I found how to solve for square root without a calculator.


ma...@makr.zone

unread,
May 29, 2021, 6:39:58 PM5/29/21
to ope...@googlegroups.com

> accelerating at 2500 mm/sec^2 gets us to 667 in .2668 seconds?

Yes.

The only odd thing here is the 80 steps per mm. They are irrelevant for this question.  ;-)

Arthur Wolf

unread,
May 29, 2021, 6:44:09 PM5/29/21
to ope...@googlegroups.com
I didn't remember the graph doesn't show time, they typically do, you can find plenty of such calculators/graphing tools if you ask Google, this is just one that's commonly passed along in Reprap circles.

For your question: acceleration is delta v over delta t.
In your case, that's

x: max speed at 40000mm/min
Acceleration at 2500 mm/sec^2

So 2500 is 666 (40k in mm/s) over delta t
or 2500 times delta t equals 666. Or delta t equals 2500 over 666
So 3.753753754 seconds to reach top speed




--
勇気とユーモア

ma...@makr.zone

unread,
May 29, 2021, 7:05:11 PM5/29/21
to ope...@googlegroups.com

> or 2500 times delta t equals 666. Or delta t equals 2500 over 666
>
So 3.753753754 seconds to reach top speed

No, Bert got it right it is 667mms-1/2500mms-2 = 0.2668s

_Mark

Arthur Wolf

unread,
May 29, 2021, 7:07:02 PM5/29/21
to ope...@googlegroups.com
It's late. I plead the fifth. My cat ate my keyboard.



--
勇気とユーモア

bert shivaan

unread,
May 29, 2021, 7:10:07 PM5/29/21
to OpenPnP
Thanks both of you, Mark and Arthur.
It is very helpful when trying to digest things to see that we have done it correctly


Juan-Antonio Søren E. Pedersen

unread,
May 29, 2021, 7:35:17 PM5/29/21
to ope...@googlegroups.com
@Mark

I believe SimpleFoc already has stepper support up and running, but since the main theme over there is gimbal bldc and 3 phase motors in general I think it is a work in progress. I’m exited to se how it spans out. Since gimbal’s use hall’s they are all about feedback loops, so that’s a good start. 

it's cheap, and it doesn't have downsides to worry about.

Phil Barrett

unread,
May 30, 2021, 12:26:56 AM5/30/21
to ope...@googlegroups.com
The issue of integrated or external drivers has always been controversial. To me the biggest negative to integrated drivers is the designer has to choose his target market carefully.  In the 3D printing world there is clearly a sweet spot so the choice is relatively easy.  IN the CNC router/mill/lathe market, it is very hard to do. Some devices like the OpenBuilds black box target a very specific market (call it the Workbee hobby router segment).  Or the various Ardiuno Shields with stepsticks (typically the wretched A4988 based ones) that basically target the 3018 Chinese router class of machines - cheapest possible price.  On the other hand, most even slightly upmarket motion controllers expect external drivers. That allows system builders a wide range of options. I'm putting together an Avid Pro4848 right now and would never, ever consider a motion controller with integrated drivers. (I'm using 6A Nema 34s with moderately low inductance and 60VDC power - I want torque AND speed).  While it is easy for the integrated driver crowd to say "our external driver interfaces give you options", why would anyone pay for the extra cost of an integrated driver board only to use external drivers or servos?

So, the question I have is what do builders want when it comes to current and voltage. What I think I heard is that speed is far more important than torque which means go for higher voltage. I also think (though happy to hear why I am wrong) that no more than 3 axes are needed and maybe just 2.  Carrying 4 or 5 integrated drivers doesn't help keep costs down.  If I had to choose right now, I would say external drivers to allow builders more choice and keep the board cost low(er). Maybe only 3 axes and reuse those other pins for more I/O. 

ma...@makr.zone

unread,
May 30, 2021, 3:28:49 AM5/30/21
to ope...@googlegroups.com

Yes. But it can be further differentiated for PnP: Only the X and Y axes are power/speed axes. The Z and C (rotation) axes can be driven by just any driver, I guess. So if you got a controller that has some drivers on board but then also breaks out two step/dir pairs (or other, more advanced means, like CAN), then I guess this is the optimum. You can then put the board on the head, it remains compact and light and lower cost per (on-board) driver. Then for the X, Y motors you can choose what you like for drivers and (different) voltages. Assuming the usual Cartesian coordinate robot, you can even place the driver at the X motor, so you only need tiny signal cables plus power bus (plus USB) in the drag chains, which makes cabling lighter, less stiff, and - if we're speaking truly drag chain rated cables - much cheaper (compared to when you have all the thick current-rated motor cables coming from a base/central controller).

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

Juan-Antonio Søren E. Pedersen

unread,
May 30, 2021, 4:00:31 AM5/30/21
to ope...@googlegroups.com
There is apparently a advantage in driving a stepper as a 2 phase serve. I’m watching this webinar on closed loop steppers. It really informative. Skip to 17 minutes and 35 sek. 




Harjit Singh

unread,
May 30, 2021, 10:30:46 AM5/30/21
to ope...@googlegroups.com
@Phil - understood and agreed. @Mark makes an interesting point which is worth exploring.

Mark I have a poor understanding of the OpenPNP software architecture but the benefits of running power and a shared bus are immediately obvious. I get the "easy" case where all stepper motor drivers outputting motor current are located on the controller board - like Smoothieboard, RAMPS, etc.

How well does the opposite (extreme) work where only commands are sent to "local" motor/actuator drivers at the actuators. Let's pick CAN because it is a party line bus i.e. all nodes can share it?

As I type this, I'm working out that OpenPNP makes a motion plan for all the axes and then executes them and these phases (motion plan and motion execution) do not overlap. And when a motion plan is completed, the motion execution happens. When the motion execution comples, the motion plan happens. And the cycle repeats. So, if this is the case, then, the motion plan could be sent across the common bus. Each motor/actuator driver will pick up their piece and execute it. But then this means that the motor/actuator driver has to do all the motion profiling and error handling?

Looking forward to your thoughts.

ma...@makr.zone

unread,
May 30, 2021, 2:39:06 PM5/30/21
to ope...@googlegroups.com

Hi Harjit

> So, if this is the case, then, the motion plan could be sent across the common bus. Each motor/actuator driver will pick up their piece and execute it. But then this means that the motor/actuator driver has to do all the motion profiling and error handling?

The distribution of the motion plan to the different drivers is taken care of by OpenPnP. It sends the planned moves to each driver which talks to each controller using e.g. G-code. The controller itself may take the G-code commands and is responsible for axis coordination etc. It may delegate some of the motion to daughter boards over CAN, e.g. Duet 3 can do this (cool!). As an alternative, the controller can just generate step/dir pulses to external drivers. Many different types of drivers can take step/dir, even servos.

All the real-time coordination is the responsibility of the controllers. OpenPnP only takes care of the high level (G-code) commands. It can (roughly) coordinate motion across multiple controllers, timing moves on the various controllers to match i.e. giving them the right acceleration/feed-rate limits, so the moves should roughly be coordinated, i.e. way-points will be  reached at roughly the same time.

_Mark

Harjit Singh

unread,
May 30, 2021, 5:01:12 PM5/30/21
to ope...@googlegroups.com
@Mark - thank you.

I just spelunked through OpenPNP pages: Advanced Motion Control, Motion Controller Firmwares, GcodeAsyncDriver and Duet3D/RepRapFirmware/pull/471. And the advanced motion control page on your site.

It seems like what you did is have OpenPNP generate a bunch of small moves that together create the S-Curve (jerk controlled) profile. These are then sent to the controller to execute. Seems like Duet3D has enough of a buffer to do this well and you created custom FW for others to do it too. Then, the controller runs this sequence.

I was not able to tell if all the s-curve waveform generation is done within OpenPNP or was some of it offloaded to the controller i.e. Duet 3D, Smoothie board, TinyG, etc.?

The reason I ask is that below you talk about a "daughter board" and I'm trying to think through what all it needs to do. Then, with this configuration, the controller connected to the can almost be a USB to CAN and then there are "daughter boards" for the motor, vacuum control, etc. Also, I'm wondering if it will be possible to have a very limited code base and lift the motion code from TinyG or Merlin or Duet 3D.

ma...@makr.zone

unread,
May 31, 2021, 2:15:54 AM5/31/21
to ope...@googlegroups.com

@Harjit

Ideally, the controller (not OpenPnP) would do the S-curve or 3rd order motion control (I think you imply this as well in your text).

Unfortunately, there are no open source controllers/firmwares that I'm aware of, that can support true 7-segment 3rd order motion profiles. So like you found out, I added a interpolation solution on the OpenPnP side. It can currently drive Smoothieware and Duet controllers with good results. Other constant-acceleration controllers may work too, if they have fast USB/other communication. Vibrations on my mechanically not so fancy machine (Liteplacer) can be very effectively suppressed, while keeping good overall speed.

TinyG has simplified S-curves built-in. But they are not true 7-segment 3rd-order motion profiles, more like 5-segment, i.e. it cannot limit acceleration in addition to jerk. So you need to set a rather low jerk limit, otherwise the steppers will stall, because the acceleration becomes too large on long moves. I think Marlin has a similar simplified S-curve implementation with the same problem. 

The resolution would be a true 7-segment controller. Some members on this list have announced such controllers, but I have never seen one completed.

_Mark

Harjit Singh

unread,
May 31, 2021, 4:05:15 AM5/31/21
to ope...@googlegroups.com
@Mark - which files should I go look at to see how you did the interpolation solution?

Thanks.

ma...@makr.zone

unread,
May 31, 2021, 4:33:23 AM5/31/21
to ope...@googlegroups.com

manu f

unread,
Jun 3, 2021, 3:26:17 PM6/3/21
to ope...@googlegroups.com
Hello all,

I search a 3 way solenoid valve for the vacuum.
Easy to find (amazon..) and not too expensive.
I bought one but not working for vacuum cause it use air pressure to move the distribution drawer so it not work with vacuum

Thanks guies

Manu

sebastian...@gmail.com

unread,
Jun 4, 2021, 5:17:46 AM6/4/21
to OpenPnP
Hi Manu!

Please try to stay on topic. We're discussing a motion controller here.
Search existing conversations, start a new one or join the discord server  to get help with your valve.
Any non-piloted valve should do.

Regards,
Sebastian

tra...@gmail.com

unread,
Jun 15, 2021, 9:20:32 AM6/15/21
to OpenPnP
You can get the smart stepper (www.misfittech.net).  These can operate via USB so you can implement motion control in Java on PC.  The smart steppers use closed loop feedback, and operate up to 30V. for high speed. 

Edward Casati

unread,
Jun 15, 2021, 10:01:26 AM6/15/21
to OpenPnP
The 'smartstepper ' via USB is something that I would approach very carefully. USB is only for relatively short distances, and wiring distances quickly add up on even the smallest of CNC systems. Since you still need an external voltage supply, you end up with an extra cable going to the stepper.

dc42

unread,
Jun 16, 2021, 4:09:57 PM6/16/21
to OpenPnP
Another thing to watch for when connecting 'smartstepper' type devices is that ground noise caused by stepper motor current can disrupt communications. USB is better than some other types of connection because it uses differential signalling, however the signal levels are low and the allowed common mode voltage range is only about 1.7V.

Whenever a controller is connected to a stepper driver that is some distance from the controller (so that ground noise from the stepper motor current is likely), then the signalling should either be optically-isolated (as is the case with Leadshine and similar stepper drivers), or use a signalling method that is tolerant of high common mode noise voltage (e.g. CAN), or use high voltage signalling (e.g. 24V as commonly used by PLCCs).

dc42

unread,
Jun 16, 2021, 4:11:03 PM6/16/21
to OpenPnP
PS - Ethercat is of course also good because Ethernet is galvanically isolated.

Mike Menci

unread,
Jan 29, 2023, 8:41:49 AM1/29/23
to OpenPnP

Mike Menci

unread,
Jan 29, 2023, 8:47:29 AM1/29/23
to OpenPnP
Bellow is somehow in extension to this Bill controller which was meant for HEAD only.

On Friday, 28 May 2021 at 14:26:34 UTC+2 ma...@makr.zone wrote:

I'm sure you're aware that you cannot directly interface such an MCU breakout with harsh machine signals, let alone  drive valves and pumps directly. You will likely need to design an interface board, which does all that.

Like Bill Ruckman did, also for the Teensy 4.1:

https://groups.google.com/g/openpnp/c/RL_TUvs_vSQ/m/nO-41LVxAwAJ

https://github.com/bilsef/teensy4_pnp_controller

https://github.com/bilsef/Marlin/tree/Teensy4.1_PnP_6axis

_Mark

Am 28.05.2021 um 10:46 schrieb Peter Homann:
Hi Mark,

It's why I've chosen a controller based on the Teensy4.1. It uses an ARM Cortex-M7 at 600 MHz. This is probably the fastest processor around at the moment being used for grbl.
I'll be be running grblHAL on it. The developers are extremely responsive. The advantage of grblHAL over grbl is that the software is split into parts,
I've convinced them to add a OpenPnP plugin. :) Currently it is implementing some of the M codes needed to support OpenPnP
Once I get my machines axes converted, I'll start doing some serious testing.


I initially planned to use a Duet2 WiFi board I have, but it didn't have the step rate (100kHz+) needed for my machines servos. Additionally, a 3D printer specific board is so problematic, no opto-isolation on inputs/outputs. Paying for onboard drivers that I won't use, etc. It's a great board but not suited to my PnP needs. I know that there are new Duet 3 variants now with add on boards, but it ends up being quite an expensive solution. What may interest me in the future would be if there was a basic Duet3 processor board that I could plug into my own motherboard, as I really like the way they to their configuration via a web interface.

The Teensy4.1 is very powerful. The form factor means that I can plug it into a purpose built motherboard with the appropriate interfaces for my 24Vdc industrial I/O. A lot of the I/O on PnP machines is relatively slow, Relays, light sensors etc. These can be interfaces via SPI I/O expanders and the like. Or by a separate grbl controller.

Trying to build controller boards that cater for all sorts of uses, 3d printers, CNC machines, PnP machines, means that no-one will be completely happy with the result. They all have there good and bad points. As an example, my machine has 3 vacuum sensors, one for each head. They are connected to a small analog interface board that outputs 2 bits / sensor. The 2 bits represent the vacuum level as none, low, medium or high vacuum. So having analog sensor inputs on a controller board is of no use to me. I need 2 digital inputs per sensor on my board. I plan to add a plugin to grblHAL so that when openPnP requests the analog value, it will read the digital inputs for the Vacuum sensor and convert it to a value of 0,1,2 or 3 and return that

Once I have converted my machine to OpenPnP using the Teensy4.1, I'll look at making a number of general purpose mother boards, based on my working knowledge  of openPnP. I'm really excited to see how well grblHAL integrates into the openPnp architecture.

I just need to get the basic conversion setup and operational.

Cheers,

Peter
Thanks.

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


--
勇気とユーモア
--
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.
--
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.
--
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.


--
勇気とユーモア
--
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.
--
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.
--
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.


--
勇気とユーモア
--
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.
--
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.
--
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/4c401874-005b-2217-6235-cb012ecc5cca%40makr.zone.





Avast logo

This email has been checked for viruses by Avast antivirus software.
www.avast.com


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

mark maker

unread,
Jan 29, 2023, 8:49:23 AM1/29/23
to ope...@googlegroups.com

Similar basic idea as @bilsef's but then also quite different:

_Mark

Alexander

unread,
Jun 2, 2023, 12:16:05 AM6/2/23
to OpenPnP
I slightly changed the printed circuit board for the output, installed ZXMN4A06 instead of ULN2003AD, the input of limit sensors through the 74LVC3G07 chip. The mounting holes of the 60 mm board have been shifted, and other minor changes.
V3.jpg

воскресенье, 29 января 2023 г. в 15:49:23 UTC+2, ma...@makr.zone:

PascetFran Mabille

unread,
Jan 10, 2024, 1:05:19 PMJan 10
to OpenPnP
Yes, STM32 are high priced.
That's why i migrate to Renesas RX familly. They offers nearly same performances and at 11€ for a 176pin TQFP device, provided by Mouser, it's interresting.
If you're interested I started a design with the followings features:
- 2 axis with THB6600HG on board with full control of digital pins with from the controller
- 2 head control with four THB6128 (Z Axis and rotation for each head) on board also with full control of digital pins with from the controller.
- LS sensor, Home sensors and rotary encoder 3 lines (A,B and Z) for each motion axis then 4.
- 4 digital outputs for vavles command
- Pump output
- Emergency stop line
- a Board feeder setcion with:
   - 4 outputs for solenoids
   - 4 outputs for sensor
   - 2 outputs for board feeder motors
The board is powered by an ATX power supply.

The picture show the processor pin attribution in E2Studioenesa rx.png

Le lundi 24 mai 2021 à 08:11:17 UTC+2, jarosla...@gmail.com a écrit :
Yeah, it is crazy -  especially with components. These days even highest priced STM32H7 are hard to get...
It does not help that people started buying components like never before - I have myself bought vital parts for next 12 months of my production. So the shortages will last, but not forever (saturation of stocks will happen at some pint). I can already see some light for the next year.

In my case the controller is part of commercial project - I need my own board with some specific features ( I design electronics for industrial ink printers).
When doing it - I have realized that the design is pretty good match for pick and place machines :-) and I decided to share.
It still does not work - mainly because I have to finish first one high priority design for my biggest client.

About the features - I would say you need ethernet ( even if you keep USB).  There are too many cases USB is troublesome, while ethernet works flawlessly.
In my design I use ethernet to master board ( with possibility to use USB), remaining boards are connected via high speed CAN - FD .







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


--
勇気とユーモア

Jarosław Karwik

unread,
Jan 12, 2024, 2:25:27 AMJan 12
to OpenPnP
These days all the STM parts are back  - no problem anymore. Even my old ouddated LPC4330....

I still prefer STM - even if they are  slightly more expensive. I have some designs on comparable NXP ( i.MX ), but they are inferior in their peripherial design.  I have not tried Renesas for ages ...

And looking at my BOMs - usually good quality connectors are more expensive then all major semiconductor parts.

Balázs Kiss

unread,
Feb 13, 2024, 3:03:40 AMFeb 13
to OpenPnP
Hi guys,


we are planning to replace the TinyG and therefor looking for an alternative - Azteeg X5, which was used by Mark is out of stock. We prefer Trinamic motor drivers, if possible.
We see there is a design going on - what is the status? Is there contribution needed? Our Liteplacer just can't wait to receive it :)


Best regards,
Balázs and Mosso
Reply all
Reply to author
Forward
0 new messages