How can I actively provoke data rot on a storage unit?

If you're happy to use a data storage unit this small, then a UV-EPROM would be very easy to rot. They are still available, online auction sites have them, for not too much money. Even a 27C400, 4 Mbit, is only a few pounds.

Of course they don't store 'files', just raw data, so you'd need some form of external memory controller. Perhaps use an Arduino to address it, and represent its data as a file. FWIW, some CircuitPython modules can be read as USB memory, so could read the data from the EPROM and write a file to their local storage area that represents it.

When I first came across UV-EPROMS early in my career, more decades ago than I care to remember, I was concerned about the recommended write and erase times, so programmed one, then verified it repeatedly, with one minute in the eraser between verifies. It took a few minutes for the first bit to drop out, then most went between 5 and 10 minutes, needing more than 15 minutes to erase the last bit. Quite a range.


Neil_UK's answer made me remember a similar method with more commonly available components. If you're building a system which directly interfaces with a storage device, you might as well just use SRAM, where you fill it with data and then gradually reduce its supply voltage below its recommended minimum. The advantage over EPROM (besides availability of the components) is that it's a lot faster, so you can do a lot more experiments quite quickly to figure out the voltage which produces the most useful cases for you.

I once used this with a microcontroller equipped with internal RAM, which had to detect a power loss and then save some data to non-volatile storage before the capacitors on the board went low enough to cause corruption in the RAM. I wasn't explicitly studying the "memory rot" itself (I was only interested in whether it happened or not), but I did notice that if I took too much time, the corruption seemed to be quite random.


Read the file, flip or set bits randomly according to the profile of error distribution and probability you want, and write the corrupted file back.