Re: Arduino HWRNG



Rob Warnock wrote:
Paul Rubin <http://phr.cx@xxxxxxxxxxxxxx> wrote:
+---------------
| toby <toby@xxxxxxxxxxxxxxxxxxx> writes:
| > http://robseward.com/misc/RNG2/
| | That looks terrible. The circuit was actually drifting enough to
| affect the ratio of number of 1's to number of 0's.
+---------------

The third stage, transistor "T3", of the "new" version is even worse.
The transistor's base bias has no D.C. feedback at all, and is thus
totally subject to wandering around widely due to temperature and/or
manufacturing variations.
Do the math on the temperature variations and you will see that objection is crap for any system that has a human near it.

As far as manufacturing variations the circuit will work with a fairly wide range of transistors. It is not an optimal solution, but the output is de-biassed, the only output defect this produces is a slower data rate.


Plus, there's no reason at all for the "R2"
pulldown, except as a kludge to get around the lack of proper bias.
And there you have your reason. Inelegant, inefficient, but it works.



Even something as simple as the following would be better [in a very
simplified quasi-EDIF, since ASCII graphics are too hard]:

Go here.
http://www.tech-chat.de/download.html


(edif RNG_Output_Stage
(contents
(part T3 (kind "2N3904") (pins 1 3 2)) ; emitter, collector, base.
(part C1 (kind "0.1UF") (pins 1 2))
(part C3 (kind "0.1UF") (pins 1 2))
(part R3 (kind "10K") (pins 1 2))
(part R4a (kind "500K") (pins 1 2))
(part R4b (kind "500K") (pins 1 2))
(part IN (kind "Input from T1/T2") (pins 1))
(part OUT (kind "Output") (pins 1))
(part PWR (kind "Power") (pins 1))
(part GND (kind "Ground") (pins 1))
(net GROUND
(pinRef 1 (partRef GND))
(pinRef 2 (partRef C3))
(pinRef 1 (partRef T3)))
(net POWER
(pinRef 1 (partRef PWR))
(pinRef 2 (partRef R3)))
(net INPUT
(pinRef 1 (partRef IN))
(pinRef 1 (partRef C1)))
(net BASE
(pinRef 2 (partRef C1))
(pinRef 2 (partRef T3))
(pinRef 1 (partRef R4a)))
(net FEEDBACK_DECOUPLE ; 1 MOhm between base & collector...
(pinRef 2 (partRef R4a))
(pinRef 1 (partRef R4b))
(pinRef 1 (partRef C3))) ; ...bypassed to Ground in the middle.
(net COLLECTOR
(pinRef 2 (partRef OUT))
(pinRef 3 (partRef T3))
(pinRef 1 (partRef R3))
(pinRef 2 (partRef R4b)))))

Assuming T3 has a gain of ~100, the above will result in a fairly
stable D.C. bias with the output at about half the power supply voltage.

The low-frequency 3 dB cutoff is somewhere around 20 Hertz [if I
did the math right]. If you increase C1 & C2, it will lower that.


-Rob

-----
Rob Warnock <rpw3@xxxxxxxx>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607

.