GRBL for 6 axis

2,246 views
Skip to first unread message

mojalovaa1

unread,
Nov 14, 2015, 10:54:24 AM11/14/15
to OpenPnP
Hi
I m start build new pnp machine with 6 stepper driver , and now have one big problems for me .
My machine will have 6 axis , x , y , z , R1 , R2 (R is rotation ) , and tape cover poller .
Problem is now for me how add R1 and R2 axis on grbl , I m not software developer .
My question is for people on this forum , have mayme some one grbl with add 6 axis and 2 or 3 relay , can you explain me how that can add on grbl files ?

Rich Obermeyer

unread,
Nov 14, 2015, 3:17:54 PM11/14/15
to ope...@googlegroups.com
Keep us informed on your progress.  A tutorial of this process would be very useful.


--
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 post to this group, send email to ope...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/134f13e3-f850-4f74-a611-af9617c27c82%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Rich

mojalovaa1

unread,
Nov 14, 2015, 3:49:23 PM11/14/15
to OpenPnP
For progres need software developers , I m not that and not have idea how I can change that now .

mojalovaa1

unread,
Nov 14, 2015, 4:45:21 PM11/14/15
to OpenPnP
Can some one say me where I need make change , add axis on GRBL  files  , I know that need add on CPU map , Config H ..... ??

Jason von Nieda

unread,
Nov 14, 2015, 5:06:40 PM11/14/15
to ope...@googlegroups.com
Moja, adding three axes to Grbl is a major code change. You will need to use something else

Sent from my BeOS enabled toaster.

On Nov 14, 2015, at 3:45 PM, mojalovaa1 <moja...@gmail.com> wrote:

Can some one say me where I need make change , add axis on GRBL  files  , I know that need add on CPU map , Config H ..... ??

--
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 post to this group, send email to ope...@googlegroups.com.

mojalovaa1

unread,
Nov 14, 2015, 5:23:10 PM11/14/15
to OpenPnP
Jason , on my first pnp machine I use mega2560 , and have 4 axis .
If I look on mega 2560 pinout , I have free port for add 2 axis and 2 relay , and if I will do that then I have 6 axis and min. 4 relay on options for use .

If can do that then have chep options for pnp machine , or for other cnc machine .

My pnp work fine with that options.

Jason von Nieda

unread,
Nov 15, 2015, 12:54:27 PM11/15/15
to ope...@googlegroups.com
It's not that having the pins available is a problem, it's a matter of adding the code. There is a lot of code to add just a fourth axis to Grbl. Adding two more would be monumental and would likely make Grbl too slow. I highly suggest using either Smoothie or TinyG, or as I said before, just use two Grbl + Arduino controllers and talk to them both. Using Smoothie or TinyG may cost a little more in the short term but it will be worth it as these software platforms are much more robust and expandable than Grbl.

Jason


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

mojalovaa1

unread,
Nov 15, 2015, 2:02:55 PM11/15/15
to OpenPnP
Jason , what you think of the slow , how much slow on % , 10% , 15% .... ?
I not see reason for some big slowdown on work , because  if I use 2 axis for 2 head , that  cant work boot on same time , and for that is not possible have some big difference with some faster devices and with ARDUINO MEGA2560  , I m not software developer and I not have experience with that , but I think that , all so is with relay , when you ON some relay for switch need some time for pick part and some for OFF  relay , for place part  , only maybe  can be problems for process that code on same core on processor  , can you please explain me ?

If we wont be real diy machine  with this system for mechanical or electronic control cant work some extra fast job , with one head that can be max. 2000 cph  and for 2 head maybe 3800 cph , and that is if you are  very good on develop that devices and with hand for make that .

On same time need be real and say that is very nice speed for diy machine  if we look for price .

My plane is use this pin out for control my new pnp machine , and if I will found some who can help me  make that change on GRBL :

Pinout is :
                          MEGA2560
 1. ENABLE               PC7 / DP30
 2. X STEP               PA0 / DP22
 3. X DIR.               PA1 / DP23
 4. Y STEP               PA2 / DP24
 5. Y DIR.               PA3 / DP25
 6. Z STEP               PA4 / DP26
 7. Z DIR.               PA5 / DP27
 8. C STEP               PA6 / DP28
 9. C DIR.               PA7 / DP29
10. D STEP               PL3 / DP46
11. D DIR.               PL2 / DP47
12. E STEP               PL1 / DP48
13. E DIR                PL0 / DP49


14. LIMIT X             PC6 / DP31
15. LIMIT Y             PC5 / DP32
16. LIMIT Z             PC4 / DP33
17. LIMIT C             PC3 / DP34
18. LIMIT D             PC2 / DP35
19. LIMIT E             PC1 / DP36 

20. RELAY1 (Vacum 1 )  PB3 / DP50
21. RELAY2 (vacum 2 )  PB2 / DP51
22. RELAY3 (AIR 1 )    PB1 / DP52
23. RELAY4 (AIR 2 )    PB0 / DP53
34. RELAY5 (ACTUATOR ) PL5 / DP44



CAMERA light DWN       PL4 / DP45 ( PWM pin )
CAMERA light UP        PL6 / DP43 


mojalovaa1

unread,
Nov 16, 2015, 5:26:54 AM11/16/15
to OpenPnP


Has anyone interested in finishing GRBL to 6 axis, one part that I did but I do not know further ?
I have allot errors on compile  , and I m not software developer  , and not have idea what need change for repair that errors .

 If someone is interested for do that  I will  put the file .

Danh Trinh

unread,
Nov 16, 2015, 6:48:25 AM11/16/15
to OpenPnP
RAMPS board supports 5 axis. You can probably connect your 2 rotation pickup motors in parallel. Look at the REPRAP firmware that supports ramps (ie: Sprinter). Runs on Arduino Mega board. If you have questions about the firmware, post to the REPRAP forums.

http://reprap.org/wiki/RAMPS_1.4
http://reprap.org/wiki/List_of_Firmware

mojalovaa1

unread,
Nov 16, 2015, 8:10:27 AM11/16/15
to OpenPnP
If I m understand correct yours suggestions is that buy reprap board and add if I m see ok Marlin or Sprinter on that board who have options for 5 axis stepper driver ?

Maybe that can wok but that is not my options , like I m say I wont use GRBL because that is  good options because I can use it for cnc machine and for pnp machine .
Cri.s is make me change on GRBL for one day , but he is not on possibilities now do that , but I think that some who know how GRBL work can add that 2 axis and  relay very fast .

Bob is make all so some change on GRBL , how much time is need for that  I do not know but he is start change that and he is newer before work it .

My English is  disaster  like  you can see , and that is problems for me  when start  work something like that , but I think that is not some big problems for some who have experiences  with GRBL .

I can  connect 2 stepper parallel because  can be problems with allot rotation part  , then part can move it before place on board .

 

Danh Trinh

unread,
Nov 16, 2015, 11:52:32 AM11/16/15
to OpenPnP
Adding 6 axis to GRBL is not easy. I think you can use 5 axis if you parallel R1 and R2 motors since they are not used at the same time. This assumes that you have z motor design to move R1 and R1 in opposite Z direction.

mojalovaa1

unread,
Nov 16, 2015, 2:19:38 PM11/16/15
to OpenPnP
I know that is not easy , that is easy then I will do that , but is not and for that  that can be some big problems for me .
After short talk with Bob , he is give me  some idea how is easy do that change.
First is say that all step port need be on same port , dir port on same port , limit port on same port.
Second that I can find Diff checker and look difference with him GRBL for 4 axis and  GRBL for 3 axis , and then found what is he change on grbl , and with same options add other stepper .

After that I m must make new pin out map for GRBL on ARDUINO MEGA 2560 .

New pin out  now is  on same port for all 6 axis for , step , dir , limit , relay and other , and  have space for add max. 8 axis , of course if ATMEGA 2560 will have speed for work that .

Pinout is :
                          MEGA2560
 1. ENABLE               PG2 / DP39
 
 2. X STEP               PA0 / DP22
 3. X DIR.               PC7 / DP30
 4. Y STEP               PA1 / DP23
 5. Y DIR.               PC6 / DP31
 6. Z STEP               PA2 / DP24
 7. Z DIR.               PC5 / DP32
 8. C STEP               PA3 / DP25
 9. C DIR.               PC4 / DP33
10. D STEP               PA4 / DP26
11. D DIR.               PC3 / DP34
12. E STEP               PA5 / DP27
13. E DIR                PC2 / DP35


14. LIMIT X             PL7 / DP42
15. LIMIT Y             PL6 / DP43
16. LIMIT Z             PL5 / DP44
17. LIMIT C             PL4 / DP45
18. LIMIT D             PL3 / DP46
19. LIMIT E             PL2 / DP47

20. RELAY1 (Vacum 1 )  PB3 / DP50
21. RELAY2 (vacum 2 )  PB2 / DP51
22. RELAY3 (AIR 1 )    PB1 / DP52
23. RELAY4 (AIR 2 )    PB0 / DP53

34. RELAY5 (ACTUATOR ) PD7 / DP38



CAMERA light DWN       PG1 / DP40 ( or use PWM pin DP11 / PB5 )
CAMERA light UP          PG0 / DP41 ( or use PWM pin DP12 / PB6 )



For STEP port will use PORT-A
For DIR. port will use PORT-C
For LIMIT port will use PORT-L

For RELAY will use PORT-B
For ACTUATOR RELAY will use PORT-D 

I hope so that now will be little easy for make change ?



mojalovaa1

unread,
Nov 17, 2015, 6:25:00 PM11/17/15
to OpenPnP
Jason , can you say me please , how you are give name for axis on openpnp , x,y,z,c???
For relay comand you are use m7 , m8 , m9 ???
Need that info that I can try add that on new grbl .

mojalovaa1

unread,
Nov 17, 2015, 6:25:00 PM11/17/15
to OpenPnP

Jason von Nieda

unread,
Nov 17, 2015, 6:27:09 PM11/17/15
to ope...@googlegroups.com
Moja,

The axes are specified in the gcode that is sent from the GrblDriver.java file. If you are to use Grbl with additional axes you will also need to modify GrblDriver.java to support your new commands. If you are going to do this, which I do not recommend, I suggest you first get everything working in Grbl directly via serial terminal and then worry about OpenPnP after.

Jason


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

mojalovaa1

unread,
Nov 18, 2015, 3:59:55 PM11/18/15
to OpenPnP
Yes Jason , I will test first grbl and after that make change of name axis .
For that I m ask you what name for axis you are put on openpnp , like I m say I m not software developer and that is litle problems for now to me .
What software I need use for open class file ?
For test grbl I m see that can use G code sender , but not found user manual , how install that g code sender or some else software ?

Jason von Nieda

unread,
Nov 18, 2015, 4:14:02 PM11/18/15
to ope...@googlegroups.com
Moja,

See https://github.com/openpnp/openpnp/wiki/Developers-Guide#building-openpnp for information on how to get started in OpenPnP's code.


The four default axes that OpenPnP sends are X, Y, Z and C. 

For what you are trying to do you will have to learn how to write software. There is no way around that. Either that or someone will have to write it for you. There is no way to just reconfigure Grbl and OpenPnP to support 6 axes. It's a software development task, not a configuration task. This is why I have suggested not using Grbl for what you want to do. You are doing it the hardest way possible.

Jason






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

mojalovaa1

unread,
Nov 18, 2015, 4:29:44 PM11/18/15
to OpenPnP
I m see on yours video that you have min. 5 axis on yours machine , x , y , z , rotation 1 and rotation 2 , and I wont add stepper for tape cover puller .
All so you need min. 3 relay for vacum 1 and vacum 2 and actuator .
If you have down and up camera then all so need light .
That is all what I need on my machine and all so you that have on youts machine , correct ?

Jason von Nieda

unread,
Nov 18, 2015, 4:37:48 PM11/18/15
to ope...@googlegroups.com
Moja,

Yes, I have those things, but as I said before, I am using Smoothie with a SmoothieBoard X5. Smoothie is a modular firmware that already handles 5 or more axes. It's very easy to do this with Smoothie, but it's *very* hard to do it with Grbl. If you insist on using Grbl for this you will have a very hard task ahead of you and it will require a major rework of the Grbl source code. If you switch to Smoothie it's just a configuration task.

On my machine I have X, Y, Z (one motor handles both Z axes), C1 and C2. I also use 6 digital outputs with MOSFETs for 4 solenoids, pump power and ring light power.

If you can limit yourself to 5 axes (X, Y, Z, C1, C2) and then handle the cover tape puller externally that will be even easier. Another alternative would be to tie C1 and C2 together so you don't have to use two drivers for them. It will be a small change in the OpenPnP driver code to handle this.

Jason


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

mojalovaa1

unread,
Nov 18, 2015, 5:13:39 PM11/18/15
to OpenPnP
I can use 5 axis grbl , but I not see whay 6 axis cant be options if I make grbl with 6 axis , of course one is becouse I m not java deweloper 😛 .
Cri.s is say help me but long time he is not on groups.
I hope so that he is ok ?
But how I m undetstand grbl , max is with one atmega2560 use 8 axis , of course if I make grbl with that options .
If you are look my new pinout then you can see that I m make pinout that we have space to connect now 6 axis but have space to 8 axis with one enable pin , and pin for 5 relay and 2 light .
And all that is one digital pin , thane have space for analog and pwm pin.

Jason von Nieda

unread,
Nov 18, 2015, 5:23:11 PM11/18/15
to ope...@googlegroups.com
Moja,

If you can modify Grbl to handle 6 axes then I can help you get it sorted out on the OpenPnP side, but making this change to Grbl will be much harder than you realize. Setting up the pinout is trivial. Making the required code changes to Grbl is the hard part. This is why I suggest using something that already supports 6 axes. I don't have time to help you modify Grbl, but if you get it done or someone else helps you get it done I can help with the OpenPnP driver.

Jason


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

mojalovaa1

unread,
Nov 18, 2015, 5:31:32 PM11/18/15
to OpenPnP
I will try my new 6 axis grbl , I hope so for 2 or 3 day .
Can you then modifi some part on openpnp then , like tape cover stepper ?
Jason can you give me info what is all options and version yours last openpnp ,on this moment I use old version?

Jason von Nieda

unread,
Nov 18, 2015, 6:24:20 PM11/18/15
to ope...@googlegroups.com
I'm sorry Moja, I don't have time to do custom, one off integrations for individuals. I am trying to move the project forward as a whole. Maybe someone else is interested? Perhaps you could offer to pay? I can point you to where the work needs to be done but I can't do it for you.

The latest OpenPnP is always available from http://openpnp.org/downloads/. The Develop version is the latest. 

There have been hundreds or thousands of changes over the past few years. The best way to see what has changed is the commit history: https://github.com/openpnp/openpnp/commits/develop

Jason



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

Robert Walter

unread,
Nov 30, 2015, 9:48:16 PM11/30/15
to OpenPnP
I'll go with the group (and Jason) on this one. Stick to a off the shelf solution for a motion controller. There are reasons the guys writing motion controller code work crazy hours to get things right. In short, it isn't easy.

I have battled the same issues pondering how to convert a china pick and place over to openpnp. I also have two dedicated tape peeling mechanisms on this machine, and decided to put them on a dedicated TinyG (most likely) and leave the X,Y,Z,C axis on a second TinyG. Just simpler to do for the time being. If I can get my feeder design wrapped up, then I can toss the tape peelers all together an stick to a single TinyG to run the whole show. I have considered smoothie as well, but I like the fact that the TinyG is AVR based, which I am very familiar with, and can easily build up a custom board to suit my needs. But the firmware will likely remain un-modified.

My $0.02 worth.

Rob.
Reply all
Reply to author
Forward
0 new messages