This simple device will allow the user to generate a more true random input for text based applications. Computers themselves are deterministic and can only generate a seemingly random sequence of numbers and letters. This device which uses a chip from a keyboard can more accurately create random sequences because it rids itself of the traditional layout(QWERTY) of a keyboard. Keyboard layout as is cannot generate a random sequence of values due to letter proximity, a user is much more likely to hit buttons close together forming clusters of values. This hack which modifies the keyboard by extending the conducting lines of the circuit and suspends them in a medium.
**attention** although there is minimal electronic work(striping/attaching wires, etc.) there is a chance of damaging the computer and or keyboard by short circuiting wires in hacking the keyboard. And any opening of computer or keyboard will void your warranty. Exercise caution in hacking computer components, or just use old computers you don't mind taking apart.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Kitchen Science: Tools for Making the Medium
Gallon of fat free milk
4 boxes of pudding mix (banana flavored)
1-2 egg yolks
large container to hold pudding
Follow pudding mix box instructions , whisk for one minute each per pudding box, combine all pudding into the larger container.
Why pudding as the medium?
You can try and make your own mixture of starches, sugars, salt, Lecithin, citric acid, and lactic acid. And too thin of a medium will allow the wires to sink,float, move on their own. But you can just purchase almost any brand of pudding mix that has an already perfect ratio of needed ingredients, plus banana flavor has the right amount of sugars and acids, otherwise some further kitchen science will be needed to get the medium working. Pudding is the perfect medium as it contains the right balance of modified food starch that is needed for wire connectivity. Modified food starch used in foodstuffs by major manufactures is needed, as native starches are less stable and tend to break down with time or agitation. Starch break down tends to make the mixtures less viscous resulting in reduced wire conductivity as wire contacts are made. Additionally, reduced viscosity tends to make some wires more prone to conducting upon contact than others, thus affecting the random nature of this device.
Step 2: Off to the Lab...
before starting this section be aware the only way you might be able to damage your computer is by shorting out the keyboard input chip, if you connect the +5V line on the keyboard directly to ground. The +5V line is there to power the LED's for caps lock, etc, and also the microcontroller; on most keyboards i don't think it's included in the actual keyboard matrix so you'd be safe, the only exceptions might be ones where the caps lock key lights up (like on the macbook pro laptop). but to just be safe use an old keyboard that is okay to dismantle, many old keyboards can be found at local thrift stores for a few dollars. some more detailed instructions on hacking keyboards found here: http://www.extremetech.com/article2/0,1697,1610432,00.asp
Old keyboard you don't mind taking apart(PS/2 connector/6-pin or USB)
hot glue gun and hot glue
simple closed loop device for testing the medium
Step 3: Build the Controller!!!
Open up the keyboard, because this is a dome-switch keyboard inside you will find a rubber membrane or a bunch of little rubber 'domes', these may be discarded, you will also find three plastic sheets which have conductive lines mapped out on the outer two sheets, each conductive line terminates in a conductive contact. The third plastic sheet sandwiched between the two outer sheets will have no contacts or conductive lines on it, it will only be perforated, when the plastic sheets are lined up the holes in the third sheet will separate the conductive contacts but allow the contacts to touch when the rubber membrane or domes are stuck. And the keyboard chip will be inside with 6-pin/usb cord attached.
Using permanent markers map out the conductive lines, this will make it easy to tell what contacts equal what function of the keyboard.
**It is important to know what contacts will operate keys other than the numbers and letters, operating the function keys and special preset keys will probably cause undesirable effects on your computer, shutting down, sleeping, quitting applications, etc.. Knowing these keys will allow for these keys to be omitted from the final design of the controller.
Step 4: Test Medium
If the mix was made according to the instructions on the pudding mix box, medium should be ready as is, but it is a good idea to test now before going further. Test medium with a closed loop circuit led, something that will illuminate the light when the wires touch inside the medium.
If the light illuminates when both wires are in medium but are not touching, the medium has too high an ion content which needs to be separated try adding more milk or a small amount of water. If the light will not light when the wires touch some salt or egg yolks are needed in the mixture. Adding salt slowly and continue to test. Exercise some caution in using salt to increase conductivity, instead of altering the medium to more accurately allow the wires to conduct when touching in the solution adding dissolved ionized solids such as salt will increase the entire mediums conductivity, meaning if enough salt is dissolved in the medium it will allow the wires to complete a circuit in the medium not having to touch one another. This will not allow programs such as text editors to work. A better troubleshooting solution would be adding one egg yolk. This would increase Lecithin levels in the solution. Essentially lecithin containing phospholipids which generate small pockets of ion rich aqueous medium around the wires which enhances conductivity when wires get close and touch, instead of just leveling up the ion content throughout.
Step 5: Use Controller With Text Editing Program
Locate the 6-pin socket on back of computer and attached the controller and sink just the wires of the controller into the medium. Open up a text editor program and start agitating the wires in the medium. Completely random letters and numbers will fill up the text window.
Step 6: Applications Beyond Simple Text Edit
Using Processing text input can be made to control other functions. Demonstrated here the entire Shakespeare play Hamlet is randomly assigned to the 'keystroke' input. So each value of input results in a random word from the play Hamlet. This is used to generate a more realistic and sped up version of the Infinite monkey theorem. Better explained here: Infinite monkey theorem .