ESP32-Based Grbl CNC Control Board

Was playing on Youtube…saw a guy controlling steppers with a ESP32 and motor drivers…then started digging

Ran across this

Which led back to his blog

Tried to get the boards…then found a site for sale
And here

Github page

So a full complete grbl CNC controller at 32bit processing, wifi and bluetooth capable with it’s own WebUI

Though you guys might be interested…a complete build for sub $50-70ish

 

1 Like

I’ve got one of those on my desk (I love the esp32, it’s a dream to program). I’ll hopefully be sharing my experience with it soon. I haven’t even turned it on as of right now.

1 Like

Cool…were you going to buy the board from him on Tindie?

I really think with an all in one solution with wifi/bluetooth might be pretty interesting…

I have the parts printed to build one (the MPCNC)…just haven’t put it together…I guess I’ll just bite the bullet and build a small 24"x24"x6" build or something…then if I need to expand from there…

I bought it from tindie. It looks good, but I haven’t had a chance to set it up yet. The wifi isn’t a silver bullet though. You can’t, for example, connect and run gcode from your computer. That’s why they have the sdcard.

I read ab huge forum post (10+ pages) on some people trying to make an esp32 Marlin board for 3D printing. It ended up needing a port expander because several of the pins are input only and there aren’t many extra pins. The esp has some great peripherals, uarts, spi, i2c, i2s, capacitive touch, bt, wifi… It seems more like the an expandable gcode sender than a controller.

This board is the exception, because it only had three drivers and no 3d printer stuff (hot ends, bed)

Any luck on this yet?

Yes sorry. I mentioned it in my ZXY build log. I’m using it. It was a little odd to flash, but it’s running fine. The sdcards work fine. Grbl is a little too touchy for a sand machine, but it works as advertised. I installed two tmc2130s configured for standalone and I’m using an old router wall wart power supply. It does occasionally reset, but not during a job.

I will probably keep it in my zxy, but i think I’m still going to add in a raspberry pi. The webui just isn’t quite as good.

I also wish it was laid out longer and skinnier. It doesn’t fit along the edge of my table. I am actually considering designing a new pcb with that portion and only two drivers. Sorry if specifically made for the zxy.

Way cool!

http://www.buildlog.net/blog/2019/03/mpcnc-esp32-controller-ideas/

Oh…saw a python controller…turn a RPi into the controller!

PyCNC check it out!

Thanks for the mention of my project.

FWIW: I designed a custom controller for MPCNC and Grbl_ESP32. I tried to address all the basic needs of the MPCNC, but I have not used one yet, so I hope I got it right. I am working with a friend to get one built in the next week.

These are the special features of the controller

  • Single 12V-24V input.
  • A stepper driver for each stepper motor (5 total).
  • The X and Y motors are ganged in hardware or firmware. They are also hardwired to run in opposite directions as required by the MPCNC design.
  • The X and Y can optionally use auto squaring (video) if you install (2) home switches per axis.
  • Spindle Relay. This can control AC and DC spindles or be used for a vacuum, coolant, etc.
  • Spindle / Laser PWM (5v) output with safety interlock.
  • Easy connection of home/limit switches. Each has a low pass filter to help with noise.
  • Z Probe connection
  • Control (Hold, Start, Reset)
  • 5V Fan connector. This helps if you place the controller in an enclosure.
These are the features Grbl_ESP32
  • Higher speeds than Grbl (AVR). This helps a lot with laser projects.
  • Wifi (Client or AP), Bluetooth Serial and USB Serial control.
  • WebUI. This has a similar functionality to Octoprint
  • SD Card. Much more reliable and convenient than streaming. Upload via WiFi
  • Serial Bluetooth for streaming via PC or phone
IMHO: Grbl vs. Marlin

I have used Grbl and Marlin on many projects, but I personally like Grbl far better for routers and lasers. The work offsets, real time feed rate overrides, fast feed holds are much better. With router/lasers, there is much more manual jogging, probing, fixtures, etc and Grbl just feels better for that.

I would love to hear feedback. The design will be released as open source as soon as all testing is done. I have a few extra to sell and will likely start selling more on Tindie. The cost will be about $40-ish (without ESP32 and drivers). If I get get a service to build some the cost could come down.

7 Likes

This is awesome. You should talk with Ryan about putting them in his shop. In some ways, grbl would be way easier for him.

Is it possible to have a single X or Y and dual Z? The low rider uses dual Z instead.

I have one of your boards on the Zen XY sand table, which is only two motors and I used TMC2130 in standalone mode. It’s still working like a champ.

3 Likes

This is truly awesome, Bart. I’ve been looking at your ‘Grbl_ESP32 CNC Development Board V3.1’ and wishing it had more features… Then you post this! My MPCNC hasn’t been running that long, but I can’t think of anything else I’d add.

When the boards are available, I’d love to try it out as an alternative to my RAMBo. I already have a small cache of ESP32 boards and stepper drivers that would love to be put to good use.

1 Like

@Jeffeb3

Yes, that should work. There is a cpu_map.h file that maps the pins to the features. It is far more flexible AVR Grbl due to the flexibility of the ESP32 I/O.

I would map the Z labeled driver to X, one of the Y labeled drivers for Y and use the two X labeled drivers for Z.

currently the cpu_map section looks like this.

#define USE_GANGED_AXES // allow two motors on an axis

#define X_STEP_PIN GPIO_NUM_12
#define X_STEP_B_PIN GPIO_NUM_22 // ganged motor
#define X_AXIS_SQUARING // enable squaring for this axis during homing

#define Y_STEP_PIN GPIO_NUM_14
#define Y_STEP_B_PIN GPIO_NUM_21 // ganged motor
#define Y_AXIS_SQUARING // enable squaring for this axis during homing

#define Z_STEP_PIN GPIO_NUM_27

#define X_DIRECTION_PIN GPIO_NUM_26
#define Y_DIRECTION_PIN GPIO_NUM_25
#define Z_DIRECTION_PIN GPIO_NUM_33


It would change to this.

#define USE_GANGED_AXES // allow two motors on an axis

#define X_STEP_PIN GPIO_NUM_27

#define Y_STEP_PIN GPIO_NUM_14

#define Z_STEP_PIN GPIO_NUM_12
#define Z_STEP_B_PIN GPIO_NUM_22 // ganged motor
#define Z_AXIS_SQUARING // enable squaring for this axis during homing

#define X_DIRECTION_PIN GPIO_NUM_33
#define Y_DIRECTION_PIN GPIO_NUM_25
#define Z_DIRECTION_PIN GPIO_NUM_26


The pins for the home switches would change too, but you get the idea.

3 Likes

This is cool! I would love to have one! Can you use something like CNC.js with it, I assume so with the serial USB connectivity. Call me a little old fashioned but I like having my PC connected to the machine.

Looking around I find ESP32 and ESP8266. Are they the same?

no. esp32 is next generation of esp8266, but it’s different chip with different pinout

1 Like

CNC.js…

It is 100% backward compatible with Grbl (8-bit AVR), it is can work with all serial port senders. It can also stream over Wifi.

You can still stay “connected” while using the SD card. All real time feedholds and feed rate overrides will still work. It is just more reliable than streaming because it does not depend on the connection.

BTW: We just added “Push Notifications”, so you can get a message on your phone or PC when the job completes or there was an error during the job.

 

1 Like

How can I get my hands on one of these? Happy to do some testing for you also.

A few of the controllers will be on sale soon. We just want to dail in a default profile and create some instructions. It could be as early as next week.

A production order is queued up as well and just waiting for the final thumbs up.

Watch this thread for an announcement.

 

Just so you know, Bart… I’m watching this thread for an announcement :slight_smile:

1 Like

Same for me…

Sorry to keep people waiting, but I want to make sure this is 100% tested. A lot of testing has been done on the controller and of the new firmware features, but I have not hooked it up to a MPCNC yet.

I am working with a friend who is building a machine, but it is taking a little longer than we expected. The machine should be fully mechanically assembled by tomorrow. We will be getting together tomorrow (4/5/2019) to finish all the wiring and begin testing and tuning the software settings. There will be a I/O pin map file and conservative default settings file that should make setup very easy. Users can tweak, speeds, accelerations, etc from a web browser after that. There will also be a pin map for the Low Rider, but we will need help with the profile because we don’t have immediate plans to build one.

Here is another image. I added a bracket to hold the fan. There is a connector for fan power on the controller. This will work for a while, but it might be nice to mount it to the machine.

 

 

 

 

2 Likes

Take your time. Mistakes cost more time than anything so just get it as close as you are comfortable with and then open it up to a few testers/helpers (my advice).