MPCNC Grbl_ESP32 Controller

Thank you to all the people who gave me feedback. The design of the prototype is done and is on order. Here are the choices I made in the design

ESP32 Controller

The board will use the 2×19 pin style controllers. It will support the (2) common pin widths of 0.9″ and 1.0″.

Power Input

The voltage range is 12VDC to 24VDC. The power input will be via a (2) pin, 5mm pitch, screw terminal block. I decide to not use a barrel jack or Molex style connector, because these are primarily 12V types and many people will choose to use 24V.

Stepper Motor Drivers

I decided to support simple Pololu/StepStick style plug-in modules. I decided to not support SPI controlled versions like the TMC2130. These required significantly more I/O. I did not want to add external I/O expanders.

There are 5 stepper motor driver sockets. (2) each for X and Y and (1) for the Z. The (2) X drivers have separate step control pins, so the firmware can perform a squaring function at the time you home the machine. The same is true for the Y axis. This is optional, these axes can also be ganged together. All motors wire the same. The controller takes can of reversing the direction of the second motor and X and Y

Limit Switches

There are (2) connectors for limit switches on the X and Y axes. (2) switches are required for the squaring function. These switches are wired in parallel and use a single I/O pin. The extra connector is just for ease of wiring. If you like you can wire them in parallel off the controller. Limit switches can also be added at the other ends of travel if you like. All switches must be normally open (close when limit is reached)

Squaring uses the motors to pull the gantries square with the rest of the machine. Squaring is performed when the machine is homed. The axis moves towards the lower end of travel with both motors until it hits either switch. It then backs off the switch. It does not know which switch hit because they are wired to the same I/O pin, so it now homes each side independently. The location of the switches sets the squareness. As long as the motors stay energized, it will stay square.

Spindle / Laser

The basic spindle feature is a relay to turn on and off AC and DC spindles. It can handle 120VAC – 240VAC 10A and up to 30VDC at 10A.

There is also a 5V PWM function than can be used for laser power control and PWM controlled variable speed spindles. There is a safety interlock for this which would typically be used by a laser. (2)s pin need to be connected together, typically through a switch in order for the device to be connected to the PWM signal.

Control Switches

Grbl has the ability to do a nearly immediate feedhold without loss of position. It will decelerate the machine as soon as you click the button, even in the middle of a gcode command and if the buffer is full of moves. You can then click start to resume the job. If you want to cancel the job without any loss of position, you click the Grbl Reset button. This clears out any remaining things in the buffer.

All these functions are available of the serial, WiFi, etc, but sometimes it is nice to have a dedicated button when you need a quick stop.

5V Fan Power Output

There is a (2) pin header connector that can be used to add a cooling fan. A fan can allow the steppers to output more current and should also be used if the controller is mounted in an enclosure.

Project Status

The boards are on order. I expected to have testing and firmware changes done by the end of the month (March 2019). I will sell a few prototypes on Tindie, while working on getting a larger quantity built.

I will release all my source files as soon as testing is complete and the design is verified. Here is the current schematic.


  • Can this be used as a (5) axis controller? No, the extra X and Y axis stepper drivers use the same direction pin as their paired motor. They have separate step pins. Note: Grbl_ESP can be extended more axes, but not with this controller.
Share and Enjoy:
  • Print
  • Digg
  • StumbleUpon
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks

2 Responses to “MPCNC Grbl_ESP32 Controller”

  1. Derek Pyner

    Looks a really clean design. I have a small MPCNC and would love to try this out. Let us know when the boards go up on Tindie.

  2. Craig Hollabaugh

    Nice work.