Repurposing gShield to make X-Y plotter

I upgraded my X-carve with an X-controller a while back and decided to repurpose my unused gShield to build an X-Y plotter. I’ve got it up and running nicely, but would like to replace my Z-axis stepper motor that controls the up-down movement of the pen with a servo motor. I thought I’d use the PWM circuitry that ran the original 24V spindle to now control the servo. Unfortunately, my understanding of the electronics involved in getting this done is limited. My two questions are:

  1. is this feasible and 2) if this could work, can anyone point me to online references to learn more? Thanks!

This is what you want:

1 Like

Thanks for the quick reply and excellent link. I think that will do the trick! I really don’t want to fry my old gShield so would you mind confirming (or correcting) that my planned wiring idea will be OK. For the 3-pin connector to the servo, I plan to power the servo using the 5VDC from the Uno and the controlling pin D11 on the gShield for the signal. D11 is what was used for the original 24VDC spindle.

I’ve made a handful of drawing robots using that grbl version. It makes it pretty easy.

Most likely the current draw that a servo requires is too much for the Arduino regulator.

1 Like

@DavidBurger If you’re using an SG90, or equivalent servo, I think you’d be ok using the 5V from the Arduino. I don’t think they’ll draw more than a couple hundred mA. @LarryM, do you know the current limit on the 5V pin? I’ll have to look at a schematic of the Uno, but the AMS1117 looks like a limit of 900mA.

Maybe I should use one of these:


to power the servo motor??? The old X-Carve controller that I’m using has “Spindle” “S+/S-” connectors that are probably 24VDC (I’ll measure to verify). Maybe I can use the old Spindle Logic/Ground jacks for the servo???
I’ve been struggling with the installation of the Arduino code on Github. I download the ,zip file and extracted it into the appropriate Arduino library location, but it won’t install. The Arduino IDE tells me: “Invalid library found in C:\Arduino\libraries\grbl-servo-eggbot: no headers files (.h) found in C:\Arduino\libraries\grbl-servo-eggbot”. Is there something more I need to do with the code I’ve downloaded from Github to make it work? I notice the downloaded library contains no .cpp file, only .h and .c files. I certainly appreciate all the help offered here!

The current limit for the 5V pin is complicated by the source voltage sourced into the Vin pin or the USB port.

USB input is limited to a total current draw of 500mA per the USB specification.

Depending on the design the Vin you may have a design that would work as the Vin input is outside of the Atmega328P and depends on the current capabilities of the design (clone vs genuine).

Just wanted to say that servos can draw many times the current rating of the coils and should be considered in the design.

1 Like

Since you are going to use the G-Shield, just use a cheap buck regulator from 24 volts to 6 volts or whatever servo voltage you need.

Make sure you don’t have another grbl folder in your arduino libraries folder.

Wow, I’m really frustrated with getting this library installed. I’ve gone through all the steps provided on the arduino.cc site to automatically and manually install the library and nothing gets the job done. I’ve changed the location several times to be sure I don’t have any other grbl folders as you suggested and I still fail. Here is what I’ve tried, maybe you can spot my error? I download the .zip file and it goes into a /download folder. In the Arduino IDE (1.8.8) I click on “Sketch” > “Include Library” > “Add .zip Library” and click on the .zip file that I downloaded. I get the following error messages in the IDE:

Specified folder/zip file does not contain a valid library
Invalid library found in C:\temp\libraries\grbl-servo-eggbot: no headers files (.h) found in C:\temp\libraries\grbl-servo-eggbot

I must not understand how this works, since the error message is talking about the default location for libraries and I’m pointing to a downloaded .zip file that’s located elsewhere. Do I need to move or unzip the downloaded file into the libraries folder? The online instructions say “Do not unzip the downloaded library, leave it as is.”

I was able to get this version of grbl downloaded and installed that also provides servo support:

After a few tweaks of the grbl values, I was able to get my plotter to work as expected. I appreciate the help I’ve received here.

CNC Etch-a-Sketch :slight_smile:

Gotta love This Old Tony… His videos are something I look forward to every time I see a new one posted!

Yeah, I love’em :slight_smile: Highly educational and funny as heck to boot!

Thanks to those watching this topic who provided some very useful suggestions. I’ve now gotten my 1m by 1.5m wall plotter up and running. I was able to get the Grbl version that supports servo motors for the pen up/down movements to work very nicely. The tip to use a buck regulator did the trick. The drawing below started out as an image I downloaded from my daughter’s Facebook page. The subject is her daughter, Evelyn. I converted it to TSP (Traveling Salesmen Problem, converted that to svg and then to Gcode and sent it to the plotter via Universal Gcode Sender. The border was one I found on the web, downloaded it, converted to SVG and imported into Easel. From there, I made Gcode, exported it and sent it via UGS. Lastly, the name was created in Easel, exported the Gcode and sent it to the plotter with UGS. I sent these as separate files since I wanted to use pens of different colors. Keeping in mind the origin and sizes was a challenge.

1 Like

Glad you got it working…that came out great!

Got a link to the software that did the conversion?

EDIT: I found this…I’ll have to take a look sometime.

I haven’t had much luck with Stipplegen. Instead, I followed these directions that also come form Evil Mad Scientist: https://wiki.evilmadscientist.com/Producing_a_stippled_image_with_Gimp