Setting Up the iDraw Pen Plotter for the First Time Gcode Usage

First Time Gcode Setting Up for iDraw CNC Pen Plotter Writing Machine

Are you a beginner in the world of CNC pen plotter machines and feeling overwhelmed by the complexities of Gcode? Look no further! In this blog post, we will break down everything you need to know about Gcode and how to use it with UUNA TEK iDraw CNC pen plotter writing machines. Let's dive in!

What is Gcode?

Gcode, or also known as G-Code, is a programming language used in the field of computer-aided manufacturing (CAM). It is a set of instructions that tells a machine how to move and operate, such as cutting, milling, drilling, etc. but here we will learn how to use Gcode for pen plotting using the Idraw machine.

The term "Gcode" stands for Geometric Code and was first introduced in the 1950s by the Massachusetts Institute of Technology (MIT) for controlling automated machining tools. Over time, it has become an industry standard for controlling CNC Pen Plotter machines, now it can also control pen plotters like iDraw Pen Plotters.

So why do we need Gcode? Well, think of it as a recipe that guides the machine on what actions to take. As we all know it can be frustrating to use inkscape with large files as sometimes it hangs the PC or crashes the software.

The basic structure of Gcode consists of commands or lines starting with a letter followed by numbers. Each command represents a specific action or operation such as moving in different directions (x,y,z) and more. These codes are written in plain text format which makes them easily readable by both humans and machines.

Common Gcodes Used in iDraw Machines

Gcodes are an essential part of the CNC pen plotter machining process and are used to control the movement of a machine. In this section, we will discuss some of the most commonly used Gcodes in Idraw machines.

  1. G00 – Rapid Move: This code is used to move the tool(pen in our case) rapidly from one point to another without cutting. It is often used when there is a need to reposition the tool quickly.
  1. G01 – Linear Interpolation: This code is used for straight line movements between two points. It specifies the starting point, ending point, and variable feed rate(F) at which the tool should move.
  1. G20/G21 – Inches/Millimetres Mode: These codes are used to specify whether the machine should operate in inches or millimetres mode. The default setting varies among different machines, so it is important to know which unit system your machine uses. We will be majorly using millimetres for plotting.
  2. 4.G90/G91 - Absolute/Incremental Positioning Mode: These codes determine how coordinates are interpreted by the machine when moving from one location to another. In absolute mode (G90), coordinates represent exact locations on a programmed path relative to an origin point defined by G92 command; while in incremental mode (G91), coordinates represent distances to move from the current position.

NOTE:- There are more Gcodes in the world of CNC pen plotter machines but we only need to understand the codes written above in order to operate our Idraw plotters.

Software to Consider for Sending Gcode to the iDraw Machine.

We like to use UGS (universal gcode sender) to set up Idraw machine and send gcode in real time to plot art and/or writing letters. Below is the link to the official download page of UGS.

https://winder.github.io/ugs_website/download/

Changing Some Firmware of iDraw for Gcode Usage

Once done installing UGS now you can open the software and connect the machine with software in order to alter some firmware. Don't worry as these steps are reversible and you can do that under 2 minutes. Each time you need to switch between gcode and inkscape extension for plotting you just need to do these little steps.

  • 1.Turn on your plotter and plug in the USB cable from the plotter to your PC.
  • 2.Connect the plotter with your PC using the plug button(highlighted below) while making sure you selected the correct port of your USB.
Connect the plotter with your PC using the plug button
  • 3.Once connected successfully you can click the machine menu and select setup wizard.
click the machine menu and select setup wizard.
  • 4.Now we will show you what default settings will look like, all you have to do is just click next on the bottom.
what default settings will look like
what default settings will look like
what default settings will look like
what default settings will look like
what default settings will look like
what default settings will look like
what default settings will look like
  • 5.Now you have already seen what default values look like all we need to do some changes on #3 Motor wiring and Homing.
changes on #3 Motor wiring and Homing
  • 6.On #3 Motor wiring uncheck the everse direction from X and check that on Y like this.
uncheck the everse direction from X and check that on Y like this
  • 7.On #6 Homing make +X and -Y as shown below.
Homing make +X and -Y as shown below
  • 8.Click next and then finish.

As we are done with firmware now you can proceed to next steps

NOTE:- Always change these settings back to default when you want to plot with inkscape extension.

Making Some Custom Buttons in UGS to Make Our Life Easy

To make custom buttons in UGS follow the steps below.

  • 1.First things first, open UGS and follow the steps below.  
  • 2.Open Machine menu (third dropdown menu from top left corner).
  • 3.Select Edit macros (last option in machine menu).
  • 4.There you will see fill in the blanks like this:
fill in the blanks like this
  • 5.On the place of (Macro #1) write (HOME) and in the long space write ($H; G10 P0 L20 X0 Y0 Z0; G0 G90 X-300.0; G10 P0 L20 X0 Y0 Z0;) make sure to to remove () so it looks like this.
make sure to to remove () so it looks like this
  • 6.Next button we will make is XY zero using same steps as above by just replacing (Macro #2) to (Go to XY zero) and in the long blank write (G90 X0 Y0;) make sure to to remove () so it looks like this.
make sure to to remove () so it looks like this
  • 7.Once done correctly those buttons will start to show under the macros menu like this.
show under the macros menu like this.

Plotting Your First Artwork with Gcode

So you have come this far and we hope you understood how to set up your machine for first time usage with Gcode. Below you can find a gcode file to plot your very first artwork. Artwork is A5 and can be plotted with a 0.4mm pen for good results.

Gcode file link:- https://drive.google.com/file/d/1tyoX9kEyxbqLFSVveA8F3PMiuciasH8h/view?usp=sharing

Steps to plot:

  • 1.Open Universal Gcode Sender software.
  • 2.Turn on your plotter and plug in the USB cable from the plotter to your PC.
  • 3.Connect the plotter with your PC using the plug button(highlighted below) while making sure you selected the correct port of your USB.
selected the correct port of your USB
  • 4.Once the machine is connected you need to use our custom made Home button under the Macros menu.
use our custom made Home button
  • 5.Once the machine is at Home, you can click the open file button from top left and select the file you downloaded from google drive link above these steps.
click the open file button
  • 6.Now place your A5 sheet, set the pen at a height 3mm and click Play button on top left as shown below.
click Play button

NOTE:- Do not change the Baud.

Some Work in Progress Pictures of UGS and Artworks by iDraw Pen Plotters.

Artworks by iDraw Pen Plotters
Artworks by iDraw Pen Plotters
Artworks by iDraw Pen Plotters
Artworks by iDraw Pen Plotters
Artworks by iDraw Pen Plotters

This article is contributed by @Mandeep Singh

Suggestions from UUNA TEK Team that it's unnecessary to edit firmware, here are the guide:

1. Use the default settings.

2. Add a macro button, which will automatically go to the lower left corner after returning. Here you need to move the Y axis according to the size of the machine.

 

$H;G91Y-297.0F5000;G92X0Y0

The parameter after Y is the Y-axis stroke of the machine.

A4 machine is -297

A3 machine is -420

A2 machine is -594

A1 machine is -841

A0 machine is -1189

Use this command and add a motor sleep command later: $H;G91Y-297.0F5000;G92X0Y0;$SLP.

More Related Artices:

Back to blog

Leave a comment

Please note, comments need to be approved before they are published.