I am planning on building a simple cnc machine to cut leather sections with the GShield and UNO.
I also want a small robotislc arm to feed the CNC machine, however I realized that the GShield takes up all pins on the Arduino.
How would I manage this. Multiple Arduinos?
I realized that the GShield takes up all pins on the Arduino.
No, it does not. A shield passes most pins through, unused, so that you can stack shields.
Of course, some shields need to be on top. Burying an LCD shield or a shield with an antenna is not useful.
Keep in mind that "running a CNC machine" can mean a lot of different things.
My son's 3D printer is driven by an Arduino Mega, but the communications between the printer and the outside world is handled by a Raspberry Pi, which communicates with the Mega.
The critical nature of the timing of activities that the Mega performs means that it can't do much else.
In the case of the G shield (if like mine) most of the pins of an Uno are used. 3 steppers, limit switches (1 each axis), spindle control, RX, TX, step enable and E stop take up 15 pins.
What firmware are you running on the Uno? GRBL, Marlin, etc? Or are you writing the controller code yourself?
@groundfungus, I am planning on using the GRBL firmware.
@PaulS Is it feasible to run one Raspberry PI that talk with Multiple Arduino UNOs? And each component of the machine will be run by a small Arduino?
@PaulS Is it feasible to run one Raspberry PI that talk with Multiple Arduino UNOs? And each component of the machine will be run hy a smal Arduino?
If you are going to have multiple Arduinos, then have the PI talk to one of them, and have it talk to the others.
You aren't, by any chance, thinking of one Arduino per axis, are you? That will not work.
In the case of the G shield (if like mine) most of the pins of an Uno are used.
OK. I misread that. Without the space, it looked like a typo, and I thought GSM shield.
I also want a small robotislc arm to feed the CNC machine,
Even if you have access to unused pins I think it is unrealistic to expect one Arduino to operate a CNC system and a robot, even a very simple robot. The CNC system will certainly require a lot of internal near-concurrent and closely timed activities. If you start adding on code for a completely different purpose and if they start to interfere with each other it will be a nightmare to debug.
Use two separate Arduinos for the CNC system and for the robot. They can be made to communicate with each other if some movements need to be co-ordinated.
There should be no problem using an RPi to coordinate multiple Arduinos. But you need to design your coordination system so that it does not upset with the required behaviour of the Arduinos.
@PaulS - Noo, I surely wasn’t planning on using one Arduino per axis :), I will most likely be using an Arduino shield called “gShield v5”. It connects to all of the Pins of an UNO, and has X,Y and Z axis outputs for the motors. It looks good, so I’ll give it a try.
Thanks everyone, that cleared up all of my questions.
Have a nice day!
Mega's are routinely used to make 3D printers.
I believe you will find the 20 IO pins and 2K SRAM to be limiting factors, which is why Mega's are used.
Separate Mega + RAMPS 1.4 boards are used, and you can also find combined Mega/RAMPS boards used to control 3D printers