# Truly Random-Number Generator

## Meets NIST standard with cheap components

LABSPROJECT
Based on a Labs project | May 2013 | Find it here The first time I tried a software random number generator (RNG) and learned that these numbers, being calculated from previous values, are actually not so arbitrary at all, I started thinking about generating truly random numbers with an electronic device. Later, when I learned the basics of cryptography, I discovered more reasons for a good Random Number Generator (RNG) to be a useful thing to have. Secure data encryption, for instance, is almost impossible without one. Gaming and gambling applications also require top-class RNGs. Products
Relevant websites
Extra info / Update
Tags
computers & Internet, security, cryptography, gaming
Level
Expert level
Time
4 hours approximately
Tools
SMD soldering, AVR programmer, adjustable power supply
Costs
€150 / \$155 / £125 approximately
Component list
Component List, RNG
Resistors
Default: 0805, 100mW, 5%
R1,R5,R9,R10,R11,R12,R16,R20,R25,R26,R39,R48,R49,R50 = 10 kOhm
R2 = 470kOhm
R3,R13 = 1MOhm
R4 = 20MOhm
R6,R7,R8,R30,R31,R35,R36 = 470Ohm
R14,R18,R22,R32,R34,R44,R45,R46 = 100kOhm
R15,R17,R37,R42 = 1.5kOhm
R19,R40 = 15kOhm
R21 = 4.7kOhm
R23,R24,R29 = 33kOhm
R27,R28,R38 = 1kOhm
R33 = 220Ohm
R41 = 100Ohm
R43 = 2.2kOhm
R47 = 330kOhm
P1 = trimpot, 1 kOhm, 11-turn, SMD
P2,P6 = trimpot, 10kOhm, 11-turn, SMD
P3,P4 = trimpot, 200Ohm, 11-turn, SMD
P5 = trimpot, 200kOhm, 11-turn, SMD
Capacitors
Default: 0805
C1,C2,C5,C8,C9,C13,C14,C15,C16,C25,C29,C30,C35 = 100nF
C3,C4 = 22pF
C6,C21,C22 = 10µF, 6.3V, case A
C7,C33 = 1 µF
C10,C11,C12,C17,C18,C19,C20,C26,C28,C32,C34 = 100µF, 10V, case B
C23 = 22µF, 10V, case A
C24,C27 = 10nF
C31,C41 = 470pF
C36,C40,C48 = 220pF
C37,C38,C45,C46 = 100pF
C42 = 1nF
C43 = 2.2nF
C44 = 47pF
Inductors
L1,L2,L3 = 100µH, 0805
L4 = 10mH, 2220
Semiconductors
IC1 = ATtiny2313V-10SUR, programmed
IC2 = L7806CD2T-TR (or NJM7806DL1A-TE1)
IC3,IC6 = TL431AMFDT
IC4,IC5 = L78L33ACUTR
D1,D2,D3,D4,D5,D8,D9 = 1N4148WS
D6 = BAT854W
D7,D10 = BZX384-C12
T1 = BC857CW
T2,T3,T4,T5,T6,T7 = BC847BW
LED1,LED4 = green, 2x1.25 mm
LED2 = red, 2 x 1.25mm
LED3 = yellow, 2 x 1.25mm
Miscellaneous
X1 = 10 MHz quartz crystal, 18pF, 5.0x3.2mm
S1,S2,S3 = Tactile switch
S4 = DIP switch, 4-way
S5 = DIP switch, 7-way
S6 = DIP switch, 5-way
S7 = DIP switch, 3-way
K1 = SD card connector type SDBMF-00915B0T2
K2 = 2-way PCB screw terminal block, 3.5 mm pitch
K5 = 6-pin pinheader (2x3), 0.1’’ pitch
K6 = 5-way pinheader, 0.1’’ pitch
Component List, BSA
Resistors
Default: (0805, 100mW, 5%)
R1 = 1kOhm
R2,R4,R6 = 22kOhm
R3 = 100kOhm
R5,R7,R8,R9,R20,R21,R23,R24,R26,R27 = 10kOhm
R10,R19,R22,R25 = 470kOhm
R11,R12,R13,R14,R15,R16,R17,R18 = 1MOhm
P1 = 10kOhm, trimpot, SMD
P2,P3,P4,P5 = trimpot, 200kOhm
Capacitors
Default: 0805
C1, C2,C23 = 22pF
C3,C4,C5,C6,C7,C10,C13,C16,C19 = 100nF
C8 = 100µF, 16V, radial can SMD
C9,C12,C15,C18 = 22µF, 16V, radial can SMD
C11,C14,C17,C20 = 1µF
C21,C22 = 10µF, 25V, radial can SMD
Inductors
L1 = 10µH, 0805
Semiconductors
D1,D2 = 1N4148WS
D3 = MRA4007T3G
IC1 = ATmega8-16AU
IC2 = LM324MX
IC3 = TL7660CD
Miscellaneous
X1 = 16 MHz quartz crystal, 18pF, 5x3.2mm
JP1 = 2-pin pinheader, 0.1” pitch
Jumper, 0.1’’ pitch
K1 = 5-way pinheader socket, 0.1’’ pitch (solder side)
LCD1 = alphanumeric, 16 columns, 2 lines
16-pin pinheader (for LCD), 0.1’’ pitch
16-way pinheader socket (for LCD), 0.1” pitch
Shopping List
150116-1 PCB
150116-2 PCB
150116-41 Programmed microcontroller
150116-42 Programmed microcontroller