Temporary storage of 100kB/s stream


in a project my Electron has to receive about 128kB of data every second over SPI. This stream lasts for a maximum of 3 seconds, then all data received has to be uploaded to a website from the Electron. I tried using a NAND flash with SPIFFS for temporary storage, but the flash is just too slow to write the data. SD cards won’t work either as they have similar maximum data rates as the flash.

I could use a Raspberry Pi Zero W but it looks overkill and I really want to avoid running a full-on operating system on the device for security reasons.

SRAMs could work but they are too small. Also I need serial storage; there’s not enough data lines available to interface in parallel.

Anyone has an idea which way to go from here?


Hi @szekelyisz,

Hmm, I seem to recall that @kennethlimcp made a FRAM shield a while back. Maybe an FRAM chip would be fast enough?

I hope that helps!


@szekelyisz, the SDFat library on the IDE supports high data rates with DMA. You can get >1MBs data rates.

1 Like

Thanks @Dave, FRAMs are definitely fast enough, but they don’t seem to come in the capacity I need. The biggest one I saw was 4Mbit which will not allow me to store more than one of such streams, which is a requirement in this project. Currently I’m using a 128Mbit flash which is conveniently big. I’d like to have at least that amount of capacity.

Hmm that seems interesting. Is it using the SPI or the SD interface? I read somewhere that you can’t get much more than 100 kB/s on the SPI interface, and using the SD interface is subject to license fees. I’d appreciate if you could provide any more info or reference. Thanks!

@szekelyisz, the SDFat library uses SPI since there is no SD interface on the Photon. Not sure where you read about 100KB/s limitation. Get yourself a breadboard microSD socket and try the library. With DMA, it flies! For your application, it would work quite nicely.

1 Like