Electronic – How to make a DIY Flash Drive

pcbusb device

There have been previous versions of this question that were closed since "there is no reason to create a one-off actual thumb drive", however, I have a very specific idea for a USB flash drive in mind.

I am getting married next year and I'm thinking of the save-the-dates in the form of a USB dongle. This would actually be a PCB with a USB plug that, when plugged in, flashes a few LEDs on the PCB and contains a multimedia file announcing the wedding date.

I figure I'll use a small microcontroller to control the LEDs. That part is easy and well within my skillset. I probably need a NAND chip and a controller for the flash drive part. Has anyone ever done this before? Any guidance would be appreciated, even just suggesting ICs to use, or a schematic to read over.

Best Answer

USB flash drive is a bridge between USB and NAND/eMMC. To make this to work you need to implement Mass Storage Class device, create all necessary endpoints and descriptors, and map them into emmc controller space, provide proper data buffering and format translation. Usually the bridge is done on MCU basis, and the program to do this mapping might contain thousands lines of C++ code. To implement the right descriptor structures you will need probably a year of study of MSC class formats and NAND handling/formatting. Creating a flash drive from scratch is a several man-years project for professionals with proper background. Just forget it.

But if you want just to have some flashing LEDs, there are ICs that do the MS-Class bridge and have the LED activity by default, something like USB2240. Or there is a more complex IC with extra I2C port in addition to SD/eMMC interface, USB2640, where you should be able to hook up an I2C expander and flash several LEDs as you wish.