Exercise: Tactile Interface¶
Most machines we make involve some form of human interaction. The main objective of this exercise is to experiment with several sensors suited for creating interfaces for direct tactile engagement. By directly measuring the physical movement of parts of the body, we can move toward ambient, unconscious interfaces and away from the explicit and conscious affordances of buttons and knobs.
After this exercise, you should be able to:
Use an ultrasonic range sensor for electronic distance measurement.
Construct a short-range proximity sensor circuit using a reflective photointerruptor.
Apply a tilt-ball sensor for binary gesture detection.
Utilize a passive buzzer for audible interface feedback.
Construct a wearable device using improvised materials.
This exercise is not self-contained, it assumes you already have experience with each individual sensor. Please try out each of the following exercises before you begin. There are no deliverable results for these, but each includes a suggested set of observations to demonstrate use of the device.
Reflective Photointerruptor. A sensor circuit with both current-limited LED and biased phototransistor.
Read Sonar. Measure distance with an ultrasonic ranger; explore time as an output variable.
The tilt-ball switch is a single-pole, single-throw switch, so the following applies:
Read Switch Input. Read a switch input as a binary digital value.
The passive buzzer is a speaker with a high enough resistance it can be directly driven from an Arduino digital output. Adding a small series resistance can decrease the volume. The Tinkercad exercises provided a model for this part.
Steps and observations¶
The overall objective is to create a device for human interface using several sensors and audible feedback. In a subsequent phase, we will use these devices for remote interaction.
Please review the prerequisites above to become familiar with use of the following course kit parts:
ultrasonic range sensor (sonar)
reflective photointerruptor (LTH-1550)
Please also locate the following kit parts:
tilt ball switch
Please plan out a way to integrate all four parts into a wearable device. Some considerations:
You may also find the following kit parts useful:
alligator test leads
female-to-male jumper wires
one large and three small breadboards
a monolithic device on a single breadboard is probably the most reliable, but you can distribute parts if needed
the Arduino can be mounted, especially if you have a longer USB cable available; this can minimize wiring lengths
tape and cardboard (not supplied) may be useful.
keeping jumper wires short and organized can help keep them in place
arms and hands are convenient locations for wearables, but please also consider other locations
debugging will be easier if the device goes on and off the body easily
Write an Arduino program which reads all the sensors and prints the values to the Serial Monitor. I recommend printing numbers without extraneous text and using the Serial Plotter in the IDE to visualize your data.
Choose a gesture which works particularly well for your arrangement and extend your Arduino program to provide an audible signal reflecting some aspect back to the wearer.
Please record a brief (~30 second) video demonstrating the operation of the device.
Please be sure to apply Auto Format from the Tools menu to your code before submission to make sure it is consistently indented.
Please create a hand-drawn schematic diagram to document your circuit as built. (See Electronic Schematics).
Please remember that the purpose of a schematic is to convey the electrical connectivity, which is typically abstracted from the physical structure. E.g. the breadboard itself is not a component, it is only implicitly represented by the connections it provides.
Please mimic the conventions you have been seeing: ground can be drawn as a downward-pointing triangle, power supply connections can be drawn as a number in a circle, the Arduino can a rectangular box with labels designating pins and unused pins elided. Please generally observe a left-to-right and top-to-bottom flow: sensors on the left, actuators on the right, positive supplies at top, ground at bottom.
Long jumper wires and alligator leads are a wiring implementation detail and are generally just drawn as a line on a schematic, unless there is a useful distinction to make between separate modules.
Note: please your name as a prefix on the filename for all files uploaded to Canvas. This will help me greatly keeping them sorted out during my review. E.g., I might name my own files as “Garth-project.mp4” or “Zeglin-tactile.ino”.
The result of your explorations should include the following Canvas file submissions:
a brief video (~30 seconds) demonstrating operation of your device
one or more high-resolution photos (enough to identify the wiring)
your Arduino sketch uploaded as a single .ino file
a hand-drawn schematic diagram showing all circuits
a brief paragraph describing any problems you encountered, submitted as a text file
If you would like to explore more, please consider the following optional challenge questions.
Use an event polling loop structure to read all sensors at the maximum possible rate by interleaving activity. Note: you will need to detect the sonar return in your own code using digitalRead() and micros() rather than relying on pulseIn().