Electric Diy Lab

Electronics DIY projects, Tutorial

Arduino project

GRBL CNC Shield + Z Axis servo MIGRBL

GRBL CNC SHIELD Z AXIS SERVO MIGRBL

Hello friends, In this post I’ll give a detail tutorial on how we can attached Servo to GRBL CNC shield and how we can generate Z axis servo friendly G-code by using MIGRBL inkscake extension.
In this way we can build a GRBL based CNC pen plotter machine or CNC drawing machine.

OVERVIEW

GRBL CNC SHIELD
GRBL CNC SHIELD

GRLB is the open source firmware freely available for every one, GRBL is used as firmware for CNC machine.

GRBL CNC Shield is used as controller for CNC machine, GRBL shield and GRBL firmware is very best for 3 axis stepper CNC machine.
But when we choose GRBL to build 2.5 axis CNC machines like pen plotter or CNC drawing machine we face a problem that there is not any provision to connect Servo to GRBL CNC shield.


Also default GRBL firmware also not have any facility to control servo motor for Z axis, but we have a hack version of GRBL version which support servo control.
Apart from all of this we also need one software which can convert our design into Z axis servo friendly G-code, For this we have a tool called MIGRBL INKSCAPE EXTENTION.

So below is the solution for how to use Z – azix servo with GRBL CNC shield

List of software and firmware to download

  1. MIGRBL Firmware (Normal GRBL does’t work download this only)
  2. Inkscape software 0.48.5 version
  3. MIGRBL inkscpae extention

As soon as you download all the above tools simply follow the below steps.

1. Uploading MIGRBL to Arduino

First of all unzip the downloaded file.
Now open the MIGRBL folder go to exmple>grblUpload>grblUpload.ino
double click on grblUpload.ino to open the code just simply compile and upload the code to arduino.
Be sure you have selected the correct port and board.
please delete if you already have any previous GRBL folder in Document>arduino>library folder.
Please note that GRBL will only work with arduino uno.
In this way GRBL firmware is successfully uploaded to arduino, next we will see how to connect servo motor to GRBL CNC shield.

2. Connecting Servo motor to GRBL CNC shield

GRBL CNC SHIELD AND SERVO MOTOR CONNECTION
GRBL CNC SHIELD AND SERVO MOTOR CONNECTION

Simply connect the 5V & GND wire of servo motor to 5V and GND pin on CNC shield.
PWM signal wire of servo motor need to connect at Z+ pin GRBL CNC shield.
In this way our wiring for GRBL CNC shield & servo motor.
If you notice a problem like arduino get reset when servo moves so give external 5V DC supply to servo motor.

3. Installing MIGRBL extension in Inkscape software

First of install the download inkscape version 0.48.5 software
Now download the MIGRBL Inkscape extension unzip the downloaded file
open the MIGRBL Inkscape extension folder copy all the four files.
Now got to C:\Program Files (x86)\Inkscape\share\extensions and paste here all the four files.
now open the inkscape software got to extension tab you will see here
MI GRBL Z-Axis servo controller this means the extension is installed successfully.

MIGRBL INKSCAPE EXTENSION
MIGRBL INKSCAPE EXTENSION


In any case you can’t find the extension at place or you get any error in g-code generation simply download this extension folder and replace with you existing extension folder with this

4. How to generate G-code

All process of installation is done now its time to generate G-code

  1. Open the Inkscape software
  2. Go to the file>Document properties
  3. Set the units to mm
  4. Set width and height of your plotting area and close the tab
  5. Now draw the design or drag and drop the image of your choice (If you have drawn something itself in inkscape skip to step 12)
  6. Now select the image and go to the path>trace bitmap
  7. Click ok and close the tab
  8. Now hold click on the image and drag the mouse
  9. A black and white image will separate from the original image
  10. Now delete the original image
  11. Drag the black and white image in center of the frame
  12. Again goto path>object to path
  13. Now go to Extensions tab and selec MI GRBL Z-Axis servo controller
  14. Change the values if needed
  15. Click on apply to generate the G-code
  16. Default location where you find the generated G code is C:\Users\Public
MI GRBL INKSCAPE EXTENSION
  • Servo up: Servo up G-code
  • Servo down: Servo down G-code (if servo move in opposite direction swip the M5 and M3 )
  • X axis speed: speed of X axis
  • Y axis speed: speed of Y axis
  • Angle for servo: set the value how much you need to up servo in angle 0 to 180
  • Delay: Servo up down delay keep it unchanged
  • Directory: the location where G-code file generate
  • Filename: default file name
  • Live preview: check to see live coordinates in inkscape

Example of GRBL CNC Shield + Z Axis servo MIGRBL

grbl based cnc machine

I hope you find this tutorial helpful for your project, if you have any question please ask in comment box.

7 Comments

  1. hub

    Can this will work with arduino megao ?

  2. driss

    Do we save the file in the form of G-code and end up
    Your answer concerns me
    thank you very much

  3. VAIBHAV MALVIYA

    SIR,
    THE 3D PRINTED CLAMPS PLEASE GIVE INFORMATION ABOUT THERE SIZE AND DIMENSIONS. AND WHERE TO GET THEM.
    PLEASE
    Thank you

Leave a Reply

Enter Captcha Here : *

Reload Image

Theme by Anders Norén