Help with controlling pen plotter

I am a little hesitant posting this as I am not sure how a “newbie” will be accepted. But here it goes anyway. I recently built an arduino uno controlled pen plotter, I am quite mechanically inclined, but not so when it comes to software, and controlling said things. I have the pen plotter homing and moving correctly using Chilipeppr from following a build i found on YouTube, but I absolutely hate Chilipeppr. I recently discovered Laserweb4, and that is where my questions begin. Laserweb seems like a much better avenue, but I have some questions. I am able to home the pen plotter, but that is the extent of achievable movements. I understand that my grbl settings need to change but I am not sure how to change them. Since the plotter moves correctly using chilipeppr, is there a way to copy those setting over to laserweb? Does anyone know of a writeup I could follow, or have any advice on how to proceed? Be gentle!!! lol

1 Like

Newbies are welcome here!

Welcome!

We can start with some basics; a picture of your setup is worth a thousand words.!

Also some basic questions:

  • which version of GRBL do you have?
    • did you flash it yourself?
    • did you use a pre-built controler card?
  • which version of LaserWeb?
    • what do you run it on? (OS & Version)

Sorry for the burst of questions, just trying to get basics settled early on.

1 Like

-I can take a picture when I get home from work, but I am using “grbl-mi” which is what was linked through the build video I followed for the electronics portion of this build.
-I am using an Arduino Uno with cnc shield wired as seen on the wiring diagram here. https://www.diymachines.co.uk/arduino-cnc-drawing-machine
-Downloaded Laserweb v4.0.999-138

Hi Chris, I didn’t see where you linked to the instructional video you used to build the machine. That would be helpful to anyone trying to help you out. Or is the construction video the same as the videos you posted a link to for showing the wiring diagram?

Same videos as on the link for the wiring.

1 Like

Ok, so i have been messing around with this thing, and beating my head against the wall with it. I changed course after finding another “how to” video which uses Universal Gcode Sender. I have everything functioning, ie: x and y axis properly moving and homing, and the pen servo moving up and down. Issue i am having now is i can not get a file to properly draw. I am using the gcodeplot extension for inkscape, which is apparently made for 3d printers so you have to modify the beginning commands which obviously arent needed for the pen plotter. Once i load the file into UGCS, and press play, the servo will lift, and the y axis will move in a straight line until it crashes at the other end. Never attempts to draw anything. Iam using simple drawings such as the word “test” and justva square. I get the feeling the issues is with generating the gcode from the inkscape extension, but it is the only extension i can get to function. All others i have tried give me errors. Anyone have any thoughts on what i can try next to help either fix this, or identify the next problem?

I would be going for something much simpler like just drawing a square box and then look at the gcode(it’s a text file). You should see your Start GCode at the beginning, somewhere in there it should lift the pen, then move to one corner of the square(you should see the X,Y coordinates) then drop the pen and move in a straight line to the next corner of the square. ie X or Y coordinate will be the same as your starting point and only the opposite axis coordinate should differ. That should happen for the other 3 sides of the square, the pen get raised and then the End GCode should finish the file. So not many lines of GCode.

I tried that, here is the gcode:

M03 S40
G00 F2400.0 Y0.000; !!Ybottom
G00 F2400.0 X0.000; !!Xleft
G00 F2400.0 X15.119 Y47.625; move !!Xleft+15.119 Ybottom+47.625
G01 F600.0 X85.423 Y47.625; draw !!Xleft+85.423 Ybottom+47.625
G01 F600.0 X85.423 Y15.119; draw !!Xleft+85.423 Ybottom+15.119
G01 F600.0 X15.119 Y15.119; draw !!Xleft+15.119 Ybottom+15.119
G01 F600.0 X15.119 Y47.625; draw !!Xleft+15.119 Ybottom+47.625
M03 S40

Pen lifts, and the y axis just moves until crashing into the opposite end of the gantry.

What are the dimensions of your X and Y rails?

Did you download the GRBL config file from the project?

Can you post it on here?

In the console window of your gcode sender the ‘$$’ command will display your current GRBL settings. Can you copy and paste those here?

1 Like

Dimensions are:
X = 320mm
Y = 292mm

$0 = 10 (step pulse, usec)
$1 = 25 (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.010 (junction deviation, mm)
$12 = 0.002 (arc tolerance, mm)
$13 = 0 (report inches, bool)
$20 = 0 (soft limits, bool)
$21 = 0 (hard limits, bool)
$22 = 1 (homing cycle, bool)
$23 = 1 (homing dir invert mask:00000001)
$24 = 25.000 (homing feed, mm/min)
$25 = 1000.000 (homing seek, mm/min)
$26 = 250 (homing debounce, msec)
$27 = 2.000 (homing pull-off, mm)
$100 = 79.872 (x, step/mm)
$101 = 79.872 (y, step/mm)
$102 = 250.000 (z, step/mm)
$110 = 500.000 (x max rate, mm/min)
$111 = 500.000 (y max rate, mm/min)
$112 = 500.000 (z max rate, mm/min)
$120 = 10.000 (x accel, mm/sec^2)
$121 = 10.000 (y accel, mm/sec^2)
$122 = 10.000 (z accel, mm/sec^2)
$130 = 320.000 (x max travel, mm)
$131 = 292.000 (y max travel, mm)
$132 = 200.000 (z max travel, mm)

do those distances make sense for the design you made? ie are the 15.119mm x 47.625mm positions? I’m wondering if you don’t have the CAM software set to mm but instead have it set to inches? G20 specifies inches and G21 specifies mm units.

So maybe add G21 to the beginning GCode segment and see what it does. Also make sure you home the machine before starting the GCode.

I am not saying I have figured it out, but I was finally able to get it to function properly. Stupid me wasn’t zeroing out the axes after I homed them. I then also noticed in the gcode I posted above, that I only had 1 pen up command at the beginning, and one pen down command at the end. changed it to the following gcode, and the machine performed it correctly. I only tested the rectangle file, and will test a more complex operation tomorrow. Fingers crossed i have this thing figured out. Then the only thing left to do is fine tune the speeds, because right now this thing is slooooow. lol

M03 S40
M5
G00 F2400.0 Y0.000; !!Ybottom
G00 F2400.0 X0.000; !!Xleft
G00 F2400.0 X15.119 Y47.625; move !!Xleft+15.119 Ybottom+47.625
G01 F600.0 X85.423 Y47.625; draw !!Xleft+85.423 Ybottom+47.625
G01 F600.0 X85.423 Y15.119; draw !!Xleft+85.423 Ybottom+15.119
G01 F600.0 X15.119 Y15.119; draw !!Xleft+15.119 Ybottom+15.119
G01 F600.0 X15.119 Y47.625; draw !!Xleft+15.119 Ybottom+47.625
M03 S40
G00 F350 X0.00 Y0.00

2 Likes

Since you are using an Arduino, why not use OpenBuilds Control. You can just flash it with the pen plotter firmware. It is relatively straightforward provide you are using the gbl pinouts on the Arduino.

I am not aware of the “Open builds Control” happen to have a link? or i can look it up when i get home later.

Here is the link to the software. It is another very informative forum.

I was also unaware of these OpenBuilds toolchains, thanks for the info.

Do you know if anyone is running these with a CNC using TinyG???

not sure but it states GCODE all over and earlier this year they added grblHAL which has some extensions to standard GRBL so if your TinyG is running GRBL I would think it’s GCODE would be compatible. But if TinyG is special in some way searching their forum might answer your question.

From the page:
OpenBuilds CONTROL will allow you to

  • Interface with, and Jog your machine
  • Run GCODE Jobs
  • Set Zero coordinates
  • Run Probing Operations
  • Integrate with cam.openbuilds.com
  • Flatten/Surface your spoilboard / stock
  • Calibrate your machine
  • Load Machine Profiles and customize Settings
  • Perform Firmware Updates
  • Design your own fully interactive Javascript Macro buttons

It runs code but like all controllers, it has some “interpretations”