Just started playing with ChiliPeppr and have a Q:

Just started playing with ChiliPeppr and have a Q:

Is there a way to support a servo to lift a pen on a basic CNC plotter using GRBL shield and arduino rather than a z axis stepper?

Not directly, no. The grbl firmware doesn’t have any servo control code built in. But Marlin (3D Printer firmware) does, and I used to run a small router with it on a RAMPS board before I got my ox fully built. It is not ideal though.

Lots of fun other ways to do it though:
Build a small servo control circuit that relies on the state of one of the grbl digital pins like coolant or spindle enable. That way if the pin is on the servo goes to 1 position, and if it is off, the other position.
You could look at what John did with the laser solder widget. He had a separate arduino and wrote a macro such that if the Z in gcode was below a certain position the serial port json server would send a specific command to the other arduino (specified by com port), and again if the Z went above the position it would send a different command (laser on and laser off, respectively). This way probably applies most to make it easiest for you without having to change your post processor (the “rules” for how to generate your gcode and what command does what action, etc…)

Thanks Ray for the ideas Ray

Just for info-sharing purposes: This branch is working perfectly with a servo: https://github.com/robottini/grbl-servo

That is actually very helpful Mike. For my dedicated Pick n Place I want to have a servo flick the head down. I had been planning on Marlin but this may be better since CP already supports grbl (marlin is iffy, definitely not 100% for me yet). Cheers.

It works very well …

Typically I do a search and replace on gcode and for my setup use: M03S80 for down and M03s30 for up on the servo.

You should be able to program that into the post processor of the cam program you use. Or you might be able to make a macro in chilipeppr that runs alongside your job and handles that.

Thanks for the idea - a bit above my league right now but I’ll fathom it out :slight_smile: