4xidraw

From Interaction Station Wiki
Revision as of 06:51, 26 May 2019 by Oyo (talk | contribs) (→‎gcode)
Jump to navigation Jump to search

4xidDraw

4xidraw.jpg

What

The 4xiDraw is a diy xy plotter made from off the shelf materials and 3d printed parts. Perhaps it is a drawing machine more than a plotter. It can use regular felt-tip pens, ball pens or fountain pens as pen orientation is variable. It is a new version of an XY plotter using a single belt and two stepper motors in a configuration called h-bot. 4xiDaw instructables page

The plotter is Arduino based, and uses a special flavour of GRBL software created by the robottini user. It enables GRBL to handle a servo on digital pin 11 using commands M3 and M5. This way it can raise and lower the pen on the paper. Find the GRBL version here: servo GRBL and info how to flash GRBL to and Arduino here
About Grbl
Grbl is a free, open source, high performance software for controlling the motion of machines that move, that make things, or that make things move, and will run on a straight Arduino.

How

Inkscape

First, we will use Inkscape to send images to plot. Inkscape is a free and open source vector graphics editor.
Download here

We will have to install an additional extension for Inkscape in order to send our images to the 4xidraw.

Download it here

Find out how to install inkscape extensions here

Universal Gcode Sender

Universal Gcode sender is a full featured gcode platform used for interfacing with advanced CNC controllers like GRBL and TinyG. Universal Gcode Sender is a self-contained Java application which includes all external dependencies, that means if you have the Java Runtime Environment setup UGS provides the rest.


gcode

From Wikipedia on G-Code: G-code (also RS-274), which has many variants, is the common name for the most widely used numerical control (NC) programming language. It is used mainly in computer-aided manufacturing to control automated machine tools. G-code is sometimes called G programming language, not to be confused with LabVIEW's G programming language. G-code is a language in which people tell computerized machine tools how to make something. The "how" is defined by instructions on where to move, how fast to move, and what path to move. The most common situation is that, within a machine tool, a cutting tool is moved according to these instructions through a toolpath and cuts away material to leave only the finished workpiece. The same concept also extends to noncutting tools such as forming or burnishing tools, photoplotting, additive methods such as 3D printing, and measuring instruments. Simply put, G-Code is the language that tells the machine what to do, which movements to make, when to deposit material, when to stop etc. etc.. For example, a simple G-Code line that tells the machine to move to position X:10mm, Y:10mm could be:

G1 X10 Y10 

Here the code G1 is the code for move to. To draw a square with the 3D printer would require four such movements. Assuming we start from location X0 Y0 Z0 and want to draw a square of 10 by 10 mm:

G1 X0 Y10 
G1 X10 Y10
G1 X10 Y0 
G1 X0 Y0 

For a list of G-Code commands an Ultimaker 3D printer understands (or a printer running Marlin) see: https://github.com/ErikZalm/Marlin/blob/Stable/Marlin/Marlin_main.cpp Scrolling down will reveal the G-Code list.

An easy way to manually control your printer and send G-Codes by hand is Pronterface/Printrun: http://www.pronterface.com


Another square


M03 (pen up)

G21 (All units in mm)

G00 X20 Y30 
M05 (pen down)
G01 X200 Y30 F2000
G01 X200 Y200 F2000
G01 X30 Y200 F2000
G01 X30 Y30 F2000

M03 (pen up)
G00 X0 Y0 (going to 0 on both axes)



G commands

G0/G1
Linear move.  Moves to coordinates XY (or Z) and extrudes E material at a speed of F
example: 
G1 X500 Y500 E50 F3600 

G2 Clockwise arc move. Moves in an arc to coordinates XY, pivoting around relative coordinates IJ, extrudes E material between the two points at speed F example: G3 X90 Y30 I13.5 J1 E20 F3600
G3 Counter-clockwise arc move. Function is identical to G2 but reversed example: G3 X50 Y50 J30 E10.34 F4800
G4 Dwell for duration P (Milliseconds) or S (seconds) example: G4 S2
G20 Change coordinate mode to Inch
G21 Change coordinate mode to millimeter (default)
G28 Home axes. G28 to home all, or specify XYZ
G90 Set moves to absolute positioning mode. Moves will be in reference to machine zero
G91 Set moves to relative positioning mode. Moves will be in reference to last toolhead position
G92 Override current tool position with given coordinates example: G92 X50 Y50 Z1.34


F Feed Speed   Sets the feed rate, or rate of movement of the axes.

S Spindle speed

export Gcode via Inkscape

send Gcode via a python script