Tips for implementing rotational axis with Arduino Uno and Grbl #194
-
Hello Gauthier and makers community, At first, I would like to congratulate Gauthier for the amazing job and for the tips about configuring grbl-Mega-5X for a Scara robot implementation. I am from Brazil and we are developing a Scara robot to be an educational kit. Here in Brazil, Arduino Mega is 1.5 times more expensive than Arduino Uno and many of our students already have Arduino Uno. That is why I am really motivated to learn and trying to create a grbl for this robot with a linear axis Z and 2 rotational A and B axis. This robot will be used as a simple drawing/laser machine. I was using GrblGru where my robot is already implemented (the last version of GrblGru comes with Tarsis robot, thanks to Gary), and where it is already possible to simulate the robot movements and to generate Gcode. I am using 28byj stepper motors. With this model, one motor revolution is equal to 64 steps and the motor has a gearbox so, for one axle turn (360º) we need 4075 steps approximately. So, 360º/4075 =0.088 is the number of degrees per step. I really appreciate it if you could give me some tips about how to change the grbl code for this new implementation or even if you could send me any useful material about this subject. Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @tarsisprado I don't have as great a mastery of the original Grbl on Atmega 328 as I have on my Grbl-Mega-5X version ...
become:
The internal names of the axis variables can remain X and Y, this will not change the behavior. You will also have to correct the messages in report.c by also replacing the outputs of X in A and Y in B. Finally, you will also have to correct in gcode.c to remove the mm / inch conversions because they should not be implemented for rotary axes. look for the MM_PER_INCH variable in the file to correct this. I hope this will help you, @++; |
Beta Was this translation helpful? Give feedback.
Hi @tarsisprado
I don't have as great a mastery of the original Grbl on Atmega 328 as I have on my Grbl-Mega-5X version ...
To start, in the gcode.c file, you can replace X and Y in lines 348 and 349 with A and B:
become:
The internal names of the axis va…