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.

Comments

  1. NaeD says:

    Erm… Random!

  2. Agent420 says:

    Thief! I have been thinking of a digitally controlled sand hourglass clock for a while ;-)

    Nice job.

  3. bbot says:

    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.

  4. James says:

    How random would grains falling through a known mechanism/tube be exactly?

  5. Pete says:

    Wait… so this isn’t for providing definitive timing during competitive Pictionary play?

  6. Rune kyndal says:

    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!

  7. Kieran says:

    This is so cool!

  8. MS3FGX says:

    @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.

  9. jwstolk says:

    Ohh! I need to build one now. With a small servo it could run on a small solar panel until the sand turns to dust :-)

  10. octel says:

    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.

  11. M says:

    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.

  12. octel says:

    @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!

  13. Joshua says:

    Nice Idea out of the box!

    But I have some doubts about it true randomness. I am not sure if there would not be a clear statistical cluster – some maths should be done.

  14. nubie says:

    @octel Can’t you just get a radio tuned to background radiation and get the same effect?

  15. octel says:

    @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).

  16. therian says:

    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

  17. Agent420 says:

    Man, this is a tough crowd.

    Let’s take a poll and see how many folks who have replied have submitted a project.

  18. Gene says:

    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.)

  19. jayson says:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 92,295 other followers