Universal pick & place controller - my new design

817 views
Skip to first unread message

Jarosław Karwik

unread,
Mar 27, 2020, 11:21:21 AM3/27/20
to OpenPnP
Hi,

As I am refurbishing my new (old ?) Philips CSM 66 I decided to make universal pick & place controller - kind of competition to Smoothie.
It is based on my commercial motion controller used in industrial ink printers - for pick & place it will have just a bit different firmware.

So few details:
- RS485, CAN and USB as communication protocols. First version will accept Gcodes from OpenPnp driver through RS485 or USB
- Support for two axis with incremental encoders  and one without
- The base idea is to use one controller for X/Y and the other assembled directly on the head - there will be shield with 3x small stepper drivers and 2x vacuum sensors
- 8 inputs ( for home/end position switches), 4 of them can be also configured as analog inputs
- 6 open drain outputs ( for valves, pumps etc)
- two expansion slots - one for head stepper drivers/vacuum, the other one for feeders - there is i2c and serial, so it will be possible for valve power outputs or even Siemens electronic feeders ( if ever needed - it is easier to use the already made design by https://github.com/bilsef/SchultzController)

Schematics preview available at : https://github.com/jarekkt/jarekktpp_controller



Comments are welcomed :-)  - please let me know If I forgot something important to be placed there - it is still preliminary design.



Uni_Printer.jpg

Uni_stick.jpg



Marek T.

unread,
Mar 27, 2020, 11:49:57 AM3/27/20
to OpenPnP
Small number of Vacuum inputs...
So those who wants to mount two Peters' head need two separate controllers on the head. Not convenient and another damned USB necessary to bring there (and use).
I think that 6 steppers and 4 vacuums would be universal for 99% of cases.
And proportional number of inputs/outputs to serve 4 nozzles.

Finally, only my oppinion, it would be better go on LAN and care about STEPs frequency (but as remember you have there high speed available without problems).

Jarosław Karwik

unread,
Mar 27, 2020, 12:16:52 PM3/27/20
to OpenPnP
The board is packed and doubling amount of axes would almost double its size. it would also lower max frequency of operation ( due to more axes ).

Remember that the board is small - around 9x12 cm ( roughly ), 
You also do not need to route USB to the head - that is why there is both CAN and RS485. In principle you could put it on single RS485 line ( although CAN would be even faster and more reliable)

I plan to connect main board with USB and head board(s) on RS485.  I have space for 6 heads in my machine, but will start only with two. 

Jarosław Karwik

unread,
Mar 27, 2020, 12:39:32 PM3/27/20
to OpenPnP
Please also note that there are two RS485 channels - both connected to dual  RJ12 sockets. So you just put such cable and use two USB/RS485 converters and configure subdrivers for them.

And USB/RS485 converters start for 2 Euro.....

Marek T.

unread,
Mar 27, 2020, 1:47:32 PM3/27/20
to OpenPnP
Then it sounds good :-)

TheCunningFellow

unread,
Mar 27, 2020, 3:33:49 PM3/27/20
to OpenPnP
Nice,

I'm working on something similar but with SAM rather than STM parts and no CAN bus.

Much nicer to have 4 wires going to the head rather than a bundle of 20+

Jarosław Karwik

unread,
Mar 27, 2020, 4:03:35 PM3/27/20
to OpenPnP
CAN is used in my ink printer, here RS485/USB is more convenient as you can send gcodes directly. CAN is faster and meter for having several devices on same bus, but would require extra code in OpenPnp


This is cabling taken from my machine :-) ( Philips CSM 66 )




Jarosław Karwik

unread,
Apr 5, 2020, 1:04:22 PM4/5/20
to OpenPnP
Almost ready :-)

Uni_Printer.jpg

Dave B.

unread,
Apr 7, 2020, 11:32:02 PM4/7/20
to ope...@googlegroups.com
Only comment is that you don't seem to be giving the parts much room for thermal pads, particularly the (?) SOT223 parts lined up in a row on the far edge of your rendering.  My experience has been that SMD power switches rarely perform even close to their manufacturer ratings unless they have a rather generous thermal pad to work with.
-D

--
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/5392d683-e40e-4269-a1d0-7ffea56bc6e2%40googlegroups.com.

Jarosław Karwik

unread,
Apr 8, 2020, 3:46:34 AM4/8/20
to OpenPnP
Hi,

I have been using such switches for ages - they are quite good and work nicely even with half of the load they promise :-)
Here they will work with fraction of their rated power - it is 3A switch so with 24V it means 72W   - while most valves are around 5W.
My vacuum pumps ( 24V ) are all below 800mA.
These switches get hot more when you use them with PWM control ( they are slow, only few kHz) - this case I will have to test.





To unsubscribe from this group and stop receiving emails from it, send an email to ope...@googlegroups.com.

Brynn Rogers

unread,
Apr 8, 2020, 12:36:20 PM4/8/20
to OpenPnP
I have a board with a number of small FETS driving big solenoids.   workds great , they don't get hot ( I always go for a big margin by getting a very small RDS on - then heat is not a problem).    In fact, the biggest heat problem on the board turned out to be all the current limiting resistors for LEDs.   many of those were running on 24v, and even a 2k ohm 0603 resistor to limit current to 10mA  will dissapate almost 1/4W, which is really too much for most 0603.  little Status LED's like that proably don't need more than 3mA to be plenty bright enough.

Brynn

Marek T.

unread,
Apr 8, 2020, 12:43:06 PM4/8/20
to OpenPnP
Hi Brynn,
Use NSI parts to set constant current source. Costs cents, right more than resistor but are absolutely cold.
Fixed: https://www.onsemi.com/pub/Collateral/NSI45030-D.PDF ; different currents available.
"Discovered" it in these days repairing some bulb LED :-).

Jason von Nieda

unread,
Apr 8, 2020, 1:02:11 PM4/8/20
to ope...@googlegroups.com
Thanks for posting that Marek! I'd never heard of these devices. They are very interesting!

Jason


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/2f95f217-6a22-4e85-939e-b5b26686599f%40googlegroups.com.

Marek T.

unread,
Apr 8, 2020, 1:36:55 PM4/8/20
to OpenPnP
I've bought them a few for testing, 20 and 30mA. Small SOD-123 plastic case and ~30degC on it.

Brynn Rogers

unread,
Apr 8, 2020, 1:47:18 PM4/8/20
to OpenPnP
I've seen these before, and they are interesting, but I don't understand how it is possible that using one of these instead of a resistor generates less heat.
If your limiting current to 30mA with a 2k resistor on a 24v supply you get 0.22W of heat.
If we place this component in the circuit instead of the 2k resistor, I still think it must dissapate the same 0.22W of heat.   Physics.

Please explain if I am wrong.

Jason von Nieda

unread,
Apr 8, 2020, 1:51:21 PM4/8/20
to ope...@googlegroups.com
I think it reduces the voltage to maintain the same current.

Jason


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/c71b027c-1aef-4020-92f4-346a19b82de5%40googlegroups.com.

Jim

unread,
Apr 8, 2020, 1:56:37 PM4/8/20
to OpenPnP
Forget that big current regulators - use different leds.
Some leds (e.g. blue) are really bright even at ~2mA.
That would reduce Ptot on your resistors below 50mW.

Marek T.

unread,
Apr 8, 2020, 1:59:18 PM4/8/20
to OpenPnP
My bulb contains 7 LEDs in serie with this NSI and is powered from ~210VDC. On some LEDs there is 60VDC (!) on other there is 20VDC, definitely some is broken but every have strange voltage, it must be some special high voltage LED - I've never interrested in it too much. However NSI is 30degC.
Tomorrow I will solder some typical setup like 6-7 diodes and 24VDC with NSI - then I will tell you what is voltage (power dicipation easy to calculate) and temperature.

Brynn Rogers

unread,
Apr 8, 2020, 1:59:30 PM4/8/20
to OpenPnP
Right, I think it can be thought of as an auto-adjusting zener.   My use case would give it a Vak of 21V.   off the charts in the data sheet.
Same as a zener, the device has to burn off the excess voltage as heat.    30mA @ 21V  is 630mW

Marek T.

unread,
Apr 8, 2020, 2:02:57 PM4/8/20
to OpenPnP
It's off-topic Jim.
I've mentioned about these limiters as rather nice for LEDs in camera ligtning.
Here also could be used but makes no very big sense for signaling low current LEDs.

Brynn Rogers

unread,
Apr 8, 2020, 2:07:29 PM4/8/20
to OpenPnP
My use case would be one LED on 24V.   one of these components would get as hot as a resistor - note most of the specs are about heat dissapation.
Try just one LED at 24v, I bet it gets toasty as heck.

The right answer for me is to dial down the LED current to 3mA or something, still pletny bright, and then an 0603 can handle the heat.
a 7k resistor would give off 0.063W which is fine on a 0603 - still hot enough to feel the heat.

Brynn

Marek T.

unread,
Apr 8, 2020, 2:14:57 PM4/8/20
to OpenPnP
Ok, out of curiosity I'll check the setup with one diode starting from lower voltage and checking temp, no pain if burn some.

I understand what you say about currents and powers, I'm rather hardware man than software and have calculator :-).

Marek T.

unread,
Apr 10, 2020, 7:32:09 AM4/10/20
to OpenPnP
Hi Brynn,

Made a test. Single typical high efficiency white LED with nominal voltage near 3.3VDC.
I have connected it with this serial limiter and needed deliver some 7V to get 30mA (parameter of this specific NSI used to test). Cold.
10V a bit warmer, 12V really worm, 15V hot and burnt after 5sec  :-)

For lighting LED arrays I find it as still very nice solution.

Marek T.

unread,
Apr 10, 2020, 7:52:11 AM4/10/20
to OpenPnP
Update:
Some overhit protection probably. Cooled down and works again:-).

Brynn Rogers

unread,
Apr 10, 2020, 11:19:42 AM4/10/20
to OpenPnP
That's what I thought would happen.     it's a current regulator, and when you keep the voltage drop in range of it's design (which seems to be 7.5v of overhead) your okay. 
I bet the LED brightness remained pretty constant.
but for a single LED fed from a 24v source, it is not the part to use.

Brynn
P.S.   nice that they have built-in protection and comeback to life when they cool -  I like parts like that if the premium price is not an issue. 

Marek T.

unread,
Apr 10, 2020, 11:38:14 AM4/10/20
to OpenPnP
W dniu piątek, 10 kwietnia 2020 17:19:42 UTC+2 użytkownik Brynn Rogers napisał:
I bet the LED brightness remained pretty constant.
Yes, since the voltage is enough to let "create" the current (30mA in case of tested part) - the brightness remains the same when you go up further with DC.

but for a single LED fed from a 24v source, it is not the part to use.
right

Brynn
P.S.   nice that they have built-in protection and comeback to life when they cool -  I like parts like that if the premium price is not an issue.
yes it's cool

Scott Wilson

unread,
Apr 10, 2020, 12:39:26 PM4/10/20
to OpenPnP
A part like this is probably better suited. Same concept, but lower current ranges and more robust packages:

Marek T.

unread,
Apr 10, 2020, 2:16:20 PM4/10/20
to OpenPnP
Same package and working.

T Mastiff

unread,
Apr 18, 2020, 11:56:50 PM4/18/20
to OpenPnP
Hi Marek,

Interesting device you found!  It says adjustable by connecting external (optional) resistor R-adj.  The typical values shown are 1 Ohm to 100 Ohm for linear range. That is very intriguing. It looks like a shunt path to me then, via the R-adj. If I didn't get it all wrong, that requires shunt resistors of suitably high wattage, hmmm... not very green then.

Comments?

T Mastiff

unread,
Apr 19, 2020, 12:10:40 AM4/19/20
to OpenPnP
Hi Jaroslaw and everyone,

Two queries on requirements for such a controller board:

1.  Anyone thinks that LED current control (dimming) is a requirement? Or just on-off will do?
2. What about the fitness of GPIO on these STM micros?  I heard someone complain about one of these STM micros, that its GPIO isn't "good enough" to drive STEP pulses to Stepper controllers at some decent speed with steady regularity. Is this a real issue? My information is just hearsay so don't quote me on it!  :D  (It could also be due to sloppy interrupt programming, I hope it is just that. In fact I would expect no micros to have similar issues with GPIO).


On Friday, March 27, 2020 at 11:21:21 PM UTC+8, Jarosław Karwik wrote:
Hi,

As I am refurbishing my new (old ?) Philips CSM 66 I decided to make universal pick & place controller - kind of competition to Smoothie.
It is based on my commercial motion controller used in industrial ink printers - for pick & place it will have just a bit different firmware.

So few details:
- RS485, CAN and USB as communication protocols. First version will accept Gcodes from OpenPnp driver through RS485 or USB
- Support for two axis with incremental encoders  and one without
- The base idea is to use one controller for X/Y and the other assembled directly on the head - there will be shield with 3x small stepper drivers and 2x vacuum sensors
- 8 inputs ( for home/end position switches), 4 of them can be also configured as analog inputs
- 6 open drain outputs ( for valves, pumps etc)
- two expansion slots - one for head stepper drivers/vacuum, the other one for feeders - there is i2c and serial, so it will be possible for valve power outputs or even Siemens electronic feeders ( if ever needed - it is easier to use the already made design by https://github.com/bilsef/SchultzController)

Schematics preview available at : https://github.com/jarekkt/jarekktpp_controller



Comments are welcomed :-)  - please let me know If I forgot something important to be placed there - it is still preliminary design.



Uni_Printer.jpg

Uni_stick.jpg



Jarosław Karwik

unread,
Apr 19, 2020, 1:13:14 AM4/19/20
to OpenPnP
Hi,

1) I will evaluate if it is needed. The LED controller design was taken from my big UV lamp which does have i2c resistor ladder to control dimming. 
There is slightly issue with pins on connector ( not enough) some rearrangement would be needed for it.

2) Stepper motors are never not controlled directly by CPU pins - either differential signal is used ( RS422 drivers)  or buffered lines  with  74HC/AHC chip (100R reistor on the line included).

PS. GPIO pins in STM have configurable speed/strength,  you need to setup it correctly.

Jarosław Karwik

unread,
Apr 19, 2020, 2:49:14 AM4/19/20
to OpenPnP
One last thing left in the firmware - motion generator.
I do have solution for trapezoid velocity profiles , but here S-curves would be desired - to get max speed without parts falling off.


Math is not that complicated, but converting it into working solution - non-trivial

Jim

unread,
Apr 19, 2020, 3:05:28 AM4/19/20
to OpenPnP
On Sunday, April 19, 2020 at 8:49:14 AM UTC+2, Jarosław Karwik wrote:
One last thing left in the firmware - motion generator.
I do have solution for trapezoid velocity profiles , but here S-curves would be desired - to get max speed without parts falling off.

Hi Jarosław,

You can add s-shaped pulsetrain generation in future.
 
But your closed loop solution with the external linear encoders is what will increase the accuracy of the poor man's machines.

I look forward to it being a success.

Jim

Marek T.

unread,
Apr 19, 2020, 4:53:31 AM4/19/20
to OpenPnP
Hi TMastiff,
The gist is that it's instead of high wattage resistors and providing constant current independly of voltage source changing in reasonable range.

Jarosław Karwik

unread,
Apr 19, 2020, 9:02:39 AM4/19/20
to ope...@googlegroups.com
Well, I need only an evening or two to get it right :-)


niedz., 19 kwi 2020 o 10:53 Marek T. <marek.tw...@gmail.com> napisał(a):
Hi TMastiff,
The gist is that it's instead of high wattage resistors and providing constant current independly of voltage source changing in reasonable range.

--
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/1943e605-d90c-49d9-b683-6a39421429e6%40googlegroups.com.

Jarosław Karwik

unread,
Apr 21, 2020, 2:18:01 AM4/21/20
to OpenPnP
The simplest case - ideal s-curve calculated from trapezoid prototype 

s-curves.jpg


Will be good enough for beginning - proof of concept for motion engine and calculations is working :-)


W dniu niedziela, 19 kwietnia 2020 15:02:39 UTC+2 użytkownik Jarosław Karwik napisał:
Well, I need only an evening or two to get it right :-)


niedz., 19 kwi 2020 o 10:53 Marek T. <marek.tw...@gmail.com> napisał(a):
Hi TMastiff,
The gist is that it's instead of high wattage resistors and providing constant current independly of voltage source changing in reasonable range.

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

Jim

unread,
Apr 21, 2020, 4:32:12 AM4/21/20
to OpenPnP
On Tuesday, April 21, 2020 at 8:18:01 AM UTC+2, Jarosław Karwik wrote:
The simplest case - ideal s-curve calculated from trapezoid prototype

Your simulation looks nice.
Are you planning to implement some kind of smart moves, when x/y has different accelerations? 

Jarosław Karwik

unread,
Apr 21, 2020, 4:57:33 AM4/21/20
to OpenPnP
Well, the calculations are independent for each axis - it is not CNC which requires full synchronicity (  I do have another CNC controller for which I calculate 4 axis full sync trapezoid control).
It will depend on on F parameter in gcode - capped by maximum speed/acceleration setting for independent axis. 
But still i may force some sync if it is used for X/Y, otherwise you could get undesired trajectory in case of bug difference in axis parameters. 

John deGlavina

unread,
Apr 23, 2020, 7:48:42 AM4/23/20
to OpenPnP
Jarosław, this looks fantastic! I'm curious why you chose to write your own firmware instead of using something like Smoothieware or Marlin? Is it because of the closed loop design? 


On Sunday, April 5, 2020 at 1:04:22 PM UTC-4, Jarosław Karwik wrote:
Almost ready :-)

Uni_Printer.jpg



W dniu piątek, 27 marca 2020 21:03:35 UTC+1 użytkownik Jarosław Karwik napisał:
CAN is used in my ink printer, here RS485/USB is more convenient as you can send gcodes directly. CAN is faster and meter for having several devices on same bus, but would require extra code in OpenPnp


This is cabling taken from my machine :-) ( Philips CSM 66 )









W dniu piątek, 27 marca 2020 20:33:49 UTC+1 użytkownik TheCunningFellow napisał:
Nice,

I'm working on something similar but with SAM rather than STM parts and no CAN bus.

Much nicer to have 4 wires going to the head rather than a bundle of 20+

Jarosław Karwik

unread,
Apr 23, 2020, 7:57:41 AM4/23/20
to OpenPnP
Several reasons:
- This is clone of my commercial closed-source project. I will make it LGPL and share. My master project will import this one and add some  CAN based communication ( I use it for industrial ink printers)
- I use much faster (and different) hardware then Smoothie/Mariln. This is 480MHz beast driving this project :-) ( schematics not updated yet - stm32H7 series). Optimized and copied from my another commercial project ( 8 axis CNC controller - uses dual core brother of this project CPU). Should go close to 500 kHz - so no more step multipliers in servos 
- I have pretty big code base for it - most is copy paste, it also serves ans testing grounds for my commercial projects
- This one will be optimized for Pick & Place only - so motion for XY with encoders ( option 1), dual head control ( option 2) and conveyor (option 3)

I will stock this board - as I need for my own purposes - so it will be easier available then e.g. original Smoothie.

And try to talk with Smoothie maintainers about changes specific for Pick & Place .....

Marek T.

unread,
Apr 23, 2020, 8:45:10 AM4/23/20
to OpenPnP
Sounds really nice! :-)

Marek T.

unread,
Apr 23, 2020, 8:47:34 AM4/23/20
to OpenPnP
But finally what have you decided about the control medium to PC: USB or Ethernet?

Jarosław Karwik

unread,
Apr 23, 2020, 9:05:59 AM4/23/20
to OpenPnP
No ethernet. I need all the other interfaces ( CAN and RS485), so will not trade.
But would you really like it to have ? Might consider at least connector with RMMI to drive external PHY with trafo


Right now you can choose:
- RS485 and gcodes - directly
- RS485 - more then one device connected together - but requires packing gcodes with unit address ( I have simple  test protocol for it)
- USB

Jarosław Karwik

unread,
Apr 23, 2020, 2:40:57 PM4/23/20
to OpenPnP
I may add ethernet option on the shield - there is space , only small cahneg in connector would be needed ( SPI base 100Mbit mac/phy )

Marek T.

unread,
Apr 23, 2020, 3:10:05 PM4/23/20
to OpenPnP
I meant connection to the PC, so how do you want to use CAN or 485, converters? So rather we talk there is usb for this purpose only, isn't?

I think an ethernet is nice solution, better than USB. My private opinion, as less usb devices as better. Just pity that Smoothie has ethernet so completely useless for gcodes.

Jarosław Karwik

unread,
Apr 24, 2020, 4:23:03 AM4/24/20
to OpenPnP
Well, I know that USB is no-go for CNC, all my controllers use Ethernet. But these Ethernet cables usually end up in Ethernet to usb converters on PC side.

But - this is valid concern. I will add connector to use cheap external Ethernet modules - ENC28J60 / W5500 / ENC624J600

Something like this:
https://www.ebay.com/itm/1pcs-MiNi-ENC28J60-Ethernet-LAN-Network-Module-For-Arduino-SPI-AVR-PIC-LPC-STM32/184185578944?epid=596508514&hash=item2ae250e5c0:g:LowAAOSwsixckZ9B

Jarosław Karwik

unread,
Apr 29, 2020, 11:46:58 AM4/29/20
to OpenPnP
PCB ordered. 
There is even ethernet for Marek ;-) - small ENC28j60 based module can be soldered for it.

uni2.jpg

Marek T.

unread,
Apr 29, 2020, 11:54:13 AM4/29/20
to OpenPnP
:-)
If it goes about me there is still missing one more vacuum sensor :-) :-).
But I'm trully convinced that possibility to resign of any possible usb is good option.

Jarosław Karwik

unread,
Apr 29, 2020, 11:57:35 AM4/29/20
to OpenPnP
Well, there is shield board for it



mod.jpg

RENEE Berty

unread,
Apr 29, 2020, 12:31:10 PM4/29/20
to OpenPnP
Woaw, pretty Nice!

Jarosław Karwik

unread,
Apr 29, 2020, 3:33:26 PM4/29/20
to OpenPnP
Got s-curves calculations right
I can now - before the move - calculate timings for my motion engine.

Same distance with different acceleration/jerk settings

s1.jpg

s2.jpg



s3.jpg




RENEE Berty

unread,
Apr 29, 2020, 3:36:28 PM4/29/20
to OpenPnP
:D I've been talking bout this but no one taking me serious!! GOOD

Jarosław Karwik

unread,
May 6, 2020, 8:54:12 AM5/6/20
to OpenPnP
Just got the PCB - assembly will start tomorrow


IMG_20200506_141334.jpg

Duncan Ellison

unread,
May 6, 2020, 9:02:46 AM5/6/20
to OpenPnP
Now, if only you know someone with a Pick and Place machine   :-)

Jarosław Karwik

unread,
May 6, 2020, 9:08:59 AM5/6/20
to OpenPnP

jdlv

unread,
May 8, 2020, 7:39:49 AM5/8/20
to ope...@googlegroups.com
Hi Jarosław

my pnp uses 2 linear encoders for Y axis and one for X. As far I can see
your board have only 2 encoders input. Is there a way to make it work?

Joël

Jarosław Karwik

unread,
May 8, 2020, 7:42:48 AM5/8/20
to OpenPnP
I have not advertised it yet,  but I need such setup as well - so called gantry lock mode.
In such setup you need more boards - one will serve Y on two channels (in axis slave mode), another one - X axis.

The design is "stackable", the most complicated part will be OpenPnp mapping :-)
Reply all
Reply to author
Forward
0 new messages