Sunday, September 29, 2013

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.

Cumulative distribution graph of random number sample

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 This application is working with command line parameters (e.g: sudo ./randgen 500) or through interactive user inputs (e.g: sudo ./randgen).

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

This USB random number generator is design as an open hardware project and its schematics, software source codes and detail documentation are available at google drive.