Thursday, January 23, 2020

A short history of Marlin development for the ESP32

As far as I know, Marlin development for the ESP32 started in May 2017 with Simon Jouet. Here, I am talking about the development of an ESP32 HAL for Marlin; although Luc Lebosse seemed to have started work on supporting ESP32 on ESP3D webUI around the same time.
https://github.com/MarlinFirmware/Marlin/issues/6524
https://github.com/luc-github/ESP3D/issues/118

Simon Jouet worked on the ESP32 HAL in parallel with his ESPRamps. This then became the R1 prototype of his ESP32Controller. In mid 2018, the HAL was more or less developed to the stage when it can pull off a test print. Simon's brother, Hadrien Jouet, did up a simple web interface for use with Marlin. At the same time, Luc Lebosse had been working to merge Marlin with his ESP3D webUI, so that Marlin can run on an ESP32 that also works as a webserver that serves out the ESP3D webUI. Toward the later half of 2018, I started work on developing a 3D printer control board based on the ESP32, which eventually became the MRR ESPA. (For the history of the MRR ESPA, please see this post for links to the individual posts.)

In December 2018, an idea was floated to use the ESP32's I2S as a form of output expander to address the shortage of pins on the ESP32. This feature made its way into the ESP32 HAL in the first months of 2019, and also saw Simon Jouet's R2 prototype of his ESP32Controller. I2S can now be used to driver stepper motors by daisy-chaining 74HC595 (each of them provides up to 8 outputs; daisy-chaining 4 of them will give 32 additional outputs). To avoid confusion with the native ESP32 pins, output pins based on the I2S stream are numbered starting from 128.

The rest of 2019 saw quite some work on the ESP32 HAL by the open source community. This included further modifications to allow the I2S stream to provide PWM output so that it can be used to control heating elements and fans. This also led me to create the MRR ESPE board based on the MRR ESPA but with I2S added. Improvements were made to make the HAL more stable, and Luc Lebosse actively kept his fork of Marlin (which supported his ESP3D) up to date with the main Marlin repository.

In January 2020, Luc Lebosse's integration of ESP3D into Marlin was merged into Marlin 2.0. This means that users of stock Marlin can now use the ESP3D webUI on any ESP32-based boards. There is no longer a need to use a custom fork; ESP3D integration is provided via the ESP3DLib library.

This is a short history of the development of the ESP32 HAL on Marlin so far. I hope this helps to give some background, and I also hope others will continue to work on using ESP32 for 3D printing.

No comments: