electronics:maker_shield_cnc_controller

Maker Shield CNC Controller

Safety Statement

The author of this document is not liable or responsible for any accidents, injuries, equipment damage, property damage, loss of money or loss of time resulting from improper use of electrical or mechanical or software products.

Assembling electrical and mechanical CNC machine components like power supplies, motors, drivers or other electrical and mechanical components involves dealing with high voltage AC (alternating current) or DC (direct current) and other hazardous items which can be extremely dangerous and needs high attention to detail, experience, knowledge of software, electricity, electro-mechanics and mechanics.

BEFORE MAKING ANY CONNECTIONS OR DISCONNECTIONS POWER MUST BE REMOVED FROM THE DEVICE AND THE CONTROLLER. FAILURE TO DO SO WILL VOID ANY AND ALL WARRANTIES.

Before starting please read through all the instructions.

Note : Any Mains power connections must be installed by a Licensed electrician or suitability qualified person.

Errors and omissions excepted


The Maker Shield is an all in one GRBL 1.1 compatible stepper motor shield designed for the Arduino Uno and Uno compatible microcontroller boards. It has been designed to be easy and intuitive to use with no requirement for additional driver modules.


  • Reverse polarity protection for the main motor power input (VMOT)
  • Onboard Texas Instruments DRV8825PWPR stepper motor driver IC’s
  • Dupont motor header pins (A1, A2, B2, B1) for each drive channel
  • Onboard Micro Step (up to 1/32) and drive channel enable dip switches
  • LED error indicators for each drive channel (including the CLONE channel)
  • LED driver Enable indicator
  • Voltage Reference pad for easy current adjustment of each drive channel
  • Two VMOT header pins (dependant on input voltage used and a Maximum of +24V)
    • VMOT Header pins can be used for a cooling fan
  • X-Axis, Y-Axis, and Z-Axis header pins for the Clone Axis drive channel
  • X, Y and Z channel Limit switch inputs with Loop header pin
    • The loop header pins allows for a connection of up to two limit switches per drive channel directly to the board. (when used as a Normally Closed loop)
  • Additional GRBL header pins include,
    • Probe Pin – Allowing you to set the correct height of your milling tool
    • Cool Pin – Coolant control
    • Resume – Continue GRBL job after a Hold command or door open (if configured within grbl)
    • Hold – Pause the current GRBL job
    • Abort – GRBL reset function
    • Reset – Full Arduino Uno board reset
    • PWM – GRBL PWM output for milling or laser cutters that support variable speed / power
    • Spin Dir – GRBL Spindle Enable pin when configured as a milling machine
  • Handy micro step table on the back of the Maker Shield


For GRBLv1.1 configuration settings please refer to https://github.com/gnea/grbl/wiki/Grbl-v1.1-Configuration

The Maker Shield CNC Controller is suitable for a variety of small and medium sized automation equipment and instruments including but not limited to: CNC machines, laser engraver / cutter, plotters and drawbots. The integrated drivers are capable of driving standard 4 wire stepper motors with up to 2.5 Amp drive capability per motor coil.

This section will describe the connection and adjustment settings to get the best out of your Maker Shield. It is recommended to read through this section to become familiar with this board.

The stepper motor header pins are a 4- way Dupont style header pin that describes which drive channel it is used for and the relevant pin assignments. To ensure you get correct motor functionality and rotational direction please refer to your stepper motor wiring guide. Note: The Maker Shield pin assignments are a guide only and while the current assignments are marked as B1 B2 A2 A1 these can also be transcribed as B+ B- A- A+.

Each motor drive channel comes with its own Microstep and channel Enable DIP switch (Z Axis channel shown in picture). To set the required microstep resolution refer to the table below or the table on the back of the Maker Shield. Important NOTE: Please ensure you refer to the numbers marked on the board (Circled in RED in the image to the right below) for correct micro step settings and not the numbers marked on the switch itself.


Note : It is important to note that if a drive channel is not being used (not connected to a motor) that the relevant EN switch is in the ‘Off’ position.


The Maker Shield incorporates a green GRBL Enable indicator as a visual reminder that the driver IC’s are energised and supplying power to the connected stepper motors.



Each drive channel incorporates its own error indicator (Y drive channel shown in image) that will illuminate if there is a problem with the driver IC. Some error conditions are overheating or over current detection. If an error condition is detected and is persistent check all wiring is correct and connectors are firmly seated.


The below table describes the voltage reference setting to the current output (up to approximately 2.5 Amp) of the driver channel IC. It is important to ensure that the output current matches the motor current rating to ensure smooth and correct operation of your stepper motor. If the values are incorrect, you may end up overheating your motors if the current is set too high or under-powering your motors if the current is set too low. This board also incorporates a handy voltage reference pad for each drive channel.


The limit switch connector allows up to two limit switches per channel to be directly connected to the Maker Shield. This is achieved by the Loop connector for the respective channel input.

The Clone axis header pins allow you to clone either the X, Y or Z driver channel. When you are cloning an axis, please select the step and direction pins for that particular axis that you would like to clone. For more information on how to clone an axis, please refer to the Component Assembly section of this manual on how to clone an axis.

It is highly recommended to provide adequate cooling (heatsinks and fan) for the driver IC’s during normal operation. These drivers can get hot enough to burn before they will shut down due to overheating and will not resume normal operation until the appropriate temperature threshold has been reached. Allowing the motor drivers to overheat may result in missed steps or poor performance. It is recommended to use the provided adhesive heatsinks to aid in heat dissipation.

The VMOT header pins provide an additional power output that is tied to the VIN voltage used to drive the stepper motors (Max 24V). These pins can be used to run a cooling fan to ensure better cooling and more efficient operation of your Maker Shield.

This board utilises the standard 2.54mm Dupont style header pins (as described in Section 2) for easy and convenient connection of external accessories. Please ensure you pay attention to the polarity of the accessory header pins.


The onboard Reset button will perform a reset of the Arduino Uno. Pressing this button during operation will cause you to lose the current workload that is running on your Arduino Uno and halt the current operations. This reset button performs the same function as the Arduino Uno onboard reset button.


The motor power input connector (Blue) is located on the left-hand side of the board. This is where the main power from your power supply is fed into the Maker Shield. Please note the polarity marked on the board. NOTE: Max input voltage is 24V.

WARNING: The Maker Shield motor voltage MUST not exceed +24V.

Below is a guide on how to assemble the Maker Shield controller.

While taking normal static electricity precautions, please insert the Maker Shield onto the Arduino Uno, making sure that the Maker Shield pins are correctly aligned with the Arduino’s pins. Please take care not to bend the pins.

Limit switches are necessary if you intend to home your machine and prevent your machine from running into the end of the gantry. We recommend using our 2 Core Shielded Cable to eliminate any potential noise.

There are 2 methods of wiring your limit switches; Normally Closed and Normally Open. The standard configuration in GRBL is the Normally Open configuration. If you wish to use the Normally Closed configuration, you will need to invert the settings in the GRBL settings by changing the $5 setting from 0 to 1.

As shown above our limit switches have 3 pins;

  • Pin 1: Common
  • Pin 2: Normally Closed
  • Pin 3: Normally Open

Normally Open Configuration: If you are using our 2 core shielded cable, please connect the blue wire to the “Common” (Pin 1) and the white wire to “Normally Open” (Pin 3).

Normally Closed Configuration: If you wish to use the Normally Closed configuration in your build, please connect the blue wire to the “Common” (Pin 1) and the white wire to “Normally Open” (Pin 2).

Method 1: Standard Normally open Limit switch Configuration.

Please note that the images below are for illustrative purposes. The signal wire colour in this manual is yellow, please use white colour instead as included in your kit.

Please see the wiring for the Normally Open configuration in the diagram below. This example is for the X axis limit switch. Please repeat this step for the Y and Z axis limit switches.

Method 2: Loop configuration with 6 limit switches.

This method shows the connection for wiring two limit switches, this configuration requires the normally closed configuration. Please repeat this step for the Y and Z axis limit switches.


Emergency stop switches are recommended for stopping your machine in case of an emergency. There are 2 methods that you can use to wire up your emergency stop switch; A power cut (Method 1) or a Pause/Hold function (Method 2). If you wish to use a power cut, you will need to put your limit switch in line with your V+ lead. When activated, this will cut power to the controller and all work/machine position will be lost. A Pause/Hold will put the controller in a hold state and the work process can be resumed after releasing the Emergency stop.

Method 1: Power Cut (Recommended)

The emergency stop switch is to be put in line with the +24V lead going from your power supply to the Maker Shield. This method cuts all power to the stepper motors and work will be lost.

Method 2: Pause/Hold

This method pauses the job. It is recommended if you intend to resume the job.

If your machine has a mirrored axis, also known as a slave axis, the axis will need to be cloned. In most cases the machines have a dual Y-Axis. Please see below on how to clone the Y-Axis. Please insert a shunt in the YD and YS headers as indicated below:

It is important to ensure that your motors are wired correctly. Bipolar stepper motors have 2 coil pairs within them and therefore the wiring has to match these coils The coils typically have a labelling system that labels these coils, A+, A-, B+, B-. A+ and A- correspond to the first coil and B+ and B- correspond to the second coil. In the example shown below, green and black make up coil A and blue and red make up coil B. If these coils are mixed, the motors will vibrate instead of turn or turn in one direction only. For our Nema23 stepper motors, the wiring sequence is Red, Green, Blue , Yellow, for A+, A-, B+ and B- respectively.

For the best performance, it is recommended to use the MeanWell 350W 24V power supply. Please do not exceed the recommended supply voltage of 24V as damage to the components may occur. Please ensure that V+ from the Power Supply is connected to V+ on the Maker Shield (red wire) and V- from the power supply to V- of the Maker Shield (Black wire. Our cable has white wire. The Black has been used for illustrative purposes.).

To get the best performance from your motor, it is recommended to tune your current and micro-step settings. Please see below for the settings.

As stepper motors are current driven devices, you will need to finetune your current settings. Please refer to the table below for tuning the current. Please refer to the datasheet of your stepper motor to get the correct current rating.

Reference Voltage (V) Driver current Output (A)
0.1 0.2
0.2 0.4
0.3 0.6
0.4 0.8
0.5 1.0
0.6 1.2
0.7 1.4
0.8 1.6
0.9 1.8
1.0 2.0
1.1 2.2
1.2 2.4

To set the current for the driver, you will need the following:

  • A multimeter set to measure DC voltage
  • A small Phillips head screwdriver
  • 2 ended alligator clip.

Procedure:

Please refer to the diagram below while you are following the steps.


  • Please turn on your Maker Shield (With the stepper motors removed.)
  • Turn on your multimeter to read DC Voltage
  • Please attach one end of the alligator clip to the screwdriver and the other end to the positive probe of your multimeter.
  • Please attach the negative probe to the Voltage reference pad named REF highlighted with the Red square and insert the screwdriver in the adjustment potentiometer. Please note that each driver has its own reference pad with the axis label next to it. There is also an adjustment potentiometer specific to the driver. For example, the Y axis Voltage reference pad is named REFY with the potentiometer just below the driver highlighted by the Green square.
  • Adjust the Vref to suit your motor. The Vref is 50% the current value. For example, if your motor is 1.0A, please adjust the Vref to be 0.5V
  • Please repeat this for each axis that you intend to use in your build.

Apart from current settings, stepper motors can be further fine tuned by means of setting the micro steps. Increasing the micro-steps increases your accuracy. The recommended micro step setting is 1/8th step. Please see the table below:

IMPORTANT NOTE: Please follow the micro step numbering on the silkscreen on the board highlighted in the Green square not the dip switch itself as SW1 corresponds to the Enable pin for the relevant motor.


Micro Stepping Rates

Micro-Step SW1 SW2 SW3
FULL OFF OFF OFF
1/2 ON OFF OFF
1/4 OFF ON OFF
1/8 ON ON OFF
1/16 OFF OFF ON
1/32 ON ON ON

To set the micro step, please peel off the orange protective film on the dip switches and set the dip switch to the desired setting. Flipping the dip switch upwards puts it in the ON position. Please note that you may need to adjust the micro-stepping rate in the software as well, depending on the gcode sender that you are using. This guide uses 1/8th step so no further calculations are required as to the steps per revolution settings in GRBL.

As mentioned earlier, the SW1 on your control board corresponds to the enable pin for that particular axis. If you wish to use that axis, please enable the axis by moving the dip switch to the UP position. The motor enable interface is shown below:


Software and Programming

Your Arduino compatible microcontroller comes with the boot loader pre-flashed and is ready to be flashed with GRBL. Flashing GRBL on the Arduino is pretty straight forward. Please adhere to the following steps: Download and install the Arduino IDE

  • Download the Arduino IDE here
  • Locate the downloaded file. By default it should be in your Downloads folder.
  • Double click to run the installation process. Follow the prompts to install.

Download and install the GRBL libraries.

  • Download GRBL V1.1 here
  • Note where the file has been downloaded and extract the .zip file titled grbl.
  • After the extracting, copy the extracted folder to your Arduino Libraries folder. (By Default, your libraries folder should be in: (C:\Program Files (x86)\Arduino\libraries)

Configuring your Arduino

  • Before uploading any code, you must configure your board in 2 steps; Selecting a board and selecting the port that the board is connected to.
  • Open the Arduino IDE and you will see a blank sketch such as below:



  • To select your board, click on Tools - Board - Arduino Uno/Genuino Uno.



  • To select the port, click on Tools - Port and choose that port that your board is connected to.



Flashing GRBL

  • To flash GRBL click on File- Examples - grbl - grblUpload and a grbl sketch will be shown. Upload the sketch to the arduino by clicking on the arrow button highlighted by the yellow square.



  • Upon a successful upload, the IDE will report “Done Uploading.



There are many G-Code senders that can be used. We recommend the GRBL Panel G-Code sender because of its ease of use and features..

  • You can download GRBL Panel here
  • Locate the downloaded file. By default, it should be in your Downloads folder.
  • Unzip the downloaded file and copy the folder to your desktop.
  • Open the folder and locate the file titled GRBLPanel and double click to open it. You will be greeted with the user interface as seen below. Note that there is no board connected as highlighted in the red square.


Click to expand image


  • Connect the Arduino to the computer and press the Rescan button and select correct port in the drop down menu as indicated below. Click Connect and your arduino should be connected.


Click to expand image


  • Before jogging your machine, it is recommended to change the settings to ensure that your motors will run in sync and therefore accurately. You can configure the settings of your machine by accessing the Settings tab and changing the values in the Value column. Press the Enter key to save the changes for each value.


Click to expand image


Configuring and tuning your machine

  • After changing the settings to suit your machine, manually jog your machine and check to see if the distance traveled in the software matches the distance physically traveled by the machine. The image below shows the different sections of the panel that will need to be adjusted to your preference.


Click to expand image


  • The Red square sets the stepping distance from 0.01mm to 10mm
  • The Feed rate shown in the Blue square but can be overridden by the Feed rate in the Orange square
  • The Orange square has settings for milling.
  • As seen in the image, the Y axis shown in Green has been moved in the positive direction by 30mm. Your machine should move to 30mm. If it does not, please change the appropriate settings $101 which is the number of steps per mm traveled by the motor to suit your machine.
  • Repeat for all your axes until the desired accuracy has been reached.
  • More information on using the GRBL Panel can be found here: https://github.com/gerritv/Grbl-Panel/wiki/Using-Grbl-Panel

Recommended GRBL Settings

Below are the recommended GRBL settings. The highlighted settings must be modified to suit your machine.

This set of settings are for the lead screw driven Lead CNC 1000 x 1000mm. Please adjust the work area of your lead screw driven machine accordingly.


Setting Parameter Function
$0 10 step pulse, usec
$1 255 step idle delay, msec
$2 0 step port invert mask:00000000
$3 0 dir port invert mask:00000000
$4 0 step enable invert, bool
$5 0 limit pins invert, bool
$6 0 probe pin invert, bool
$10 3 status report mask:00000011
$11 0.02 junction deviation, mm
$12 0 arc tolerance, mm
$13 0 report inches, bool
$20 0 soft limits, bool
$21 0 hard limits, bool
$22 0 homing cycle, bool
$23 0 homing dir invert mask:00000000
$24 100 homing feed, mm/min
$25 1000 homing seek, mm/min
$26 250 homing debounce, msec
$27 5 homing pull-off, mm
$100 200 x, step/mm
$101 200 y, step/mm
$102 200 z, step/mm
$110 5000 x max rate, mm/min
$111 5000 y max rate, mm/min
$112 2500 z max rate, mm/min
$120 150 x accel, mm/sec
$121 150 y accel, mm/sec
$122 150 z accel, mm/sec
$130 824 x max travel, mm
$131 780 y max travel, mm
$132 50 z max travel, mm

Below are the recommended settings for an Ox 1000 x 1500mm machine. Please adjust your X, Y and Z max travel settings to suit your machine accordingly.

Setting Parameter Function
$0 10 step pulse, usec
$1 255 step idle delay, msec
$2 0 step port invert mask:00000000
$3 0 dir port invert mask:00000000
$4 0 step enable invert, bool
$5 0 limit pins invert, bool
$6 0 probe pin invert, bool
$10 3 status report mask:00000011
$11 0.02 junction deviation, mm
$12 0 arc tolerance, mm
$13 0 report inches, bool
$20 0 soft limits, bool
$21 0 hard limits, bool
$22 0 homing cycle, bool
$23 0 homing dir invert mask:00000000
$24 100 homing feed, mm/min
$25 1000 homing seek, mm/min
$26 250 homing debounce, msec
$27 5 homing pull-off, mm
$100 26.670 x, step/mm
$101 26.670 y, step/mm
$102 200 z, step/mm
$110 5000 x max rate, mm/min
$111 5000 y max rate, mm/min
$112 2500 z max rate, mm/min
$120 150 x accel, mm/sec
$121 150 y accel, mm/sec
$122 150 z accel, mm/sec
$130 820 x max travel, mm
$131 1275 y max travel, mm
$132 57 z max travel, mm
  • electronics/maker_shield_cnc_controller.txt
  • Last modified: 2020/11/17 23:01
  • by Maker Hardware Team