Sensing PART II: Force Sensitive Resistors and Photocells

 

Start Date: Thursday, September 24, 2009

Due Date: Wednesday, Midnight of September 30, 2009

"Week 5: Sending Part II" Lecture Slides

Before the Lab

You should have already completed your color mixer and come up with some way to control the LEDs with 2 or 3 pots.

In Lab Exercise

Objective

In the past lab, we explored potentiometers (or “pot” for short) which are analog sensors that measure rotation. In this week’s lab, we’ll be exploring two other analog sensors. The first sensor measures light brightness and is called a photocell (or a “phot” for short. Okay, that was a lie). The second sensor measures force and is called Force Sensitive Resistor (or “FSR” for short). Thus far, the pot, phot, and FSR sensors convert some physical action into an electrical characteristic, namely resistance.

In addition to new sensors, this lab will introduce “Processing” which is a programming language for creating more interesting UIs than the text based one’s you’ve been using.

Activities

Part 1 – Photocells

Beginning with the circuit you built last week, try replacing the pots with photocells (You should have two in your kit). Note: you will need to add a 10K resistor (brown,black, yellow) to the circuit as shown in the diagram below. Try the classic "LED_fade" or "LED_blink" with the photocell. Try photocell with what you have built for this week's homework.

Part 2 – Force Sensitive Resistors

Replace the photocells in your current circuit with the FSRs (distributed in class). This should simply involve swapping out the photocells with the FSRs (still using the 10K resistors). Again, try the classic "LED_fade" or "LED_blink" with the photocell. Try photocell with what you have built for this week's homework.

Part 3 – Processing

In this section, we begin exploring Processing

1) Download and install Processing if you have not done so yet (www.processing.org)

2) Load “Sketchbook ‐> Examples ‐> Motion ‐> Bounce”

(For Mac users, there's a bug from the system so you cannot access it through the toolbar. Please use File->Open option instead to load the sample code through this path:

/Applications/Processing.app/Contents/Resources/Java/examples/Topics/Motion/Bounce/Bounce.pde)

3) Press “Run”

Congrats! You just made a java applet.

Part 4 – More Processing

Influence a Processing program running on your computer with the input from your Arduino board example code:

http://courses.ischool.berkeley.edu/i290-13/f07/system/files/BouncingBallPaint+(Processing).txt

Try it with pot, photocell, and FSR.

Homework for next week:

Programming

Create an interesting visualization on your computer that could be influenced by the input from the sensors you have (pot, photocell, FSR, or combination of them). You can use Processing (or any other language you like) in writing the program. Post your results on the course website.

Mechanical

Create a mechanical construction for your FSR that distributes or focuses physical force that is applied. Think about everyday objects (toothpaste tube, entrance mat, paintbrush, pipette, etc.) and how you measure the pressure or force applied to them

Click here to post your assignment.