Hello
I'm new to the Arduino forum most of my experience is with the Picaxe.
This is what I am using:
Arduino Uno R3, CNC shield with A4988 drivers.
Nightscape 0.92.3, grbl Controller 3.6.1, latest Arduino IDE.
I have absolutley no experience with the Arduino software, but I do have a C++ and Atmel programming book on order. I have no experience with Nightscape. I know the software I'm using is outdated. I got the software package from a Youtube video (Mr. B Does Electronics) and down loaded all his software and followed his procedures.
I'm using ball screws for the X and Y axis. I have two limit switches (X and Y) for homing. I
also have two end of travel switches for X and Y. Nema 17 motors for used the X and Y axis and a servo for the pen. The motors are 200 steps/rev. The screw moves 8mm/revolution, so 200/8 gives me 25 steps/mm and that's what I entered into the GRBL setup.
Here's the problem: The servo's both home properly, but when I run the plot (a simple box) the X and Y servo's only move to their end of travel limit switches. I've tried moving the plotters "Start" position by changing the home location of the X and Y axis, but the same problem occurs. I tried moving the drawing (a simple box) all over the Nightscape's drawing area with the same results. I've also fiddled with the paper sizes, setting the drawing area (paper) so as to not extend past the plotters limits.
Does anybody have any ideas what's going on. I could probably use a ready made grbl file created in Nightscape, so I can see if it's a software problem or just my ignorance of Nightscape.
None. I draw a square box in inkscape (I don't know why I keep on calling it nightscape).
Anyway, I added some software to inkscape to do the grbl conversion, I then save the conversion as ray 26.gcode, close down inkscape and then I call up the grbl controller program, I home the steppers via grbl ($H) and enter the inkscape conversion named ray 26.gcode and then tell the grbl program to plot it. The X and Y axis start moving until they hit the end of travel switches. It doesn't matter where in the inkscapes drawing area that I drew the box, left corner, right corner, top, bottom, center.
In inkscape, I've changed the "document properties" to a page size of 74mm X 105mm even though my XY plotter can handle a much larger drawing.
If I calculated it right, 25 steps per mm should do it, at least to start with. Twenty-five is what I entered into the grbl controller's software. Microstepping would just give me a finer resolution. If it's homing right then I just assume the plotter is working. If the plotter is not plotting correctly it must be the inkscape drawing or the way inkscape is converting or the grbl controller software.
I have never used GRBL, but I am sure you need to tell the program all about the movement parameters for x, y and z, before it can relate to the the G and M parameters being sent form the inkscape program. Documentation you are using for GRBL should explain that.
I've got a list of the parameters in grbl you can change. I've got the parameters set up correctly, in fact you can actually change the direction the x or y homes in, so I went as far as having my plotter home in the upper left corner, upper right corner, lower left corner and lower right corner hoping one of those would match the starting point of inkscape of the drawing in inkscape, but to no avail.
I do have the z axis entered as zero in all it's parameters, as the servo pen uses the z- axis to operate. That's another story.
Well, there are buttons in the grbl controller screen that you can jog the x, y, or z axis and home, but none of them work. I have to type in $H which is the home command and the plotter homes ok.
Inkscape, is a popular drawing program, I called it Nightscape by mistake. You supposedly can add some extensions to it to get it to produce a grbl output.
Solved the problem:
Apparently homing the plotter does nothing for GRBL. You have to tell GRBL that where your home position is is the drawing's X0 Y0 starting position.
After you home your plotter enter G92 X0 Y0 into the GRBL controller. GRBL now knows this is where to start it's moves from, in relationship to your inkscape drawing.
You have to do this every time you plot. You must also enter $10=0 into the GRBL controller, but only one time. Chances are it's already set to zero.
I believe you have to do this regardless of what versions of GRBL in the UNO, or the GRBL Controller or Inkscape you use.
You'll notice, if you have home offsets, when the plot is done, the pen goes to the XY offset position
and not to the home switches. Since, that's where it started from.