Arduino

The MP-CNC uses an Arduino microcontroller to control the stepper motors of the CNC. I am not very familiar with the Arduino but there is a website for them: Arduino.

The Arduino is a series of small computers with lots of input/output possibilities. On their website you can find (a lot of) different versions of it. Looking at the V1 site, they sell the Arduino-nano so that is probably the one they use for their MP-CNC.

The Arduino is a general purpose controller, so it should be possible to use other Arduino boards as well.

The Arduino cannot drive a stepper motor directly, it needs additional hardware to do that.

Some Arduino board support so called ‘shields’. A Shield is a board with additional hardware that plugs directly on top of some of the Arduino boards. In fact they are placed on top of the I/O pins of the Arduino boards. Reducing the amount of soldering to be done.

There are ‘shields’ available that contain stepper drivers, or which contain pins onto which stepper drivers can be plugged.

There are also complete boards that include the stepper drivers right on the main board that also contains the processor. That is not a bad idea, but seems more expensive and when a driver gets damaged, the whole board must be taken out and repaired. Using a shield based approach means that it is easier to swap out a defective stepper driver. I will have to compare costs to see what approach I will take. A shield seems intuitively the better approach.

There is an Arduino shield specifically developed for the RepRap 3D printer, called the RAMPS. This shield is used in the MP-CNC and probably many other CNC machines. It is a no-brainer to use this shield as well. So I will.

The RAMPS shield can host 5 stepper drivers and has a couple of other pins for I/O operations such as end-stop detection or temperature control. I do not know yet if any of these will be needed, but at least 3 drivers will be necessary for a CNC.

New schematic overview

We can now enhance the simple schema from the previous post:

cadcam-cnc

Firmware

The SW side (Firmware) is still a bit of an issue. The Arduino needs some firmware to interpret the G-code and translate that into stepping motor commands.

I see that V1 enginering uses an adaptation of ‘Marlin’ as their firmware. Marlin also has its own website: Marlin. Marlin is a 3-D printer controller firmware for a.o. the Arduino. It thus seems that a 3-D printer and CNC are similar enough to both use the same (?) firmware. But is it? after all V1 has its own firmware project on github. Why is that? do they change the Marlin code for their MP-CNC? questions I do not have an answer on yet. (V1 writes that ‘only minor’ changes are necessary, but are these configuration changes or SW changes?)

For now I will assume that I can use the MP-CNC adaptation of Marlin.

LCD and SD-Card interface

We do need an interface through which we operate the CNC machine. We need a display, a few buttons, and a way to transfer the G-code to the CNC-Controller (Arduino).

The reprap community has designed such a device in the the form of a LCD display with selection button and a SD-Card reader. The combination of Arduino, RAMPS and LCD/SD-Card/Selector makes for a complete self-sufficient CNC controller. New G-code is transported to the CNC-Controller using an SD-card. The LCD will show a menu from which we can select items via the selector/button and thus initiate the execution of the G-code.