Introduction: Multitouch Pinball Instrument
This instructable is about an instrument I made, which incorporates a simple multi-touch surface with solenoids.
I will be treating this as documentation of my process, rather than a "how-to" for people to copy my project. My hope is that you will either find this to be interesting or inspiring for your own projects, which may or may not be similar at all.
Since the project is very similar to other instructables, I may be more brief in certain areas, and give more attention to parts that I feel are unique to my experience.
For more information on details, you may refer to:
cerupcat's How to make a Cheap Multitouch Pad
mechatronic's Arduino Controlled Bell Tower/Carillon
Step 1: Begin With a Trash Can
I began with a 13 gallon trash can and a piece of glass which fits almost exactly over the top.
I had to restrict myself from building a custom housing for the instrument, since I am limited in tools and woodworking skills. I decided that a trash can is tall enough and has a large enough opening that it would function well as a webcam driven multitouch surface. The more rectangular the trash can, the easier it is to find an appropriately shaped piece of glass without having anything custom cut.
I also procured a Logitech Quickcam Chat webcam. Notice from the picture that I have removed part of the base in order to leave the flattest, most stable mounting surface. I have also taped a small piece of paper over a LED on the top of the webcam to prevent any extraneous light within the instrument.
Step 2: Construct a Frame for the Glass
I glued several pieces of painted craft wood around the glass pane in order to create a frame. The wood extends about 1/2 in. above and below the glass. This is important, since the frame locks the glass in place against the top of the trash can. Also, any rolling objects on top of the glass will bump against the frame and stay on the instrument.
I also cut a piece of Opaline film and taped it to the top side of the glass. This film is quite translucent and works well for this "diffuse light" type of multitouch surface. There is actually a high amount of color visibility for objects touching the film, which would make it possible to track color if I want to reuse this frame for another project.
Step 3: Drill Holes for Cables
At this point, I also spray painted the trash. I decided it was best to paint before incorporating any electronics, so as not to damage them. I also drilled 6 holes for cables to run out from the bottom of the instrument.
Because I knew many of the fabrication elements for this project would be hindered by some of my skills. I embraced a more rugged/grotesque aesthetic for the visual element of the instrument. If I had cut the holes for the cables this poorly and combined it with a very clean paint job, it would simply look sloppy. I find that a process which leaves a malleability to future steps can be more inspiring as an artist; it is especially important to be flexible when you know you may be hindered by your resources.
Step 4: Connect the Microcontroller
Since I intended to use solenoids for the bumpers on the top of the surface, I used 4 digital pins on the Arduino and an 8 channel DC opto-isolator board.
I am powering the Arduino through the USB cable to the computer.
I am powering the opto-isolator board with a regulated 12V 1.5amp power supply.
I originally tried to construct my own board from either 4 TIP120 transistors or a Darlington ULN2074 array. I had problems getting power to switch multiple solenoids with the transistor circuits. However, although the homemade board would have been cheaper, but less reliable and less versatile for future projects.
I have used regular mono audio cable to connect the solenoids to the opto-isolator board. This cable is useful because it contains 2 wires, and is durable/flexible.
Step 5: Connect the Webcam and Run the Cables Through the Holes
I have simply taped the webcam to the side of the trash can, close to the bottom. Since everything inside the instrument will be hidden once the top is in place, I felt no need to organize the electronics more neatly, or attach the webcam more permanently.
I ran all of my cables out of the holes at the bottom of the instrument. This may be obvious to some people, but keep in mind that that once you have connected the cables to both the solenoids and the powering board, they will not fit through the small drill holes.
Step 6: Implement an Array of Solenoids
After all the electronics were in place, constructed an array of four solenoids out of some painted pieces of craft wood. The array is held to the frame by some tape, to make it easily removable.
On the close-up picture, you can see that I have drilled a small hole into the bumper, and glued the shaft of the solenoid to it. It is important to have spring-loaded solenoids, since there will be no force to push the shaft back, once it has activated.
Measuring was important during this step to insure that the bumpers had enough clearance over the film/glass.
Step 7: Implement Software on the Computer
Once the instrument was constructed, I wrote some software in PureData and Max in order to control the bumpers and transform the multi-touch webcam data into sound.
This youtube video explains the Pd/Max code in more depth.
This youtube video provides a demonstration of the solenoids propelling balls, whose positions on the surface affect DSP parameters.
At this point, I found that my webcam is not fast enough to track the balls when they move at higher speeds. This posed an interesting problem when writing the code, since I knew that I could not rely on the data from the webcam in a linear way. My solution was to control the bumpers and the bulk of the synthesis by hand with a MIDI controller, and to let the positions of the balls affect parameters for DSP effects.
Step 8: Closing Remarks
Hopefully, this project has been at least as interesting for you as it has been maddening for me.
Even if you still have no interest in either solenoids or multi-touch surfaces, I hope that you learn from my mistakes and strive to plan for a more flexible project, with a consolidated aesthetic.
If you have any questions about this project or would like more information about my Pd code, please contact me via my youtube account.