Good source of random numbers?

AWOL:

The legality of that method seems rather questionable to me..

Can't think of a good reason why it should be, unless dismantling a smoke detector is in some way illegal.

Am-241 is exempt from most laws regarding the safety and handling of radioactive materiel. It depends on your locality, of course, and some locales have laws that say this with the caveat that you can possess it as long as it remains in the smoke detector sold to you untampered.

But in a great number of localities you can even dispose of these smoke detectors in regular household trash. You can eat the pellet w/o really causing yourself significant damage (though, of course, no one is suggesting it is a /good/ idea to do so -- prudence and intelligent behaviour is still the rule.)

The fact is that some types of collectable Fiestaware are more radioactive than the small amount of Am-241 in modern detectors.

But, it is all a matter of degree. If you are going to be a Radioactive Boy Scout, it doesn't matter how legal playing with Am-241 is. A superfund site is a still a superfund site!

wanderson:
It only produces about 8 bytes per seconds, but if you need more it can be used to seed a pseudo-random generator, either the one built into the arduino library

Bah! That one barely qualifies as "random number generator". :wink:

or perhaps one of the better ones such as blub-blub...

JKISS32 (the "J" and "32" are important!) from this paper...

http://www.cs.ucl.ac.uk/staff/d.jones/GoodPracticeRNG.pdf

...is an excellent choice. It is faster, smaller, and much better quality than the AVR Libc generator. The only downside is the extra SRAM needed (20 bytes versus 4).

One of the best generally accepted sources of entropy is the noise generated at the breakdown of a reverse biased zener diode. http://electronicdesign.com/article/test-and-measurement/wide-band-analog-white-noise-generator6356

You can also make reasonable white noise to use as an entropy source by massively amplifying the thermal noise in a resistor using an op-amp.

I suppose, while we're on the topic of noise, one could use the noise produced by a broken component that still erratically conducts? Such as a capacitor that's undergone dielectric breakdown, or a diode that's avalanched one too many times?

A good random firing cell I made in the 60s, consisted of a small tube with some cotton wool soaked in Silver Nitrate solution.

Two electrodes are placed into this.
A voltage across the electrodes causes dendrites of silver to form on the cotton wool. When they join up it causes a short that melts the dendrites and causes a small pulse to be produced. The current is very low, and the time between pulses is random.

xolroc:
I suppose, while we're on the topic of noise, one could use the noise produced by a broken component that still erratically conducts? Such as a capacitor that's undergone dielectric breakdown, or a diode that's avalanched one too many times?

You have to run the test. Things that seem random to us often are not. RANDU and TrueRandom are great examples.

Grumpy_Mike:
A good random firing cell I made in the 60s, consisted of a small tube with some cotton wool soaked in Silver Nitrate solution.

Cool experiment. Unfortunately, it may be a bit expensive these days... SINI-1542-42 25g £29.12

Silver Nitrate Solution, 0.1 M, 100 mL | Flinn Scientific there, one hundred milliliters of 0.1M silver nitrate, for 13.55. I'm sure there are some cheaper ways to do this though.

robtillaart:

I'm afraid I don't have an ethernet shield, so that's not an option!

If finding enough entropy is the only problem, I'm willing to offer my son's bedroom as a useful source.

my son's bedroom

Now there's a source we haven't considered before. Probably the only one left I think.

Note that the Due should finally lay this to rest as the SAM3X has TRNG hardware.


Rob

wildbill:
Any one who considers arithmetical methods of producing random digits is, of course, in a state of sin - John von Neumann

If you really want better randomness, you pretty much have to get it from some external physical source.

It really depends upon what you are using the 'randomness' for. For instance simulation techniques do not usually need true randomness--only something that is close. Something mathematical techniques are usually well suited for. And there are a few mathematical generators that outperform all but the best of the physical sources.
Most true sources of entropy; radioactive DECAY; avalanche noise; Johnson noise; clock jiggered; all require deterministic whitening techniques in order to produce unbiased random numbers. And they are very temperamental. Small changes to their operating environment can severely compromise their performance.

ID Quantique makes the Quantis RNG:

which looks pretty good. The USB-4M module costs 990 €.

I'm nowhere NEAR that desperate. I don't need it to stand up to an army of statisticians, I just need something more random than what the Arduino can do on its own! I think the entropy library will work fine.

Exploiting quantum mechanics like that is a clever idea, though.

Exploiting quantum mechanics like that is a clever idea, though.

But think of all the poor cats.

Couldn't you use a tunnel diode to achieve about the same thing? Of course, they're more expensive than Zeners....

Tunnel diodes aren't suitable as noise generators.

I just skimmed through the thread, so I don't know if someone mentioned this already. How about trying http://code.google.com/p/tinkerit/wiki/TrueRandom. They claim that it is very random. It uses analog input A0, and some other stuff.

dkl65:
I just skimmed through the thread, so I don't know if someone mentioned this already. How about trying Google Code Archive - Long-term storage for Google Code Project Hosting.. They claim that it is very random. It uses analog input A0, and some other stuff.

They claim it is random; however, it fails even the simple tests

Entropy = 6.440816 bits per byte.
 
Optimum compression would reduce the size
of this 1,002,424 byte file by 19.49%
 
Chi square distribution for 1,002,424 samples is 4802982.71, and randomly
would exceed this value 0.00% percent of the time.
 
Arithetic mean value of data bytes is 100.3535 (127.5 = random)
Serial correlation coefficient is 0.042774 (totally uncorrelated = 0.0).