USB+Random+Number+Generator

This project is about USB port base true hardware random number generator and it is design around the avalanche noise which occurred in reversed biased P-N junction.

This random number generator is design using commonly available electronic components. The core component of this system is Microchip’s PIC18F2550 microcontroller. The noise source is 2N3904 (Q1) transistor and LM386 low voltage power amplifier is used to amplify the incoming noise signals. This peripheral is design to work as a self-powered USB HID device.



In this design we use 2N3904 as a noise source because it give more noise amplitude than any another transistors which we tested. Theoretically this transistor (Q1) can be replaced with any other suitable NPN transistor like BC548, BC107, 2SC945, etc.

The control software of this system is available for Linux and it’s compiled as x86 - 32bit binary file. This controller application required libusb driver and it can be obtain from www.libusb.org. The control software of this system is available for Linux and it is tested with Ubuntu 13.04 - i686 distribution. This software can be executed with or without command line parameters. If end user specifies the command line parameters then it operates in silent mode and generates the output.

code randgen code
 * Command line syntax:**

code sudo randgen 500 code
 * Example 1:**

The above example may generate 500 random numbers in silent mode.

code sudo randgen 6000 > output.csv code
 * Example 2:**

Above example may generate 6000 random numbers and write them into "//output.csv//" file.

code randgen code
 * Interactive mode command line syntax:**

code sudo randgen Enter the amount of random numbers: 500 code
 * Example 3:**

After the above user input application may generate 500 random numbers.

The valid output range of this random number generator is around 10000 to 41000. This output range is fixed and its distribution graph is available with the project package.

This USB random number generator is design as an open hardware project. All the electronic designs of this project are licensed under the Creative Commons Attribution 3.0 Unported License. To view a copy of this license, visit @http://creativecommons.org/licenses/by/3.0/deed.en_US. All the software source codes are licensed under the terms of MIT license.

Project Related Downloads
[|Complete schematics, source codes and data files of USB Random Number Generator]