The Just Bananas Method for Generating True Random Numbers

Arduino-based Banana Random Number Generator (BRNG).

James Lewis
2 months agoProductivity

For computers to generate random numbers, they need a truly random source. So, most modern computers have a true random number generator (TRNG) module. However, even with those available, it did not prevent an Italian electronic engineering student from building a very unique RNG. Valerio Nappi built a banana (powered) random number generator (BRNG)!

This project relies on radioactive decay, like from a banana!

Random number generators need a source of nondeterministic entropy to function. The modern TRNG modules mentioned before typically take advantage of a diode's avalanche effect. When reverse biased, the amount of conducted current is random (as far as we can tell.)

But using a diode is such a tiresome method. You have to talk about different diode types, what reverse biasing means, and all kinds of other nerdy nonsense.

Instead, Nappi's project relies on the much more exotic-sounding method of radioactive decay. The BRNG takes advantage of the potassium found in bananas, which is slightly radioactive.

The core of the circuit board is an STS-5 Geiger-Müller tube. These tubes need a high voltage source. So, a 555-based step-up converter generates the required 400V. For control, Nappi implemented the Microchip ATmega328P 8-bit microcontroller. This processor is the same as the chip found on Arduino Uno and Nano boards.

BRNG has two firmware versions available. One version is slightly more reliable but requires a bodge to the existing hardware design. While the other has some incompatibility when used with the Arduino library. Namely, the millis() function.

Now, for the disclaimer bit. As fun as using a banana as the radioactive source sounds... Nappi admits it is not actually necessary! The tube's circuit is sensitive enough that background radiation works well as an entropy source.

We think a banana on top of the laser-cut acrylic enclosure is still necessary, for science!

Check out this excellent two-part explanation to learn more about the circuit's design and how random number generators work with encryption. This GitHub repository contains the Arduino code, schematic, PCB, and enclosure design if you would like to build one.

James Lewis
Fan of making things that blink, fly, or beep. Host on element14 Presents, baldengineer.com, AddOhms, and KN6FGY.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles