Warning: Use of undefined constant DATABASE_SERVER - assumed 'DATABASE_SERVER' (this will throw an Error in a future version of PHP) in /nfs/c05/h03/mnt/77459/domains/cmuems.com/html/2011/d/wp-config.php on line 28
CMU Electronic Media Studio II, Fall 2011, Section D » Assignment 9a due 11/16

Using the ribbon sensor

Assignment 9a due 11/16 — EricSinger @ 5:26 pm

The ribbon sensor is similar to a pot, with exceptions discussed below. It has three pins, just like a pot: power, ground and “center tap” or output (which gives a proportional voltage that goes directly to an analog input pin).

You need to make sure you hook it up correctly. I believe these tend to vaporize their (screen-printed silver) traces if hooked up incorrectly. I believe they also have a polarity for some reason – i.e. they like power on a particular pin and ground on another – though I’m not sure. LOOKING UP THE SPEC SHEET would be a good idea (check Spectra Symbol’s site), or looking for pin and polarity markings on the device (I don’t have it in front of me or I would verify this).

Anyway, once you’ve got it hookup up correctly, it will give you a varying voltage based on where you press/slide across the ribbon.


If you’re not touching it, your output pin is floating – i.e. no connection to anything. We need a way to ensure that it doesn’t do this. We can accomplish this by using a large resistor to hold the output pin at ground when it’s not being touched. A 100k or 1M from the output pin to ground will do the job. So, just add this when making your connections.

Assignment 9 + class code

Motor driving code is here.

Here’s the assignment:
– Hook up a resistive sensor (bend, photocell, FSR i.e. pressure or ribbon)
– Hook up a motor (geared DC or servo)
– Create an interactive relationship between them by writing the necessary Arduino code. This code will read the sensor, “do things,” then drive the motor.

– By “do things,” I mean process the input and map it to the output in an interesting way. I don’t want to see just a sensor controlling motor speed (unless you can convince me of the massive coolness of how you use this in your mini-installation).

Here are some interesting ideas for the input side:
– Use the pressure sensor to detect and record taps.
– Use the photocell to see if a person is moving up and down quickly or slowly (a little challenging – you’ll have to sample the input at regular intervals and compute abs(curVal – lastVal) i.e. sample and compute velocity – look for online tutorials or ask me or Riley for help if you want to try this). Or, figure out how you can detect some other “gesture” from this or other sensors, like “time between hand waves”.
– Use the bend sensor to detect user input “floppiness”.

For the output side:
– Spin the DC motor in a smooth or jerky fashion.
– Move the servo back and forth in “interesting” ways, like rhythmically or in a pattern that controls an object.

The point here is to take “Vanilla” data or output, look at it, and do some figuring/calculating in code to transform it into “Cherry Garcia.”

The above is Part A. I want to see this stuff working by the 16th, or at least close enough so you can ask a question or two and make it work.

Part B is to take the working Arduino system (and now, stand-alone if you run it by 9v battery) and build it into a physical mini-installation piece. It doesn’t have to be complicated or even long lasting. If you must, use foam core. Just make sure it makes it through a class demo on the 21st.

Your reward for completing this somewhat difficult assignment is that I won’t give you homework over Thanksgiving 😉

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
(c) 2022 CMU Electronic Media Studio II, Fall 2011, Section D | powered by WordPress with Barecity