Hi,
I am doing a CNC machine for a subject in uni, and I wanted to use grbl to read Gcode. The problem is that due to the requirements of the subject, I have to use two Arduino nano boards.
I have designed two PCBs with A4989SLDTR gate drivers, one for the two motors that control x-axis and another for y and z-axis.
I thought that maybe grbl could be somehow modified to send the signals dir and step for the x-axis to the second Arduino nano with SPI protocol but is it possible?? And if it is, how would it be done? Can I just add some functions with Arduino IDE, maybe defining the two signals as external variables in the library and transfer them with SPI instead of sending them to a pin?
martagdm:
I thought that maybe grbl could be somehow modified to send the signals dir and step for the x-axis to the second Arduino nano with SPI protocol but is it possible??
I suspect there is no chance of that happening. Any transmission system is going to introduce latency into what is a very precise timing system. And the movements of all 3 axes must be very tightly coordinated.
In addition to that GRBL is a very complex program and modifying it would be far beyond my pay grade, and possibly yours.
Why is it a requirement to use two Arduinos? At the moment this is a classic XY Problem
...R
The NANO is capable of running at least 3 axis drivers.
Once that is set up you can use a second Arduino on the TX and RX pins to command the first one.
That has been done successfully for the use of a pendant which describes your quandary.
Hope that helps you a little.
PS a pendant is also known as an MPG
Bob.