Because Bart Dring’s tindie store is on vacation for a few weeks, I decided to throw something together to make my own out of perfboard.
Too late tonight to see whether this… work of… art lets the magic smoke out of the ESP32 or actually works:
Hidden underneath the ESP32 is a 4-channel level shifter I can use to drive anything that needs 5V instead of 3.3V, but the boards that Bart made drive the steppers with 3.3V and I hope that’s sufficient for the LV8727 boards I will be using. I used the same ports as his MPCNC v1.2 controller board so that I can use his configuration without having to think too much about it.
I haven’t hooked up any of the inputs yet, but I can test without them, I think, though I might have to rebuild firmware with some of them disabled or just give in and connect some more wires.
I kept wiring things up, and ended up a little confused about which schematic would be best to follow (I should have used the default
CPU_MAP_ESP32). I didn’t want auto-squaring… So I created a custom configuration
CPU_MAP_MKJ with what I actually wired, and now I have:
I set it up to be on my home wireless network instead of using AP mode. So now it just comes up on
http://grblesp.local/ on my home network.
I managed to get a faulty initial upload of index.html.gz which meant that I was left with a “Loading…” screen and it took me a while to determine that I could look at the JSON output by going to
http://grblesp.local/files where I saw that the file size was clearly truncated. So
http://grblesp.local/files?action=delete&filename=index.html.gz and reloading the interface brought me back to the initial upload screen, and this time the upload was successful, so now I have the webui showing.
Back to the mechanical build!
It moves. On to proper GRBL configuration!
But when Bart is back from vacation, I’m ordering Grbl_ESP32 CNC Development Board V3.5 because the rats nest of wires I created does not inspire confidence, even if I’m driving steppers successfully right now.
I really like that this just comes up on my home network and that I can use the web UI from my computer—or, once I have this all the way set up, from my phone.
Just remember how clean it looks now. Because once you start cutting, it’ll never be like this again
I didn’t have a spare SD holder to solder onto this card, and just now realized that it won’t print off files on the flash built into the system, so I’m left with sending over the network for the next few weeks until I get the real board to replace it.
It looks like a lot of the gcode senders assume they are writing to a serial port.
Since it listens on telnet, I ought to be able to use
nc to talk to it, but while
telnet can talk to it,
nc fails to make a connection. If I paste individual gcode commands into the webui console I can watch it do things.
Hmm. I have lots of extra microsd to sd adapters. I could, I suppose, solder necessary wires from one of those adapters to the board and use a microsd card in it. It would certainly be in keeping with the spirit of the bodge job to try it!
It worked. The frankengrblesp32 is air-cutting a set of imaginary OX plates on an OX from a file I uploaded in WebUI to a microsd card in an adapter card with wires soldered to the contacts and the other side onto my bodge-board. Imaginary OX-ception. I’ll let that go for a while and see how hot the steppers get now that they are actually getting used for more than a few seconds at a time.
Well done. Don’t worry if the steppers get really hot, as long as you can touch them without burning yourself, they are doing OK. Steppers run very hot as a rule.
Note that the colors are based on the order of ribbon cable lying flat, and make no sense as codes.
It “works,” but I’ve been getting some inconsistent errors which make me think that I’m probably getting some I/O errors talking to the card, probably from the leads being too long or from electrical noise on these unshielded lines. I uploaded a file, tried to run it, and got Error 11 (line too long). I downloaded the file back from the board, and the downloaded copy compared perfectly to the source file I had uploaded. Re-ran it, and ended up with Error 20 instead. That smells like read error when trying to actually do something.
I’m not 100% on risking my only 1/4" carbide single-flute downcut endmill to this bodged-up proof of concept.
From Barts board description:
The SD Card shares pins with Mist coolant, Spindle Direction and Spindle Enable.
Probably your gcode program used one of these functtions while streaming the file from the sd card?
I had correctly commented out using GPIO_NUM_16 for mist coolant and spindle direction but accidentally failed to comment it out for spindle enable. There was definitely
M3 in my program.
My real dev board from Bart has arrived. I’m retiring the abomination. I expect to use the ESP32 to run TB6600 stepper drivers that pull 1/3 the current from I/O ports that the LV8727s do; I think the LV8727s overloaded the ESP32.
I’m temporarily going to use the MKS DLC 2.0 to drive the LV8727s for one project that I need to finish before I get back to tinkering with the setup, just because I’ve run out of time to finish that project.
I was wrong about the current draw, and I had the same problem with Bart’s board, so most likely I had previously damaged the ESP32 I had plugged into it at some point without knowing it, or damaged it with this terrible bodge. My TB6600s on the other hand have optocouplers and definitely don’t run from the ESP32 (unless possibly in open drain mode; didn’t check that).