Introduction: Random Number Generator

About: We design cool circuits.

This article shows you an analogue random number generator.

This circuit begins to generate random output when a human touches the input terminal. The circuit output is amplified, integrated and further amplifies the noise from a human that acts like an antenna, gathering electromagnetic noise signals.

The circuit shows feedback bias transistors. You will have to select a feedback resistor so that the transistor collector emitter voltage of all four transistors is biased at half supply voltage.

if you are making this circuit then please read the whole article from beginning to end before initiating any preparations.

Supplies

Components: general purpose transistors - 10, 470 uF capacitors - 10, 1.5 kohm resistor - 20, mixed resistors (100 kohm - 1 Megohm) - 10, insulated wires, matrix board/piece of cardboard, 1.5 V - 4.5 V power supply or 1.5 V AA/AAA/C or D battery, 1.5 V battery harness/rubber band. All resistors must be low power.

Optional components: solder, 1 mm metal wire, 100 ohm resistors (1 Watt) - 5, encasement, bolts/nuts/washers, metal connectors (for connecting insulated wires to bolts and nuts).

Tools: pliers, wire stripper, USB oscilloscope, voltmeter.

Optional tools: soldering iron, multi-meter.

Step 1: Design the Circuit

The integrator in my circuit is basically a low pass filter circuit used to reduce the maximum output frequency to prevent the random number from fluctuating too quickly. Capacitor voltage and current have the following relationship:

Ic(t)= C*dVc(t)/dt

The Cc2 capacitor voltage equals to:

Vc(t)= (1/Cc)*Integral[Ic(t)]

If the current is constant then the Cc capacitor potential voltage will slowly grow. However, in my circuit a portion of the current is entering the Rc2a resistor. Using an integrator for this circuit can rectify and filter a sinusoidal input to Q3 transistor, thus converting the Q3 transistor input to a DC signal that will provide a random value to be amplified by Q3 and Q4 transistors. This is why in my circuit the Q2 transistor is not really an integrator but similar to an integrator shown here:

https://www.instructables.com/id/Transistor-Integrator/

You can replace the Rc2a and Cc with a short circuit, connect Q2 collector to Cb3 capacitor and try connecting a very small capacitor across the Rf2 resistor and see what happens.


Calculate the minimum high pass filter frequency for Q1, Q3 and Q4 transistor amplifiers:

fhpf = 1 / (2*pi*(Rb + Rc)*Cb)

= 1 / (2*pi*(1,500 ohms + 1,500 ohms)*(470*10^-6))

= 0.11287584616 Hz

fl = 1 / (2*pi*(1,500 ohms + 5,600 ohms)*(470*10^-6))

(Rb = 5,600 ohms in the actual circuit that I made)

= 0.0476940195 Hz


Calculation of the low pass filter frequency is beyond the scope of this article. The low pass filter frequency is affected by Rc2a, Cc2, Rb3, and Cb3 components. Increasing the value of those components will increase the time constant and reduce the low pass filter frequency.

The last amplifier stage made with the Q4 transistor is optional.

Step 2: Simulations

Simulations show that transistors are not biased at half supply voltage. Biasing the transistors at half supply voltage is not essential for this circuit to work. For a 1.5 V supply, each transistor can be biased at 1 V or 0.5 V.

Lower Rf resistor values will reduce the transistor collector-emitter voltage by supplying more DC biasing current to the transistor base.

The old PSpice software does not have a random noise generator.

Step 3: Make the Circuit

I used a 5.6 kohm resistor for Rc2a instead of 1.5 kohm resistor that is shown in the circuit. There should not be much difference. However, my circuit had a higher gain. My circuit also needed a higher Rf2 resistor to increase the biasing collector-emitter voltage. However, by reducing the transistor collector biasing current, Ic you might also reduce the transistor current gain.

I used 5.6 kohm resistors for Rb1, Rb2, Rb3, and Rb4. There should not be much difference. My circuit had lower gain.

Rf2 can be implemented with two 270 kohm resistors. However, all transistors have a different current gain that can range from about 100 to 500. Thus you need the find the right feedback resistor. This is why I specified a mixed resistor pack in the components section. You can also use stabilised bias or fixed bias transistor circuits for this amplifier.

The circuit might start oscillating. You can try using the power supply filters.

Step 4: Encasement

You can see that I almost did not use a soldering iron when making my circuit.

You can also see the metal connectors in the photo.

Step 5: Testing

Graph 1:

Channel 1: Vc1

Scale: 0.5 V and 4 Seconds

Note that the first transistor Q1 output Vc1 is showing that the remaining three transistors could be useless.


Graph 2:

Channel 1: Vint1

Channel 2: Vo1

Scale: 0.5 V and 40 Seconds


Graph 3:

Channel 1: Vo1

Channel 2: Vo2

Scale: 0.5 V and 40 Seconds


Graph 4 (No Rf2 resistor included):

Channel 1: Vo1

Channel 2: Vo2

Scale: 0.5 V and 20 seconds

With no feedback Rf2 resistor the Q2 transistor in not biased at half supply voltage. The circuit works faster, with less settling time. However, without Rf2 this amplifier is a risky circuit and might not work for all transistor and capacitor types.

Audio Challenge 2020

Participated in the
Audio Challenge 2020