Random numbers are very important to us in this computer age, being used for all sorts of security and cryptographic tasks. [Theory to Thing] recently built a device to generate random numbers using nothing more complicated than simple camera noise.
The heart of the build is an ESP32 microcontroller, which [Theory to Thing] first paired with a temperature sensor as a source of randomness. However, it was quickly obvious that a thermocouple in a cup of tea wasn’t going to produce nice, jittery, noisy data that would make for good random numbers. Then, inspiration struck, when looking at vision from a camera with the lens cap on. Particularly at higher temperatures, speckles of noise were visible in the blackness—thermal noise, which was just what the doctor ordered.
Thus, the ESP32 was instead hooked up to an OV3660 camera, which was then covered up with a piece of black electrical tape. By looking at the least significant bits of the pixels in the image, it was possible to pick up noise when the camera should have been reporting all black pixels. [Theory to Thing] then had the ESP32 collate the noisy data and report it via a web app that offers up randomly-generated answers to yes-or-no questions.
[Theory to Thing] offers up a basic statistical exploration of bias in the system, and shows how it can be mitigated to some degree, but we’d love a deeper dive into the maths to truly quantify how good this system is when it comes to randomness. We’ve featured deep dives on the topic before. Video after the break.