One of the most interesting features of the esp32-s2 chip by Espressif is the presence of an USB OTG (USB On-The-Go) interface.
Thanks to this interface – and the use of the TinyUSB library – it’s possible to program the chip to act as a USB peripheral.
In a video on my Youtube channel I already explaned how to write an Arduino sketch to implement a USB mass storage device or a USB HID – Human Interface Device (keyboard, mouse…):
I decided to design a board, with the form factor of a USB stick, based on the ESP32-S2-WROVER module:
The board houses all the components needed to power the module (lowering the 5V available via USB to 3.3V) and to RESET and UPLOAD a new firmware.
In addition, I also added:
- an RGB LED, based on the WS2812 chip
- a socket for MicroSD cards
The Eagle files and the bill of material are available in a Github repository.
I also shared the project on PCBWay website, so that it’s possible – if you like – to order directly from it the PCB.
In the Github repository you can also find some sketches to explain how to control the LED and how to interface with the SD card to get its size:
Last but not least, the esp32s2Stick board has also 4 debug pins, connected to the chip serial interface:
can i please purchase a few of these boards ready made?
Hi Jasper, I published the project but I cannot provide at the moment ready-made boards, sorry
Hello Luca.
It is a great project. I want to buy your PCB for testing. I want to buy through PCBWAY, but have never done so. An option called “Assembly Service” appears on PCBway. Does this mean that I can buy the PCB with all components soldered through PCBWAY?
Thank you
Hi! You can order the PCB directly from the product page. If you like them to assembly the board for you, I think you have to prepare all the required files (BoM, placements…) and I don’t know if they can provide the esp32 module.
Hello
good post!
I’m going to take your design into account to make a few modifications to your hardware and apply it to the cybersecurity issue.
Initially I had worked with a design based on the 32u4 chip to be able to work on the “USB DWC-OTG” question, but this module offers me many more functions incorporated in a reduced space, especially for bluetooth and wi-fi.
I want to use the ESP as USB stick and access from the stored data for further processing (e.g. setting pins depending on the stored data). Dp you know if this is possible with the s2 or s3?
Sure! With s2 you can develop a device that is deteted as a standard “usb stick” but can also inspect the data you send (for example a txt file). TinyUSB has some examples on this