ESP32-Based Grbl CNC Control Board

New Home Forum Mostly Printed CNC – MPCNC Hardware Development – MPCNC ESP32-Based Grbl CNC Control Board

This topic contains 43 replies, has 10 voices, and was last updated by  Christopher Burns 3 months, 3 weeks ago.

Viewing 30 posts - 1 through 30 (of 44 total)
  • Author
    Posts
  • #75026

    WarHawk8080
    Participant

    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 user thanked author for this post.
    #75047

    Jeffeb3
    Participant

    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 user thanked author for this post.
    #75265

    WarHawk8080
    Participant

    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…

    #75273

    Jeffeb3
    Participant

    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)

    #77940

    WarHawk8080
    Participant

    Any luck on this yet?

    #77958

    Jeffeb3
    Participant

    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.

    #91584

    WarHawk8080
    Participant

    Way cool!

    MPCNC ESP32 Controller Ideas

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

    PyCNC  check it out!

    #94088

    Bart Dring
    Participant

    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.

    Attachments:
    6 users thanked author for this post.
    #94090

    Jeffeb3
    Participant

    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 users thanked author for this post.
    #94094

    MegaDad3D
    Participant

    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 user thanked author for this post.
    #94097

    Bart Dring
    Participant

    @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 users thanked author for this post.
    #94638

    Mike Pensinger
    Participant

    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?

    #94649

    Guffy
    Participant

    ESP32 and ESP8266. Are they the same?

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

    1 user thanked author for this post.
    #94681

    Bart Dring
    Participant

    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 user thanked author for this post.
    #94858

    Mike Pensinger
    Participant

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

    #94920

    Bart Dring
    Participant

    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.

     

    #95193

    MegaDad3D
    Participant

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

    #95211

    Mike Pensinger
    Participant

    Same for me…

    #95584

    Bart Dring
    Participant

    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.

     

     

     

     

    Attachments:
    2 users thanked author for this post.
    #95588

    Ryan
    Keymaster

    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).

    #95601

    MegaDad3D
    Participant

    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).

    #97088

    Bart Dring
    Participant

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

     

     

    1 user thanked author for this post.
    #97181

    MegaDad3D
    Participant

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

    #97192

    Bart Dring
    Participant

    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 user thanked author for this post.
    #97400

    MegaDad3D
    Participant

    On order, thanks, Bart.

    #97843

    MegaDad3D
    Participant

    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 users thanked author for this post.
    #97847

    Jeffeb3
    Participant

    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.

    #97849

    Bart Dring
    Participant

    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 user thanked author for this post.
    #97857

    MegaDad3D
    Participant

    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.

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

    #99787

    Marcelo
    Participant

    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.

     

     

Viewing 30 posts - 1 through 30 (of 44 total)

You must be logged in to reply to this topic.