Hi everybody! This is my first post and I’m a rookie in this.
I’m gonna use two 0,4 A steppers, so I got a cnc shield and a a4988 driver for each stepper. I’m not gonna make a cnc. But I bought the shield so the steppers can be powered up easily.
My questiones are the following, do I have to use the grbl software to make my running code for the steppers? (if so, I hope it to be available for MacOS because I have no computer with windows os)
If not, then how do I control them from the IDE without using grbl?
No. You can write an Arduino sketch to move the steppers. Your sketch can set the Direction and Enable pins and pulse the Step pins to cause the steppers to move one step in the chosen direction. Your sketch can use the AccelStepper library to do the stepping for you. It will keep track of current position and your sketch can ask the library to move smoothly to a new position, either absolute or relative.
If we are talking about the CNC shield that attaches on top of an Uno, you can certainly use the CNC shield without grbl.
The pins are:
X step, pin 2 X dir, pin 5
Y step, pin 3 Y dir, pin 6
Z step, pin 4 Z dir, pin 7
Pin 8 is the stepper enable pin. On the CNC shield, pin 8 is held HIGH so the steppers are disabled by default. So set the pinMode for pin 8 to OUTPUT and set it to LOW to enable the steppers.
And the PC operating system is not relevant to grbl. grbl loads onto the Uno. The PC then sends gcode that grbl will interpret.
For my project I only need to, let's say, a letter obtained from the serial monitor, move x mm. I'm thinking of coding a function for each letter. To sum up, I would love to make it simple.
So I don't know if it's easier with grbl. Or what's the purpose of using it. So if it doesn't bring something useful, I would rather avoid it.
What you want to do is easy enough to do without grbl. grbl is a gcode interpreter. It would not difficult to write gcode to make the movements, but you could code the movements yourself, too.
It is very important that you set the coil current limit on the A4988 stepper driver module properly. Failure to do so can result in damage to the stepper motor or the driver.
You must know the value of the sense resistors on the module in order to plug the right values into the equation to calculate the value to set Vref. The Pololu A4988 page has instructions for setting the coil current (make sure to use the right value for Rcs).
If you describe what you want the steppers to do I may be able to help you with the code. I do have some experience with the CNC shield V3 (AKA the grbl shield).
sure. I have another question, I want to use a solenoid controlled by the arduino uno. But all the arduino pins are used by the cnc shield. However, I will only use two drivers ( each for a stepper) as seen on the pic. So how can I connect the solenoid to the arduino? On the cnc shield, too?
Thanks, I think all my answers have been answered but one.
I checked the article you posted about "what grbl is for" and I understand how it works. But I still don't get if I should use it or not. I mean, when should I use it?
Because I would like to make it simple, so If I had to use it, no problem. But I would know when to use it and when not to.
I want the serial monitor to show number characters from a file, and depending on the number, the fist stepper has to spin around the same number of whole turns.
So if in the monitor we get: 1 2 3 4 5 6 7 8
The first stepper has to turn once (360deg), wait, turn twice(720deg), wait and so on. Then when 4 characters are read, the second stepper will spin 2 whole turns and then again, the first stepper will turn, now beginning in 5,wait,6,wait...