Web interface
In order to improve the user experience, besides the hardware I’ve also decided to make some changes to the original firmware. Here below you will find some screenshots of what I added or changed in order to make the system more user-friendly.
Although the CNC control web interface by Barton Dring was already well implemented, I thought it would be useful to add some control buttons and a new page dedicated to diagnostics.
Let’s start from the dashboard.
As you can see here below, I added two buttons to the standard version: RESET and UNLOCK, which are needed to initialize the GRBL “engine” through the web interface. If the system crashes, you will be able to restart the CNC without having to reconnect to it through the serial port.
I also pre-loaded some useful macros: PWM Spindle-test, Spindle ON, Spindle OFF, Work Home, Work Load. These are just a starting point, but you can still change them according to your needs.
PWM Spindle-Test executes a spindle test cycle, testing the PWM output from 0-100%-0 in 40 steps at 1-second intervals.
Work Home brings the CNC to the coordinates 0,0,0 of the piece that is being milled (G54).
Work Load positions the CNC to the most useful ‘parking’ coordinates to load or unload a new piece to be milled (the last macro must be set by the user to the needed coordinates).
In order to modify the macros, just open the Macro Editor window with the blue button located on the top left part of the screen (see below).
The files containing the macros need to be uploaded to the virtual disk of the ESP32 before being opened. Press the green button in the “ESP3D Settings” section to access the virtual disk.
In the “Probe” section of the dashboard I added the option “Retract after touch”. I decided to add this parameter because I find it quite annoying that the tool remains in contact with the measuring sensor when the measurement cycle has ended. This parameter allows to set the distance from the probe sensor at which the tool must return once the measurement is done.
Let’s talk about the GRBL configuring screen now.
Some pretty common GRBL configuration parameters could originally be configured only by recompiling the source codes, which is not an easy task and is also quite a nuisance for some people. In order to avoid this, I added parameters $50 to $59 to the GRBL configuring section. In this way, it will be easy for you to quickly customize your CNC.
- $50 Use I2C I/O Expander, tells the CNC controller whether the I/O expansion board is present or not.
- $51 Pendant Enable, enables the external pendant keyboard.
- $52 Spindle off on 0 speed, switches off the spindle engine if the speed is set to zero (useful when you are working with a LASER).
- $53, $54, $55, $56 set the CNC parking position when the DOOR button is pressed.
- $57 PWM frequency, sets the PWM frequency of the spindle speed control (15/20 KHz can be okay to control a spindle in DC, but more often than not lasers for non-professional use can’t work at frequencies that are higher than 500/1000 Hz). This parameter allows you to set whatever frequency you need.
- $58 Servo wake up time, sets the waiting time before the machine can move after it has been unlocked (time varies according to the reaction time of the user’s CNC actuators).
- $59 Homing cycle, this parameter sets the bitmask that tells the controller on which axis the homing is done. In this way, you can exclude the axes that don’t mount the travel limit switches.
One new page I added is the I/O DEBUG section, which is useful to check the board inputs and outputs during the CNC installation.
This page is vital for those who are about to build their own CNC machine. In this way, when you are assembling the various parts you can check that all the connections and the positioning of the various travel limit switches are correct, thus drastically reducing accidental breakdowns due to wrongly-placed sensors or wrong wiring.
WARNING: the test screen is independent from the controller and operates physically on the hardware PINs.