3 ms·
I always wanted a Geiger counter for experiments like this.
by qq4 5y ago
I always wanted a Geiger counter for experiments like this.
- dragontamer 5y agoThere's much cheaper, and easier, sources of white-noise. Anyone actually interested in the electronics of this should build a white-noise generator out of an Op-Amp + your favorite PN junction in reverse-bias mode (diode, BJT transistor, or whatever). Shot-noise from reverse-bias'd PN junctions is white noise at a quantum level. You're physically seeing the random electrons move across a junction that wasn't supposed to happen, and then amplifying those electrons up to levels we can detect (well... not our fingers to detect. But a fancy op-amp amplifier + arduino can detect). https://www.maximintegrated.com/en/design/technical-documents/app-notes/3/3469.html https://www.maximintegrated.com/en/design/technical-document... EDIT: This circuit from Maxim is reverse-breakdown noise from a Zener diode, which is more vigorous than shot-noise, and therefore easier to amplify. Its still white-noise and therefore "Truly random" up to the MHz. The circuit uses a Maxim voltage amplifier (I mean, the article is a big advertisement for how simple the MAX2650 is to use...)
- jazzyjackson 5y agoThank you, I was trying to find a guide to this that I lost long ago... but there is another step I remember to convert the analog noise into a digital signal, in order to replace /dev/random for instance. maybe you know the word I need to search for, it was something like using every two or three bits and anding or xoring them or whatever to magically erase any bias present in the shot noise, yielding a perfectly uniform distribution of 1s and 0s. I'd like to turn this into a circuit-building curriculum if I can find all the pieces again.
- dragontamer 5y agoI don't know what your original tutorial said. There's many ways to do this problem. > maybe you know the word I need to search for, it was something like using every two or three bits and anding or xoring them or whatever to magically erase any bias present in the shot noise, yielding a perfectly uniform distribution of 1s and 0s. I forgot the name of this technique as well. Its rather simple: take the bitstream and look at it pairwise, you have 4 options: * 00 -- Throw away * 11 -- Throw away * 01 -- output 1 * 10 -- output 0 That's it. This always removes bias and returns a random 0 or 1 bit regardless of how biased the RNG is. 50% of outputs will be 0, and 50% of outputs will be 1. However, you're being "too smart for your own good" if you go down this route. A perfectly unbiased input would still have 50% of its inputs rejected, and already you've dropped the speed of the RNG by 50%. IMO: Signal processing is more obviously clean. Ultimately, you need to use analog techniques to finesse the white noise if you wanted to have assurances to the reliability of your RNG. You need to "clean up" the signal if you want the ADC / Input Pins to reliably read the data anyway, so making the analog circuitry a little bit more difficult (and maybe $1 more expensive) isn't a big deal. --------- I'd take the white-noise as a voltage-signal, and send it into a bandpass filter or a simple "notch" filter, lets say with 10MHz to 11MHz (named: filterA). filterA is then averaged across the last 100kHz (aka: 10 microseconds), which is just a simple low-pass filter (named: filterB). Finally: you compare filterA vs filterB (simple voltage comparator): filterA > filterB == 1, and filterA < filterB == 0. You'd safely be able to sample the data at 10MHz, or generate one bit every 100 nanoseconds. It'd be as simple as digitalRead(inPin) in Arduino (as long as the comparator outputs the voltage that's compatible with Arduino. You may need a level converter depending on how your comparator works). Bandpass filters are a complex subject of op-amps in of themselves, but are necessary parts of circuit design. The sooner you (and your students) are familiar with filter designs, the better. ------------ There might be some slight bias still (ex: if temperature is rising over time, or reducing over time), but I don't think there would be major amounts of bias. So bias-removal is still going to be useful. But don't use the technique described earlier: instead just AES-encrypt the input bits and then xor-it.
- lkozma 5y ago> However, you're being "too smart for your own good" if you go down this route. A perfectly unbiased input would still have 50% of its inputs rejected, and already you've dropped the speed of the RNG by 50%. To improve this situation you can use an additional trick: keep track of the sequence of thrown-away pairs, and look at them again in consecutive pairs, and generate some more random bits: * 00 00 -- throw away * 11 11 -- throw away * 00 11 -- output 1 * 11 00 -- output 0 and so on.. see the paper "Iterating Von Neumann's Procedure for Extracting Random Bits" for details.
- deleted 5y ago[deleted]
- denton-scratch 5y agoThat's a strikingly simple circuit! It gives you a continuously-varying output voltage. To get random numbers, you have to sample the output (presumably using a clock of some kind), and compare the sample with some reference (e.g. using a comparator). How often you can sample depends on the bandwidth of the analogue noise-source. You still need to debias, and probably whiten as well. That's digital circuitry, and it's hard to make analogue and digital circuitry play nicely together on the same circuit board; the digital part tends to influence the analogue part through the power lines.
- dragontamer 5y ago> That's digital circuitry, and it's hard to make analogue and digital circuitry play nicely together on the same circuit board; the digital part tends to influence the analogue part through the power lines. Yeah. We can fortunately handwave a lot of those issues away by: 1. Working with an Arduino, which only has a 20MHz clock (best case), maybe 4MHz typical scenario. 2. Filtering down the white-noise to the Arduino-level speeds. (Note: Arduino / ATMega328pb ADC clock is only a fraction of its primary clock). After all: sampling at 100MHz (generating a bit every 10 nanoseconds) would be very difficult! But sampling this at 1MHz is really easy, and probably could be done on a breadboard and hobby equipment. It'd still be noisy as all heck, but running things slowly and at 5V will solve a lot of issues that faster clocks make difficult. You don't care about 100MHz noise when your circuits are only 1MHz!! -------- Now if someone actually wanted that 100MHz (10 nanosecond) random bit generator... okay. That's tough. Now we gotta talk about ADC / High Speed Comparators, high-frequency / more expensive buffers / filters / opamps, miniscule errors, well done PCB-circuits, maybe even transmission line theory, large planes of copper to stabilize circuits... power-network filtering... etc. etc.