Circuit Lake

Electronic Project and Circuit Collection

USB Hourglass Sand Timer

01/08/2010 Category: Arduino, USB

Arduino Random Number Generator

If you’re looking random number generator project check out this Arduino Based USB Hourglass. The project combines a sand timer with a rotating mechanism and an optical beam through the center of the timer to observe the falling sand. The amount of light reaching a detector is digitized at frequent intervals and processed by a microcontroller to determine when to rotate the hourglass. The digitized light levels are also sent by USB to a host PC where they can be used as a source of random entropy.

Peter Allan, project designer, explains that the USB Hourglass outputs the raw analog-to-digital converter readings as 10-bit non-negative integers (0-1023) in text form at 100 samples per second. The hardware is capable of a higher data rate, but there’s not much higher frequency information present. Using a conservative estimate of 9 bits of entropy per 10-bit sample, the USB hourglass produces 900 bits/second of true randomness. For most applications the raw data should be run through a good whitening algorithm

Here is USB Hourglass in Action

USB Hourglass
Project Documentation and Schematic