Running the X-Carve via grbl with a Gecko G540 controller

I’ve mentioned in previous posts, that I run my X-Carve under Linuxcnc with a Gecko G540 controller. It works well and I’ve been successfully creating gcode using (mostly) CamBam. However, I can’t access all the goodies that Easel provides unless I run grbl. This thread will document the process of getting grbl to drive the Gecko G540 controller.
First step was to get a couple of Ardunio Unos (if there are two Uno, does that make it a Due? :grinning:) They arrived from China today $A16 for both,
As I’ve never run grbl before and all I know about it is from reading posts in this forum, a bit of reading was needed to get downloading the source code,compiling and installing on the Uno, A terminal program lets me run a $$ command and get a readable (if not yet understandable) response.

Next I need a way to get the various control signals (XYZ step/direction, limit/home switches etc) from grbl to/from the Gecko. To do this, I’m using a cncshield. This shield supports 4 x 8825 stepper drivers so each Y axis motor has it’s own driver I won’t be using any of these, I’ll just be using the cncshield as a way to interface the signals via DB25 cable from the G540 to grbl. This combination of Arduino and cncshield will go in a small plastic box with a USB socket in one end and the DB25 cable at the other. No power supply required and no fan, the G540 is in a separate, cooled enclosure
The next step is the worst part (imho) and that’s crimping header connectors onto 25 wires. That won’t get done tonight!

Take a look at these DB25 Arduino Shields.
http://cnc4pc.com/motion-control/breakout-boards/arduino.html

2 Likes

Nice find, I did look around for DB25 adaptors but didn’t see those. ($A50 with shipping.)

Be careful with using a Chinese UNO. The ones we purchased were not reliable. I recommend using a Genuine Arduino UNO with your Gecko G540.

1 Like

The only concern I had with an Uno clone as that it would have the CH341 serial chip instead of the atmel one, one less driver step to worry about. All of the inputs and outputs to the G540 are opto isolated and as the Uno runs on 5V, I don’t believe there’s too much to worry about.
I might pick up one of these DB25 breakout/isolators next time I order some stuff for the 3d printer.

I’ve assembled another cncshield, this time without the sockets and pins for the stepper drivers as they aren’t necessary.
After crimping 25 wires, I’m starting to get cross eyed!

All neat and tidy in a box. I still need to source and install the three switches for Abort/Resume/Hold.
I have to make a change to the way I’m handling homing… In linuxcnc, all home switches are wired N/C in series and go to a single pin on the controller. For grbl, I can’t do this so have to run three separate wires for X,Y and Z. I also have to change the wiring on one of the Y motors. In Linuxcnc I just configure one Y motor to slave off the other but run in the opposite direction, with grbl I can’t do this in software, only three axis support.
As soon as the spoil board modification is finished, I can test it.

I know this is old, but I am using the same controller, and something you’ve done has me confused. Why don’t you need the headers? Without the on board drivers, what is the shield being used for?

You’ve probably noticed this by now, but the male headers on the CNC shield beside the 12-36V terminal block, allow you to clone the 4th driver (A) to any of the other three axes. Placing two jumpers across the line marked Y will clone the 4th axis to Y.

You don’t NEED the chcshield but I had a couple on hand and it seemed like a simple/cheap way to connect things up. The pin functions (STEP,DIR for each axis) are clearly marked and should reduce errors when hooking it together. Handy for an old bloke …

You’re correct about the jumper setting for slaving A to Y, What it doesn’t do though is reverse the direction of one Y motor. Both motors would turn in the same direction so changing the wiring on one motor is required to get this direction reversal.

Gotcha. That makes sense. I thought maybe there was some super secret voodoo in there. :smile:

I ran across this grbl-to-g540 interface board today and I remembered about this thread. Just FYI.

Thanks for the update.
It seems a bit expensive for just an interface board but OK for those that don’t like/want to hack their own.