A Random USB… Hourglass

[Peter] thought of a creative, way to generate random entropy for under $100.

The USB Hourglass 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. Power is supplied over the USB cable.

With the USB Hourglass, the user can look at the sand falling through the center of the hourglass and monitor the randomness in the USB output data. And one can read the code line-by-line, compile it, and upload it to the microcontroller using only open-source and widely supported tools.

20 thoughts on “A Random USB… Hourglass

  1. What’s with hack a day and crappy hardware random number generators, lately?

    The point of a HRNG is not to create high-quality enthropy, it’s to create lots of high quality enthropy, as in, hundreds of megabytes a second.

    The source link describes it as a toy, which is a whole lot more honest.

  2. i agree. whats with all the random number generators..
    you can save your self the trouble..

    here: completely bluetooth and arduino free. the most random number today is 42!
    so there you have it!

  3. @bbot:
    No, not at all, it is the exact opposite. A hardware RNG is used when high-quality numbers are needed, and PRNG when you need them fast but necessarily very random.

    I mean, ideally you would have a hardware RNG that was both fast and unpredictable, but those are very hard to come by. New advances in laser RNGs are promising however.

    As for this project it is actually funny because I was thinking of a very similar idea, bouncing a laser off of moving sand and capturing the laser speckle with a digital camera. This is basically the same thing, but is a lot easier to build and maintain. Very nice work.

  4. What’s so difficult about sticking a geiger counter in a shielded box, along with some Am241 and connect the audio output of the geiger counter either directly to the PC or to a simple A-D converter to detect the pulses?

    Am241 can be obtained from smoke detectors.

  5. If you use a computer to generate random numbers someone can mess with it. How do you mess with a sealed glass container and a ridiculously simple sensor to manipulate the numbers? Radiation, Nice octel. Geiger tubes cost a lot thought I really wish they were cheaper. Cool idea though.

  6. @M
    You can get a vintage counter (not just the tube) for about $75. Well worth it, even for messing around.

    You can get beta/gamma tubes (Russian CTC-5 models) for ~$20 each. If you want something more sensitive, pancake mica window tubes can be obtained for about $50 and offer great sensitivity.

    Look around on ebay and other auction sites!

  7. @nubie
    Even “background” radio noise is too predictable, unless you live in the middle of nowhere. There is always guaranteed to be some bleed-over from strong stations, as well as predictable RF noise from various electronics (as well as things like brushed electric motors).

  8. There is very well known cheap and easy random source aka freaking diode, zener lava brake down transistor, just amplify the noise and rwead it directly as digital rs232 string… I dont know why this nonsense continue, probably because arduino cause brain retardation

  9. Neat but… I can’t imagine the random number quality is very good, since factors like grain/sec is fixed to a pretty narrow band (otherwise hourglasses wouldn’t be hourglasses.)

Leave a Reply to KieranCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.