CNC

GRBLling a STEPCRAFT CNC

last updated: 07/04/20

Introduction

I bought a new toy :). A STEPCRAFT-2/D.840 construction kit to built a CNC milling machine. The mechanical part of the construction was no problem due to the good assembly instructions.

Naturally I want to use open source software. I use FreeCAD to draw and I should be able to generate GCODE directly with Freecad to feed the machine. I also found interesting information on bCNC.

I didn't want to use an old PC with parallel port and I love Arduino, so the first choice was GRBL. And finally I had seen the MaXYposi project with the MaXYpulti :) in the German Make magazine.

But...

After a successful assembly of the mechanical parts I now wanted to connect the GRBL board with the stepper driver board included with the kit, and ran into understanding problems, first because of being a CNC Newbie and second due to a lack of information in the STEPCRAFT manuals. I know that stepper driver have a DIR, STEP and ENABLE signal, but what should I do with an error signal, and only one XYZ limit signal, GRBL needing three of them. And why do I need relays, and are we dealing with negative or positive logic?

So to understand this, I needed a deeper insight, and I needed a plan :) meaning a circuit diagram.

Circuit and wiring diagrams

I looked at the driver board and tried to understand what's going on. Here is an incomplete circuit diagram drawn far enough to understand what the main signals do:

stepcraft connections DB25

stepcraft driver circuit

STEPCRAFT to GRBL (MaXYposi)

The parallel port of the STEPCRAFT machine (DB25 male X1, respectively 2x13 pin header SV1 on the PCB) gets the signals normally from a PC with parallel port (e.g. from LinuxCNC). We will use the GRBL board to generate the machine signals (DB25 connector male). The GRBL board gets its information over an USB to serial converter (FTDI, PL2303,CH340) from the PC. Unfortunately there is no standard for the signals, so it is not possible to connect both boards 1:1.


steppi2posi front        steppi2posi back


steppi2posi front

The signals on the STEPCRAFT driver board (DB25 X1 or 2x13 header SV1):

spindle switch


stepcraft emergency stop


emergency<em>reset</em>1         emergency<em>reset</em>2

GRBL (MaXYposi) to MaXYpulti

I will use the DB25 connector of the STEPCRAFT parallel board to connect the MaXYposi with the MaXYpulti. The easiest way is to recycle an old DB25 cable even if we get only 16 pins.


posi to pulti

posi2pulti front        posi2pulti back

Serial to USB

To access the GRBL board I soldered a spare Serial/USB converter with CH340 chip on a board. This board takes the place in the STEPCRAFT, where a 4th axis board would be. The DTR line (pin 13 on CH340) needed by Arduino to RESET the chip while programming is connect through a capacitor to RESET (pin 2 on header).

The pins on the right are only there to hold the board.


serial2usb front        serial2usb back

Fixation

To fix the GRBL board I added a wooden panel to the STEPCRAFT mill, fixed on the existing M3 tapped holes.


fixation 1        fixation 2

GRBL STEPPI :)


steppi 1

Changing the GRBL parameter with bCNC

Tweaking the different GRBL parameter for the STEPCRAFT machine could be done with a terminal program, but it is much more comfortable to use a GUI program like bCNC.

Install bCNC

Download bCNC from https://github.com/vlachoudis/bCNC and extract the zipped file. Read on git how to install it. On my Kubuntu I chose not to install it but changed to the bCNC subdirectory and started the program with

    ./bCNC

(If tkinter is missing you can install it with sudo apt install python-tk).

Configure bCNC

First I needed to customize the program because of it's tiny icons and font size. In the CAM tab there is a Config icon, displaying the Machine configuration for bCNC parameter. Here we find a checkbox to double the icon size.

Other important settings are:

The other settings can remain with the default values.

More infos about the configuration parameter can be found on github

Screenshot bCNC Config

The Fonts icon helps to get a bigger font.

Screenshot bCNC font

For more config parameter you can edit the User File, normally locatet in the home directory under .bCNC.

Screenshot bCNC config file

Changing GRBL parameter for the STEPCRAFT mil with bCNC

Click on the Controller icon. The following parameter have to be changed for a Stepcraft D840 mil. The other parameters stay on default values. For more informations on the parameter for your machine you can look in the GRBL wiki.

Screenshot bCNC controller

After changing the parameter you have to click on Controller to upload the data to GRBL.

To try milling your first project with bCNC look here: http://www.weigu.lu/other_projects/cnc/bCNC/index.html