Print Server WiFi on ESP32-C3 by piotr_go


Hello.
Due to the fact that I have a Ender 3 Pro printer, which is no longer the latest one, and I got bored of constantly chasing the card back and forth I decided to do something about it. Searching the internet didn't help much, I didn't find what I wanted. Plugging in a Raspberry Pi didn't interest me, projects with ESP32 were either too slow or required plugging in instead of a printer card. I didn't like these ideas very much so I decided to make something of my own. Connected exclusively via UART. It was going to be reasonably fast uploading over WiFi, with no water features. Printing could not be slower than from a card connected directly to the printer.
A few days later I already had the first prototype code.
At first I experimented on the ESP32-S3, then I moved to the cheaper ESP32-C3.
Requirements: .
In marlin you need to set the receive buffer to a minimum of 1kB ("Configuration_adv.h").
Code: C / C++
Limits: .
Soft does not support errors.
Scheme: .

The printer is connected to RXD0/TXD0 (note, 3.3V logic).
Baud rate 115200.
PCB: .



Print server installed in the Ender 3 Pro printer:


The circuit can be assembled on cheap modules from Ali.......:

Put the file "wifi.txt" with the network name and password (2 lines) on the card.
When the printer is switched on, the display will show the IP address that the printer has received.
Fire up the browser, type in the address and you can upload files:

The upload speed is approximately 300...600kB/s.
When printing, both the web interface and the LCD display show progress:


When the printout is complete, we can see the printing time on the display:

Printing time for an example 32MB file:
- from printer card 6h25m +-1m
- from ESP32-C3 card 6h25m +-1m

Interest:

"diff" from the image shows the difference between not working and working code.
The text editor I'm using doesn't display anything but brackets and plus/minus there.
There is no invisible character.
Only a peek in the hex-editor reveals the extra bytes after the brackets.

I came across such wonders while writing the software.
Soft attached.
Commercial use prohibited.
Comments
Wouldn't it be better to make a clipper on some cheap microcomputer ? [Read more]
There is shit..... wifi in all the raspberry pi's I have. The ESP32-C3 is tiny, costs $2 and works as expected. I am not going to invest more money in this printer. This is probably its last modifica... [Read more]
I have such an ender paired with an orange pi zero 2 and an octoprint server on it. All in all, it's an interesting alternative to a small SBC because it's quicker to get up than such a server with full-fledged... [Read more]
It seems silly to ask but what is the difference between my colleague's software and the ESP3D version of the software which does the same thing plus you can control the printer via the website :) ? [Read more]
As far as I know there are 2 options to choose from in ESP3D: - a very woooooooool upload (single kB/s) to the printer card via UART - card shared between printer and esp32 (more connections, more complicated... [Read more]
Have you not thought about using a WiFi-SD adapter, such as the ezShare available on AliExpress? [Read more]
. It works mega slow :D many have already tried BTT wifi MKS wifi but it limps along. And secondly this project is not just for uploading a file but also works as a host. [Read more]
. I think I even have one somewhere. I had completely forgotten about it. I was not happy with the operation with the camera. Does it work in SPI mode? Unfortunately I don't have an adapter for the micro... [Read more]
. I have no idea. I'm asking because I'd like to find out myself if it's worth buying a :) . [Read more]
Can something be uploaded during printing or do you have to wait until the end of printing? [Read more]
. I have blocked the upload, only the print progress is displayed. When writing, the card may block for a moment which would be visible on the printout. [Read more]
A couple of questions: 1. given a printer-independent power supply, would server_print be available to write all the time? 2. if so, when the printer is started, can the saved files be run or does the... [Read more]
1. yes, but... 2. can, but... 3. no, no 'but...': You should not do this. A printer processor without power will get a high state on the data lines. There is a chance that after a long period of... [Read more]
Nice design, but I prefer octoprint and full integration with apps in HomeAssistant and on android ;) . [Read more]
I did something similar. I took advantage of the fact that in my printer the SD slot is on a separate board. I cut the printer completely off from the card for the duration of the transmission (set the... [Read more]
A lot. Megabytes or megabits? WiFi<--->SD? SPI/SDIO? Write/read? [Read more]
Bytes. I was generally interested in writing WiFi => SD. I never polished the design because there were other problems with the printer. Here is some so-so video of me clumsily trying to show the... [Read more]
Octoprint requires quite powerful hardware compared to what it offers and in my opinion is a step backwards and forwards at the same time...... Either use the Repetier-Server instead of the old-fashioned... [Read more]
How about adding g-codes to the program to: - print stop and pause - temperature reading and printing time? [Read more]