I want to make ESP32 development happen. I think everyone agrees this is where the future is. I have done much research on the ESP32 and wanted to both share what I have found and actually do some work to make it happen.
I think everyone in this thread has gotten a bit distracted by the future porting of GRBL and WebControl and OTA updates and etc. I think we need to focus on smaller, more manageable steps. Anything in software can be created/fixed after the hardware is made.
-
Develop new reference hardware
-
Get GRBL_ESP32 ported to Maslow kinematics and motor control. Make the ESP32 functional as a Mega replacement
-
Then start looking at WebControl/Makerverse/Whatever-software-exists-at-the-time work directly from the ESP32.
So, my starting goal is to replace the Mega + shield with a new ESP32 board. I dont want to focus on the GRBL stuff just yet; you dont need to remind me that getting GRBL to work will be a pain. I have seen a lot of the threads.
I plan on designing the hardware board soon. I will hand solder the first batch and will accept orders for it so that other developers can get one. I expect we could have the first batch of boards by the end of October if I continue to have free time to work on this.
This leads to the question of what to put on the board and how to interface with it. I need everyone’s help to get some feedback on what I believe the board will look like. Here is the plan at the moment:
We need 3 DC motor controllers and a Stepper controller. I want to include a stepper motor for the Z axis as an option for people. It will be a Pololu-compatible stepper slot, so it wont really add any cost to the boards. Honestly, I think steppers should be on all axes, but I don’t really want to open that can of worm.
There is a peripheral on the ESP32 called the MCPWM (Motor Control PWM). It is intended to give smooth, lower frequency PWM outputs (compared to the other PWM peripherals on the ESP32) specifically for motor control. It is overkill, since it has a few advanced features for directly controlling the H-bridge that we will not be using. But overkill is better than the opposite.
I plan to connect that peripheral to some DC motor drivers - I prefer the DRV8870. They have nice features, adequate current capability, current limiting and go up to 40V. I plan to make make the board capable of running on either 12V or 24V. The current limiting feature of the DRV8870 should help prevent damage. This should allow faster Maslow movements when combined with proper acceleration control.
One of the peripherals on the ESP32 is the Pulse Counter which can be made to directly read a quadrature encoder signal and count up/down a 16 bit register. With an interrupt to catch the overflow, you have a virtually-zero-CPU-usage memory-mapped encoder reading. This will be ideal for the feedback loop.
Sure, I will include some AUX pins. Current Maslow designs do not use more than 3 as far as I know. We will target the standard 8, but they will be the first to go if we run out of pins.
There has been a lot of debate over storage options, like PSRAM vs SPI Flash vs SD Card etc. Unless someone can come up with a really compelling reason, I am going to use an SD Card. They are cheap, commonly available, familiar to users, have huge storage capacity, portable (allowing for sneakernet setups), and it means we can use the flash on the ESP32 solely for program storage.
Note that there is a semi-conflict on pin Slot 1 D2, where the pin needs to be pulled up for the SD card to function, but needs to be pulled down at boot. We might need to burn a GPIO just to pull this up after boot. Oh well.
- What are your thoughts? Have I forgotten anything? Who will be willing to brave the GRBL port side of things with me? Who wants a board? Any details you want to know more about?