This instructable was made as part of the CS course "Tangible Interactive Computing" at the University of Maryland, College Park taught by Professor Jon Froehlich. The course focused on exploring the materiality of interactive computing and, in the words of MIT Professor Hiroshii Ishii, sought to "seamlessly couple the dual worlds of bits and atoms." Please see http://cmsc838f-s14.wikispaces.com/ for more details."
Kinects and Motors Project from the UMD HackerSpace Zen gardens are a peaceful way to visualize space and tranquillity. Our project seeks to connect the zen garden to the room in which it sits; imbuing the garden with properties of the room's occupants. In this way, the zen garden becomes not just a visualization of an ideal space and tranquillity but of the actual tranquillity of it's surroundings. This being said, here is a functional XY table schematic and a cool drawing apparatus on top!
Step 1: Examine Requirements/Buy Parts
Tools needed for construction
- 3d Printer
- Hair Dryer
- X-Acto knife
Items to purchase/make:
- XY Table (~$110)
Step 2: Start 3D Printing
- Click: Thingiverse, download schematics, and print the rack module x5.
- ***Click: tinkercad, download schematic, print the pinion (gear) x2.
***Important: Use this schematic instead of the one on thingiverse to ensure the gear fits properly on the motor
One possible change is to reduce the diameter of the pinion in order to improve the efficiency and reduce the amount of torque required. In order to provide enough torque we had to use a bench power supply to pump a full 1A at 11V to our Arduino. A reduced pinion size might also allow a more convenient placement of the rack within the K'nex framework. We had to readjust several times in order to prevent the bottom gears of the pinion from rubbing against our motor mount. Increasing the length of the pinion mount might also help with this problem. YMMV.
Step 3: Build XY Stage From K'Nex
Wheel support x2
- Rod: 4x red, 4x blue, 4x white
- Connector: 8x blue, 8x purple
Motor mount x2
- Rod: 2x blue, 4x yellow,
- Connector: 4x orange, 2x yellow
The main components of the k'nex carriage are the wheel support and motor mount. The big idea is to tailor the motor mount to fit your motor as snugly as possible. We reconfigured our motor mount several times in order to prevent the motor from slipping within the mount due to torque. One method we used was to stick spare connectors between the motor and the motor mount to keep it from sliding side to side.
Another thing to keep in mind with the wheel support system is that the K'nex and dowel rods actually have a very tight tolerance. In fact in our K'nex set, there were several orange pieces which did not slide smoothly along the dowels. Don't be surprised if the first one you pick up doesn't work.
Step 4: Build the Zen Garden With a Sand Box
We cut a piece of foam core into a rectangle and four side walls. Use a ruler and sharp knife to be as precise and straight as possible when making the cuts. To remove the gaps (and prevent sand from spilling all over your floor) use thin strips of tape (electrical or duct) along the seams. When filling with sand, use an EXTREMELY THIN (~1/8 - 1/4in thick) layer of sand at first and build up as desired after testing marble movement. When the sand becomes too thick, it prevents the marble from moving and the marble may slip out of the field of its magnet. The final thing to consider is the height of the sand table above the XY table. This should be calibrated based on the strength of your magnet. Be careful because a strong enough magnet will actually lift your motors off their tracks.
Step 5: Connect the Stepper Motors With Arduino and Kinect
Download the code from Github here. Connect a Kinect for Windows and an Arduino to a laptop or PC. Upload the Arduino code so that the Kinect could communicate with the stepper motors using USB serials. The Kinect program could detect XY position of people in a room, regard the nearest player to the Kinect as the primary user.
Step 6: Calibration and Test
First of all, we need to calibrate Kinect field of view and feed Kinect coordinates to the XY table. Set the m_calibration = true; then walk around in the room, the program would automatically update the maximum visible field of view.
Then configure the response time of recorded sensor readings in relation to actual motor movement, currently the magnet's position in the zen garden is updated every 500 milliseconds.