random241
Requirements:
For the entropy harvesting script (random241.py) you need the following packages and dependencies installed (names may vary depending on your distribution!):
- python2
- python2-numpy
- python2-pyliblo
- opencv
- liblo
For random241.scd you need SuperCollider installed.
For the remote_control (read_gpio.py) you need the following:
- python2
- python2-pyliblo
- AdaFruit_BBIO
- liblo
Features:
random241.py
- Grabbing of bright areas (aka regions of interest in pixels) above a certain threshold from a webcam
- Calculation of mean x/y values from regions of interest and conversion to float range
- Sending of time, x and y values via OSC to predefined host and port
random241.scd
- Receive OSC messages for the creation of SynthDefs with certain pitch, amplitude, length and loop time, according to coordinates and time sent.
- Receive OSC messages for manipulation of post processing SynthDefs (FreeVerb for now).
- Ignore OSC messages after a certain amount of SynthDefs created.
- Release (all) SynthDefs after a certain amount of SynthDefs is reached.
read_gpio.py
- Read GPIO data from BeagleBone Black (P9_39-42 for now)
- Send sensor data as OSC message to predefined host and port
Build instructions
Note
Americium 241 is not a toy! It's a transuranic radioactive chemical element. Respect working with it:
- Do not swallow it
- Don't wear it on your body
- Avoid touching it
- At best work in a safe environment (like a lab)
- Do not eat while working with it
- Keep in a closed steel or aluminium container, when not working with it
Materials
Americium 241
If you're living in the US, you might still have an ionization smoke detectors around. For (mostly) everyone else, there's the possibility of ordering Americium on ebay!
Webcam
You can use any webcam for this project. There are some things to keep in mind though:
- You will break it!
- Don't use cameras below 2 megapixels (your resolution won't be of any use)
- Make sure you'll be able to open it up and remove its lens!
In my case a Mustek Gsmart Mini 3 has been used, because Gabriel Zöller wanted to get rid of his and it was broken in just a beautiful and fitting way (with the lens already removed):
Note
Casing
Building the RNG
It is highly recommended to use nippers when handling the Americium 241 sample:
The lens mount has a certain diameter. To not have the sample fall on top of the camera chip, I drilled a hole into and cut out a piece of steel to be used as a curb for the sample.
Now the sample was put on top of the lens mount with the Americium pointing directly at the chip.
You might have to improvise a little - depending on your hardware - to make things work. Sugru is your friend, fixing the sample over the camera chip. I know, it looks ugly, but it certainly gets the job done!
I was able to place the camera in the above mentioned casing, while leading the USB and push button switch cable out.
TODOs:
- Externalization of settings for read_gpio.py and random241.py
- Further settings and advancements in sound for random241.scd
- Performance enhancements for random241.py using different search algorithm (maybe switch to C++?)
- Detection of false positives (pixel errors) on wacky cameras