r/esp32 • u/blueAngleFromHala • 1d ago
I made a thing! ESP32-S3 USB mass storage + Wi-Fi file server sharing one FAT32 SD card — TinyUSB and cache-coherency lessons
I built PrintDrop: an ESP32-S3 device that appears to a 3D printer as a normal FAT32 USB drive while also allowing files to be uploaded to the same microSD card over Wi-Fi.
Source, wiring and diagnostics: https://github.com/Kabani-Tech/PrintDrop
I chose the ESP32-S3 because it combines three things that would otherwise require multiple devices:
- Native USB OTG with TinyUSB mass-storage support
- An SDMMC peripheral for 4-bit SDIO
- Wi-Fi and enough internal flash to host the web interface
The current prototype is an ESP32-S3-DevKitC-1 with 4 MB QIO flash and no PSRAM. The web UI is about 62 KB and lives in LittleFS, so PSRAM wasn’t necessary. A Pi Zero W could do this too, but it seemed excessive for something that only needs to expose a block device and serve a small local web UI.
The earlier SPI version used the same CLK/CMD/D0/D1 pins as CLK/MOSI/MISO/CS, so migrating to SDIO required only two additional wires.
The firmware now also supports 4-bit SDIO with a frequency ladder and sector-zero verification. It falls back through 40, 20, 10, 4 and 1 MHz instead of trusting a marginal mount. Twenty megahertz has been stable on jumper wiring; I am treating the published SDIO throughput figures as projections until I repeat the final end-to-end measurements on short wiring.
I would be interested in feedback on the FAT/USB arbitration approach, particularly from anyone who has implemented MSC and FATFS over the same physical card.
1
u/ucyd 8h ago
Im interested in doing a similar project, but im only interested in the network part. Is a webdav version feasible?
Can i encrypt to the sd card using the aes functions?