Although there are many ways to get a random number generator (RNG) set up on a microcontroller, it’s hard to argue with the sheer randomness of the various kinds of radiation zipping all around us from nuclear decay events. For [gbonacini] the purchase of a Geiger counter first in 2022 was the reason to tinker with using these as the source for an RNG, which simply runs a counter until a Geiger counter event occurs that ‘selects’ a number and the counter is reset to zero.
With the next version of this system the hardware and layout has changed somewhat, using a commercial handheld Geiger counter (GMC-320+) and its audio output as a generic input for any MCU. The (pulsed) audio signal is amplified with an opamp (left unspecified) that connects to a GPIO pin of the MCU (RP2040-based Pico W). Here the same algorithm is used to create a continuous queue of randomly picked numbers, which can also be queried via the WiFi interface with a custom protocol, essentially making it a network-connected RNG that could be used by other network-connected appliances.
C++ source is provided for the Pico W example, but it should be easy enough to adapt to other platforms. The GMC-320+ is also among the more affordable Geiger counters out there, even if it’s somewhat bulky to pair with just a single MCU, making a more basic Geiger counter module better for a permanent installation. Either way you should get pretty good RNG this way without splurging on exotic hardware.
Thanks to [navigator] for the tip.
Orderly enumeration of nonsingular binary matrices applied to text encryption.
https://dl.acm.org/doi/10.1145/359460.359464
The GFSR.
https://www.google.com/search?q=generalized+feedback+shift+register+pseudorandom+number+generator&sca_esv=586734894&rlz=1C1QCTP_enUS1084US1084&sxsrf=AM9HkKng-Gof4msvBqyHarwT30VdO7lJgw%3A1701389744809&ei=sCVpZYT-MN3z0PEP1tyLiAk&ved=0ahUKEwiElvTa-uyCAxXdOTQIHVbuApEQ4dUDCBA&oq=generalized+feedback+shift+register+pseudorandom+number+generator&gs_lp=Egxnd3Mtd2l6LXNlcnAiQWdlbmVyYWxpemVkIGZlZWRiYWNrIHNoaWZ0IHJlZ2lzdGVyIHBzZXVkb3JhbmRvbSBudW1iZXIgZ2VuZXJhdG9ySABQAFgAcAB4AZABAJgBAKABAKoBALgBDMgBAPgBAeIDBBgAIEHiAwUSATEgQA&sclient=gws-wiz-serp