Using Nuclear Decay As Random Number Generator Source For An MCU

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.

Can Plants Bend Light To Their Self-Preserving Will?

It does sound a bit silly — the idea that given enough time, a plant could influence the order of hardware-generated random numbers in order to get enough light to survive. But not so silly that [DeckerM] couldn’t wait to try it out after seeing a short clip about an unpublished study done at Princeton’s Engineering Anomalies Research (PEAR) lab that came to this very conclusion. The actual verbatim conclusion from the clip: “It’s as though life itself – even life or consciousness in something as simple as a house plant, bends probability in the physical world in the direction of what it needs, in the direction of its growth and evolution.”

The idea is this: a plant is made to suffer by languishing in the corner of a windowless room. The room has exactly one light in the middle of the ceiling — a repositionable spotlight of sorts that can only shine into any of the four corners and is controlled by a random number generator. A set of dividers ensure that none of the light leaks out of the quadrant and into any of the others.

[DeckerM]’s recreation of this experiment is much more practical. It’s essentially a little plywood cabinet with four open partitions and a ceiling. Each quadrant has a grow light strip planted in the corner, and all the wires are run through the top, where each has been stripped of its pesky power-governing controller and rewired to go straight into a smart plug. [DeckerM] is using a hardware RNG hosted on a Raspberry Pi, which is running a Python script that takes numbers from the RNG that corresponds to one of the quadrants, and then lights that quadrant.

And the results? They don’t really support the PEAR study’s bold conclusion unless viewed in small sample sizes, but [DeckerM] isn’t giving up that easily. Since the paper is unpublished, there are a lot of unanswered questions and juicy variables to play with, like the type, number, and age of the plants used. We’re excited to see if [DeckerM] can shed some light on plant psychokinesis.

Interested in portable plant propagation? A sunny location is usually ideal, but this all-in-one solution can take care of the rest.

What Is Entropy And How Do I Get More Of It?

Let’s start off with one of my favorite quotes from John von Neumann: “Any one who considers arithmetical methods of producing random digits is, of course, in a state of sin. For, as has been pointed out several times, there is no such thing as a random number — there are only methods to produce random numbers, and a strict arithmetic procedure of course is not such a method.”

What von Neumann is getting at is that the “pseudo” in pseudorandom number generator (PRNG) is really a synonym for “not at all”. Granted, if you come in the middle of a good PRNG sequence, guessing the next number is nearly impossible. But if you know, or can guess, the seed that started the PRNG off, you know all past and future values nearly instantly; it’s a purely deterministic mathematical function. This shouldn’t be taken as a rant against PRNGs, but merely as a reminder that when you use one, the un-guessability of the numbers that it spits out is only as un-guessable as the seed. And while “un-guessability” isn’t a well-defined mathematical concept, or even a real word, entropy is.

That’s why entropy matters to you. Almost anything that your computer wants to keep secret will require the generation of a secret random number at some point, and any series of “random” numbers that a computer generates will have only as much entropy, and thus un-guessability, as the seed used. So how does a computer, a deterministic machine, harvest entropy for that seed in the first place? And how can you make sure you’ve got enough? And did you know that your Raspberry Pi can be turned into a heavy-duty source of entropy? Read on!

Continue reading “What Is Entropy And How Do I Get More Of It?”