Skip to content
Grbl CNC Controller with Pen Servo Feature
Branch: master
Clone or download
Latest commit dac6177 Mar 27, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
grbl Initial Comment Dec 12, 2018
.gitattributes Initial commit Dec 11, 2018
LICENSE Initial commit Dec 11, 2018
readme.md Update readme.md Mar 27, 2019

readme.md

Grbl with Pen Servo Feature (Arduino UNO - ATMega328p version)

This is standard Grbl modified for use with a pen plotter that has a hobby servo for the pen up / down.

The servo will have two positions representing up and down. You use normal gcode. Any time the work Z is above 0 the servo will move to the pen up position. If it is at Z 0 or below it will be in the pen down position.

Installation

Grbl installs as a library. Install Grbl normally as described here and then copy the files in the repo over the Grbl files.

Default setup.

The default setup is for a buildlog.net Pen/Laser Bot Controller. If you are not using that, you need to make sure your schematic matches the pin defined in cpu_map.h

Pen Up / Down Positions

There are (2) defined values in spindle_control.c. You can adjust these values to suite your machine. You can even reverse them to reverse the travel of your servo. Make sure the new setting does not cause the servo to hit an endpoint or it will overheat and damage itself.

define PEN_SERVO_DOWN 31

define PEN_SERVO_UP 16

Performance Tips

Grbl is still running a full range virtual Z axis with accelerations and speeds. Be aware how this will affect your pen. For example: If the Z is at 5 and you tell it to go to -5, the pen will stay up as the virtual z moves from 5 to 0. The pen will then go down. The virtual Z will continue to go down to -5 before it executes the next move. You can control these "delays" by adjusting the speed and acceleration of the Z axis and what your CAM uses a Z locations for up and down.

If you want to have the pen go to the up position at turn on, define a negative Z work offset. Send the command "G10 L2 P0 Z-2". This will trick Grbl into thinking the pen needs to be up.

Donation

Did you find this useful? Please consider a safe, secure and highly appreciated donation via the PayPal link below.

You can’t perform that action at this time.