OpenPnP with LinuxCNC via linuxcncrsh?

More
24 Apr 2023 09:26 - 24 Apr 2023 09:47 #269744 by plhsystems
Hi,

I'm working on something similar and have progressed to the point where I can get OpenPNP to successfully connect to 2x LinuxCNC machines using linuxcncrsh and move all axes (X, Y, Z x4 and C x4). My goal is to place just over 7000 LEDs (0404) on a 275mm circular LED display board and with that in mind, I will have 4x nozzles. Unlike most, I really don't like the idea of using a PC, they are really not up to sitting in dusty/dirty machine shops and the ones that are, are pretty expensive. My solution is to use a RaspberryPi (actually an BananaPi-M5, almost the identical, but currently much cheaper and available to buy!), although currently I am running LinuxCNC in simulation mode on virtual machines.

OpenPNP supports lots of nozzles, LinuxCNC however only supports 9 axes, as OpenPNP with 4 nozzles takes 8 of those axes for the nozzles alone, I have decided to split the system into 3. The first SBC (RaspberryPi or equivalent) to run OpenPNP, the second to run the X and Y axes , actuators, etc and the third to control the nozzles. Unfortunately, OpenPNP only supports one upward facing camera which means it can only orient one nozzle at a time and I really want to orient all 4 nozzles simultaneously. This is something I will have to work on, but being a programmer, should be something I can do.

I built one of the LumenPNP machines over a year ago now, I found it flimsy and slow. I wanted to attach (a now somewhat old) video of my setup, but I can't, I may upload it to YouTube later (link below). It was running off a PC/smoothie board at that time, but the movements are pretty quick. I want to go faster, but will definitely need bigger steppers and ultimately servos.

I have found that useful information on any of this is sparse and I am only too happy to help where I can.


 
Last edit: 24 Apr 2023 09:47 by plhsystems. Reason: Added video link

Please Log in or Create an account to join the conversation.

More
24 Apr 2023 19:15 #269773 by blazini36
Cool setup, have you seen this? forum.linuxcnc.org/38-general-linuxcnc-q...ible-via-nml?start=0
iforce2d is working on a server to replace linuxcncrsh for an OpenPnP type deal.

If you're using 4 nozzles with the belt loop type in you're video (same as mine) isn't that 1 Z axis per 2 nozzles? So 4 Nozzles is 6 axes + 2 for X and Y. You should be able to do that with 1 instance of LinuxCNC.

My machine is pretty much built, I'm finishing up my controller which is a plug in BoB for a 7i92. My PC is an Odroid H3 which should be more than capable of running OpenPnP and LinuxCNC. I use an Odroid H3 in pretty much everything from my Milling machine to some custom machines, the environment is no more of an issue with an H3 than it is with a Rpi.

I saw the LumenPnP, about the only thing I liked about it was the general size, a couple of 2020 rails and a whole lot of 3D printed connectors with plastic wheels doesn't seem all that interesting to me.

 

Please Log in or Create an account to join the conversation.

More
24 Apr 2023 22:34 #269791 by plhsystems
I see what you mean about the Z drives, but I'm actually not keen on the belt drive arrangement (as per the video). The problem is that the first operation when homing is to home the Z, but with this arrangement it is possible that one nozzle could plunge into something it shouldn't. I haven't looked that hard into an alternative, but I can't really see a way to make it fool-proof without using individual Z drives. 

The Odroid's are fantastic little boards, I run a C4 on my desktop plasma cutter (also running LinuxCNC). I've written the LinuxCNC driver for the I/O pins on the C4 and hence don't need any interface boards (well, perhaps some interface circuitry, but nothing with any intelligence). I did at one point make an ethernet driven interface out of a STM Nucleo board, it worked well, but getting hold of the main chip proved impossible, so gave it up. 
 

Please Log in or Create an account to join the conversation.

More
25 Apr 2023 01:56 - 25 Apr 2023 01:57 #269798 by blazini36

I see what you mean about the Z drives, but I'm actually not keen on the belt drive arrangement (as per the video). The problem is that the first operation when homing is to home the Z, but with this arrangement it is possible that one nozzle could plunge into something it shouldn't. I haven't looked that hard into an alternative, but I can't really see a way to make it fool-proof without using individual Z drives
 

That's a valid concern. I typically see OpenPnP used on machines that the nozzle can't actually reach the platform, everything is raised up from it. Haven't used OpenPnP yet but if it can just call LinuxCNC's homing routine, then it is fairly simple. Just needs to call the "home all" and setup the routine to home Z last and set X and Y home coordinates to some spot where you'll never put anything. Technically not foolproof but pretty simple to mark a spot on the platform to never put things
Last edit: 25 Apr 2023 01:57 by blazini36.

Please Log in or Create an account to join the conversation.

More
25 Apr 2023 08:34 #269826 by plhsystems
The only problem with that (and this is true of any machine that doesn't use absolute encoders) is that the system doesn't know where any of the axes are and therefore any movement on the X and Y with the Z in an unknown position could cause it to crash into an object. I know it's unlikely, but if you hit the stop button just as the nozzle was picking up a part from a feeder, any movement after that that isn't homing on Z, risks damaging the nozzle and the feeder. Z homing must be done first to avoid any collisions, I know it may seem slightly paranoid, but if there is potential for a machine to damage itself through misuse, someone will misuse it.

Please Log in or Create an account to join the conversation.

More
25 Apr 2023 18:43 #269883 by blazini36
Homing Z first is probably the worst idea. if the machine has no idea where X Y or Z are then poking something sitting on the platform by homing the heads is pretty likely to smack a part.

Sure if the heads are not retracted then you can have a bigger problem by homing X and Y first but the simplest thing to do on a machine like this is find out if the heads are retracted.

For one, using a cam style Z will by design retract the heads anytime the steppers are disabled and only requires 1 Z for 2 heads.

For two, just using a potentiometer on the Z shaft will give you it's absolute position. Pots have been used in industrial machinery for many years and while I'm typically not a fan of pots for positioning, they would be perfect for just checking if the Z position is in center range before homing.

As long as you know the heads are retracted it's far better to home X and Y first.

Please Log in or Create an account to join the conversation.

More
25 Apr 2023 21:39 #269903 by plhsystems
Right, I see, you consider home in Z to be fully extended, I think opposite, so I see why you think homing Z first would be wrong.

Please Log in or Create an account to join the conversation.

More
25 Apr 2023 22:29 #269912 by tommylight
-Why would anyone assume the Z axis home to be down? It is up, always and on every machine i came in contact with.
-Even if using pneumatic Z axis, it should have homing disabled if no air pressure
Or am i missing something?
I have yet to see a machine, any machine that does not home Z first.
I am sure there might be some strange machine that does that, but i can not think of one.

Please Log in or Create an account to join the conversation.

More
25 Apr 2023 23:35 #269921 by scotth
So many times you see people refer to zero as home. Home is where the home switch is. Z zero is the face of the spindle flat on the table, and we never want to go there.
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
26 Apr 2023 00:21 #269927 by blazini36

Right, I see, you consider home in Z to be fully extended, I think opposite, so I see why you think homing Z first would be wrong.
 

No, I do not consider Z home to be extended. I consider Z home to be center when controlling 2 heads.

If you have no absolute positioning for Z then your concern is not knowing whether it is up or down and having it crash into something  while homing X and Y. Well if the machine does not know whether Z is up or down, how does it know which direction home is?

That answer is absolute position via potentiometer to either disable X and Y homing until Z is in home range (retracted) via potentiometer feedback. Or I just realized after I mentioned the potentiometer that the pot actually makes it so you can home Z first without worries since the direction is known. The suggestion to home Z last was if you only have limit switches.
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

Time to create page: 0.177 seconds
Powered by Kunena Forum