Arduino as mass storage device?

hello i notice recently the adafruit Grandcentral M4 board has a Spi flash storage device for programming. It shows up as a Usb mass storage device.

I do not have a M4 board. I do have a uno board and a Arduino Zero board. I also have some Winbond W25Q64 64Mbit 8MByte Flash Storage chip. I was wondering if it is possible to do the Same Mass storage device? Not to be for programming but to store some text file and be able to read from that text file in serial monitor. Is there a way to do something like this? It is above my knowledge of my limited programming skills But I'm willing to try.


You can connect SD cards with an SD module but caveat, get one with proper voltage leveling and have board members here help ID good ones.

I have a few in a box with "series resistor leveling" that over time kills SD cards.

Hello i can use a Sd card module. The problem is i have no room or space for one. I only need to storage a text file of 2kb worth.


8K SPI RAM costs pretty cheap. It's sold as 32Kbits, few pins involved.

Hello GoForSmoke. Also that is what I'm thinking and i do have 2 spi winbond chips coming tomorrow. They are 64Kbits they only cost me $2 dollars us from china. The problem I'm having is how to make a mass storage device using that spi chip if i use it.

Edit: I do have one Arduino zero board that has Native USB on it so it can work maybe. Sense it does show up like the leonardo processor in a way.


Sorry, 64Kb is 8Kbytes. Dig into the device docks, you have modes where you give an address and there are modes that increment address and process. You need the SPI library.

Here's an example using a different chip that might be made to work for yours, see the library functions.
SPI SRAM example.

My Problem is not for the library because i have used this chip in the past and I already have the library for it. The problem I'm having or going to have soon is how to turn it in a mass storage device to be able to host a text file.


So, your goal is to implement your own file system? Seems like a daunting task for someone of admittedly "limited programming skill".

What is the purpose here. Sure does seem like a lot of effort to obtain 8KB of file storage. Why not use a micro SD card? There already exists code to implement a file system on that media. And, you get GBs of storage.

Exactly. I made an Arduino-based data logger for a motorcycle, and it used an SD card for data storage. Extremely handy, because you can just unplug the card and take it to your computer if you need to. I created a simple CSV file and added lines to it for each data scan, which meant I could then import it directly into Excel for analysis.

PS: I deliberately used a full sized SD card, and would recommend it if there is room, because the micro-SD cards are fiddly and easy to lose.

I’ve always thought of them as fiddly and hard to find.



Hello all, thanks for the reply back. Yes my programing skills are lacking not becuase of a lack of trying it is becuase I come from a hardware background my software. But I'm trying. I'm building a 2 small macro keyboard to help me and my brother in my every day task. He knows nothing about arduino. I know enough to get me by.

I have barely no room to put SD card on there. Yes you are right it makes more sense and makes it more easy to put a SD card slot on there for the ease of use. But the problem again is no room on there. I need for him to remap his own keys without having to open a program and programming. Which he knows nothing about. So I'm trying to figure out a way how to make a mass storage device from eeprom or Spi flash memory to hold a text file for the remapping keys.

That is my basic Goal. I'm open to a better idea always. I'm limit to size on this keyboard for a few reasons.


You can send files from a PC to an Arduino via serial and store that in whatever you want; if you don't need too much space, it can even be in EEPROM.

That is my problem. I been searching for how to make the eeprom into a mass storage device to hold a text file. I'm looking at this from my brother point of view. He doesn't program or know anything about arduino. So just opening a text file and type in the Keys he needs from a List i give him would help him out that way he just drags and drops a text file into the arduino would be great. That is what I'm trying to do.


You don't really need a mass storage device. A text editor and a terminal program are basically enough. And to make it more luxury, you make a small PC application that provides both functionalities.

But I understand where you're coming from.

For a mere 8kbyte of storage I would suggest a FRAM.

Like EPPROM but with a write endurance of 100,000,000,000,000 times, which is enough to treat it like RAM.

Avaialble in 8pin SOIC I2C and SPI.

Hello, My brother not a programmer at all. He would not knowing what to do with a terminal program a text editor can be really anything really like windows notepad. This is the problem I'm facing. I need to figure out how to make the arduino into the mass storage. The rest i can figure out once i got this problem figured out.


Why ?

I'm sorry i have a hardware question that i'm working on and this is part of it the software side. My fault for mixing them together.


As I said, make it a bit luxury and have a notepad style app that saves to an Arduino instead of to file.

Looking around, I think that your only chance is the Arduino Zero. Search results: arduino zero as mass storage device - Google Search

I do have 2 arduino zero boards. But now brings me to the same question. How can i make them into a mass storage devices?