EveryCircuit
Contact
Reviews
Home
emogenet
modified 2 years ago

Infinite Noise Random Number Generator V2 - copy

8
3
279
02:58:16
EDIT: new and improved version with 2 major changes: - the circuit now has *two* pipelined modular multipliers and produces two independent random bitstreams. The circuit is therefore two times faster. - the circuit now includes a "kick in the nuts" bootstrap circuit (the two NPN BJTs at the bottom) to prevent it from getting stuck at zero volts overall (without this, zero is a fixed point of the loop). Not particularly useful in a simulator, but indispensable IRL: with the bootstrap, the circuit is sure-start and can easily be pushed in the MHz range, even with cheapo jellybean components. Original description: This is a neat little hardware random number generator that does *not* use the traditional reverse biased PN junction trick but uses switched capacitors instead. At every clock tick, the voltage on both switched caps changes to a new random value between 0 and 5V, and the voltage outputs of the lower opamps (comparators) are two new random bits. Theory of operation: the circuit is driven by two complementary clocks that control two switches (here we use relays, this app doesn't provide analog mux ics). The two switches in turn control the charging of the two switched capacitors. When a cap is connected by its switch (sample mode), it "reads" and "stores" its input voltage. When disconnected (hold mode), it "writes" that voltage to the opamps downstream of it. The open loop opamps at the bottom are used as comparators: they output 5v if input signal is larger than 2.5v, else 0v. They serves the dual purpose of bitifying the RNG output as well as providing a useful signal to the modular multiplier opamps on top. The opamps at the top are the heart of the circuit: they compute an analog modular multiplication of their input signal, using the output of the comparator below to do the modulo when needed (i.e. when output of the multiplication would go above 5v, 5v is subtracted). The result of the modular multiplication is then fed back in the other section of the circuit for further processing. The net result is that the circuit more or less computes an infinite binary decomposition of an analog voltage value, delving deep into the noise floor. The sure-start portion at the bottom "triggers" when the signal coming out of the first modmult goes below a diode drop and forces the output of the second modmult to increase. This way, the circuit never goes too close to zero. A very nice example of an analog/digital hybrid circuit. Slow down time to understand how it works (see data travel through the loop) Note that the bitstream generated does not have a uniform distribution (some bit patterns are more likely than others, especially if the opamp isn't rail to rail) and therefore can't be used directly for crypto or Monte-Carlo integration,. However, the stream is good enough to feed to a software whitener and get a very strong RNG.
published 2 years ago
CreeperX3
2 years ago
This Is Awsome!Keep doing what you do!
yoianrhodes
2 years ago
Change the relays to transitors
emogenet
2 years ago
@yoianrhodes: the real circuit is using a 4066 analog switch (which is in practice a bunch of FETs).

EveryCircuit is an easy to use, highly interactive circuit simulator and schematic capture tool. Real-time circuit simulation, interactivity, and dynamic visualization make it a must have application for professionals and academia. EveryCircuit user community has collaboratively created the largest searchable library of circuit designs. EveryCircuit app runs online in Chrome browser and on mobile phones and tablets, enabling you to capture design ideas and learn electronics on the go.

Copyright © 2018 by MuseMaze, Inc.     Terms of use     Privacy policy