Hello in here.
I'm really not sure where in this forum I should write my question, but if it's completely wrong, please let me know. then I'll fix it.
I need some explanation - help with an arduino Mega board. I have a cnc which now runs with a Uno / cnc shield and nema 17 steppers. I have a good handle on that part.
Now I want to build bigger and have a mega board, external drivers ( DM542T ) Nema 23 etc.
I need to be able to connect 4 stepper motors (2 x Y, X and Z)
3 limit switches / switches
PWM output for a laser module and one for turning the spindle motor on/off
emergency stop
I put grbl 1.1 on mega, but what then? I know that pins must be assigned so that it can be connected, but how do you do that?
Is there any "finished" firmware that can be put in, or is it some coding?
It's not something I have any experience with at this point.
I've spent some time looking around here, and searched a lot on youtube, and find a bit here and there, but can't really find a guide I understand and a lot of it is for Uno boards But maybe it's just me there is stupid
Should there be someone who can help me a little further, perhaps know of some good links, etc. Then I would be very grateful
Greetings from Flensburg.
uno is good enough. put cnc shield on it, connect external driver to corresponding socket with pinheader, endstops to its pins.
Nice, we're almost neighbours, but you probably speak better Danish than I speak German
Well, I have also been satisfied with Uno with cnc shield, but there are just a few limitations.
If you have a laser, like I have, it is connected to endstop Z pins, which means you cannot use Z endstop. it is not sufficient for homing the machine.. About the laser / z endstop settings, I found out to disable spindle in config h. ( line 339 ) in order to be able to use endstop, insted using laser.
I can't find any other ways to connect the laser. Have tried with spindle enable pins on cnc shield, but then the laser can only on / off. It is not a pwm output (or whatever it is called) and you cannot activate the laser in the GRBL setting. You know $32. so I simply don't know how.
So, unfortunately, I'm completely stuck with uno.
If you want to connect external drivers to the cnc shield, is it just a matter of removing the drivers (tmc2209) and the 3 jumpers and connecting to the pins called X.step/dir and so on?
Laser Mode : The new "laser" mode will cause Grbl to move continuously through consecutive G1, G2, and G3 commands with spindle speed changes. When "laser" mode is disabled, Grbl will instead come to a stop to ensure a spindle comes up to speed properly. Spindle speed overrides also work with laser mode so you can tweak the laser power, if you need to during the job. Switch between "laser" mode and "normal" mode via a $ setting.
// Define homing/hard limit switch input pins and limit interrupt vectors.
// NOTE: All limit bit pins must be on the same port, but not on a port with other input pins (CONTROL).
#define LIMIT_DDR DDRB
#define LIMIT_PIN PINB
#define LIMIT_PORT PORTB
#define X_LIMIT_BIT 1 // Uno Digital Pin 9
#define Y_LIMIT_BIT 2 // Uno Digital Pin 10
#ifdef VARIABLE_SPINDLE // Z Limit pin and spindle enabled swapped to access hardware PWM on Pin 11.
#define Z_LIMIT_BIT 4 // Uno Digital Pin 12
#else
#define Z_LIMIT_BIT 3 // Uno Digital Pin 11
#endif
snippet from cpu_map.h. this means by default z-limit goes to D12 and is absolute usable
BTW this from config.h
// Enables variable spindle output voltage for different RPM values. On the Arduino Uno, the spindle
// enable pin will output 5V for maximum RPM with 256 intermediate levels and 0V when disabled.
// NOTE: IMPORTANT for Arduino Unos! When enabled, the Z-limit pin D11 and spindle enable pin D12 switch!
// The hardware PWM output on pin D11 is required for variable spindle output voltages.
#define VARIABLE_SPINDLE // Default enabled. Comment to disable.
Maybe we're both right because basically both Z ( Z+ and Z- ) are the same. the same goes for way Y and X , and therefore it doesn't matter which Z I use for laser connection. But from what you post there, you can then obviously in Config h change each pins, and THAT I didn't know. As I guess I wrote in the post, I don't have much into the actual coding. but do know how to enable/disable in there, so I'll definitely try it out