ESP32-Based Grbl CNC Control Board

Thanks for the update. I just posted earlier to let you know that your efforts are anticipated and appreciated. I love that you’re putting the work into Grbl_ESP32 (and MPCNC specifically).

FYI: I put my remaining prototype stock on Tindie. I also have a bunch more on order.

 

 

1 Like

Thanks, Bart! I have to ask, though, are the ones currently on Tindie the same as the ones that are on order?

Basically the same.

There are two unpopulated resistors on the prototypes. They were there in case the squaring did not work. Squaring is fine, so I took them off.

There are 2 adjacent, connected rows of 19 pins to support 2 different ESP32 module widths. Due to a net name error, 2 sets of pins did did not get connected. I bridged the pins with solder on the prototypes to fix this.

 

1 Like

On order, thanks, Bart.

Just to share, I appreciate Bart’s good service on this part. Soon after I placed my order, I got notification that it was shipped and I also got an email from him with links to information about the firmware, hardware, etc. The board arrived well-packed and in good condition. So far, so good.

Waiting for the arrival of a new ESP32 dev board to dedicate to this, and am looking forward to testing it out. My plan is to install the ESP32 and stepper drivers, load the firmware, and swap cables with my RAMBo board on my MPCNC for testing. I have some A4988 drivers as well as some TMC2208s that I will try with it, with the intention of another V1 machine in the not-too-distant future. I’ll report back here, of course.

2 Likes

Do the 2208s work in standalone? There won’t be code or connections to write/read the uart.

I got mine too. I am just waiting for some time to play with it, but it looks like a good board.

You can use any driver that is compatible with A4988 or DRV8825 type drivers.

Note: All microstepping pins are wired high. This simplifies the design and results in the highest microstepping rate. Be sure any “exotic” drivers work the way you want with pins set that way.

1 Like

Yes, the 2208’s were a drop-in replacement for the A4988 in my EleksMaker A3 Laser engraver.

Hello you all,

I have some questions,

Whats the sd card for?

Which is the probe pin on the esp 32, and do i need a pull up for this?

My cnc, uses tb6600/ hy div 268n/ 5a drivers, on a arduino uno,

And im planning on use esp32, sorry but im not going to use your board, im going to conect it direct to esp32 pins,

Also, i dont use end curse switches, do i need any change on grbl code , or the github version is ok,

Thank you for Reading, will apreciate any help,

All the best you all.

 

 

  1. SD Card. You can store gcode on the SD card and run it using a web browser interface. It is sort of like Octoprint for CNC. This feature is not required, but recommended if you are laser engraving. (faster, more reliable than streaming)
  2. Probe Pin: This feature allows you to use a touch probe to accurately set the Z zero on your work. The Grbl_ESP32 will allows you to use virtually any pin for this. A few pins require a pullup. See this I/O guide for help.
  3. TB6600. I am familiar with that driver chip. It can do 4.5A and 16x microstepping. I believe it is compatible with 3.3V logic. You probably are using it built into a larger assembly or as a multi-driver package. Some of those have opto-isolators or other things that would need to be tested with 3.3V logic. That driver seems overkill for a MPCNC. NEMA17 motors mounted to 3D printed cannot be run with much current. Also, some of the more sophisticated mini driver modules might be able to run the motors cooler per watt.
  4. Limit Switches: These are not required, but I highly recommend them. IMHO: Your machine is still a manual tool until you add them. Also, with them you can enable auto-squaring.
  5. Code changes. You will need to map the I/O pins you are using to the functions (step, dir, spindle, etc). I would suggest starting with one that is close.
If you have further questions on how to use Grbl_ESP32, I suggest you ask them at the GitHub repo. More people familiar with the firmware will see the questions and we update the wiki with common questions.
2 Likes

Hello Bart,

Thank you vy much,

My machine, uses nema 23,

Its a ridged small home made cnc ,i do cut aluminium, copper and engraving ,

I could use the drivers that you are using on your board ,i do have some here, and they will work fine too…with nema 23.

Anyway, thank you again

Ill try esp32,

 

Marcelo

 

 

 

I finally got some time to work on this. I got rid of blinking light on the ESP32 dev board and have this instead:

[attachment file=100006]

The ESP32 is acting as a WIFI access point and hosting the page via a web server, if you’re curious.

Now that I have the software installed on the ESP32, I’ll move forward with the hardware. I did already solder the pins on the ESP32 dev board, so everything is plug-and-play from here. I have the drivers ready, and will swap the servo wires from my RAMBo to see if I can make my MPCNC dance.

2 Likes

I got it to move. You may notice the ‘Alarm’ on that screen in the previous post. It took me a while to figure out that I needed to clear that error (click it until it went away) in order for the commands to go to the drivers. As with MPCNC, this is the kind of project where persistence is required.

This demo was done by disconnecting the cables from my RAMBo (including the power cable) and driving the MPCNC with Bart’s controller board. I skipped the end stops (mine is set up for dual-endstops), which did not affect the jogging.

Now that it’s moving, it’s time for some actual gcode.

1 Like

The alarm is due to you having homing enabled, but have not homed yet. The machine does not know where it is in 3D space yet. you can clear the alarm by sending “$X”, but it is better to home it to clear it. You can also turn off the homing feature.

Grbl is designed for subtractive machines (milling) and Marlin is designed for additive machines (FDM printing). There will be a bit of a learning curve, but I think once you master both, you prefer Grbl for milling.

If you are struggling with anything, I am happy to help via Slack.

2 Likes

One last thing… I used Ryan’s gcode to run this crown using a v-bit on some scrap plywood. I copied the gcode file to an sd card and kicked it off via the Web UI. I still have some tweaking to do, and I’m learning the differences between this UI and Repetier, but it does seem at this point be a viable option.

[attachment file=100159]

Big thanks to Ryan and to Bart for your great contributions to our creative endeavors!

2 Likes

Hello Bart, maybe some day you can try to conect esp32/grbl on bcnc , it creates several adresses on the connect box, with the CP210x USB, but no one work out,

after two days, i got an older ugs version conected to the board, but it was on my other lap top, on my cnc im using raspberry pi3, and i tryed to install the new ugs version, but it is on conflit now, and many discussions on git hub, im waiting for a estable version, too much information for a small user…im good with tools, and 1/2 inch screws…

God Bless you

 

Marcelo

I’ll give BCNC a try. Some Grbl senders rely on the reboot that occurs when you connect to an Arduino to get a startup message. The ESP32 does not do that and it is not something we want.

I do not know whether I missed that point or not hence asking: can Estlcam directly drive this ESP32-board?

bCNC

I installed bCNC and can confirm some issues with it. It does not give any feedback when it encounters a problem, so it was quite hard to debug.

First Issue

It has this in the main readme…

“GRBL should be configured to use MPos rather than Wpos. This means that $10= should be set to odd number. As of GRBL 1.1 we reccomend setting $10=3. If you have troubles communicating with your machine, you can try to set failsafe value $10=1.”

The default for Grbl_ESP32 is $10=2. If I set it to 3, I was able to connect.

I am not sure why it has a problem with other modes. You would think it would report an error if it did not like the current reporting mode.

Second Issue

After sending some commands it requests the gcode settings with $G. I noticed that that was getting caught in the buffer.

It looks like Grbl_ESP32 might have a non standard response where it was sending…

[GC:G0 G54 G17 G21 G90 G94 M5 M9 T0 F:0 S0.000]

It should have been…

[GC:G0 G54 G17 G21 G90 G94 M5 M9 T0 F0 S0.000]

There was a colon after the F.

Again, locking up on a simple parsing error, without reporting it is frustrating.

Next Steps

  • Grbl_ESP32:
    • I will update the code and do a pull request to get rid of the ":" in the $G report.
    • I'll ask on the Grbl_ESP32 GitHub issues if anyone thinks changing the reporting default to 1 or 3
  • bCNC:
    • Consider using regular expressions for parsing and trapping errors :-)
    • ....Also, there may be other issues...please let me know