Showcase your project! - UC Berkeley School of...

27
Tuesday Week 5: Sensing Theory and Practice of Tangible User Interfaces 1 Potentiometers Showcase your project!

Transcript of Showcase your project! - UC Berkeley School of...

Page 1: Showcase your project! - UC Berkeley School of Informationcourses.ischool.berkeley.edu/i290-4/f08/slides/Thursday_Week5... · Tuesday Week 5: Sensing Theory and Practice of Tangible

Tuesday Week 5: Sensing Theory and Practice of Tangible User Interfaces

1

Potentiometers

Showcase your project!

Page 2: Showcase your project! - UC Berkeley School of Informationcourses.ischool.berkeley.edu/i290-4/f08/slides/Thursday_Week5... · Tuesday Week 5: Sensing Theory and Practice of Tangible

Tuesday Week 5: Sensing Theory and Practice of Tangible User Interfaces

2

Sensor 2: Photocells and Force Sensors

Analog input and Processing

week

05

Page 3: Showcase your project! - UC Berkeley School of Informationcourses.ischool.berkeley.edu/i290-4/f08/slides/Thursday_Week5... · Tuesday Week 5: Sensing Theory and Practice of Tangible

Tuesday Week 5: Sensing Theory and Practice of Tangible User Interfaces

3

Force Sensitive Resistor

Photocell

PhotocellForce Sensitive Resistor

Page 4: Showcase your project! - UC Berkeley School of Informationcourses.ischool.berkeley.edu/i290-4/f08/slides/Thursday_Week5... · Tuesday Week 5: Sensing Theory and Practice of Tangible

Tuesday Week 5: Sensing Theory and Practice of Tangible User Interfaces

4

Force Sensitive Resistor

Photocell

PhotocellForce Sensitive Resistor

$0.01$5.50

Page 5: Showcase your project! - UC Berkeley School of Informationcourses.ischool.berkeley.edu/i290-4/f08/slides/Thursday_Week5... · Tuesday Week 5: Sensing Theory and Practice of Tangible

Tuesday Week 5: Sensing Theory and Practice of Tangible User Interfaces

5

Potentiometers

• Variable resistor (a type of “resistive sensor”)

• Pot for short

• When you need a “ranged” input

• Measures rotational position (knob for volume, light dimmer, etc.)

pot resistor

Page 6: Showcase your project! - UC Berkeley School of Informationcourses.ischool.berkeley.edu/i290-4/f08/slides/Thursday_Week5... · Tuesday Week 5: Sensing Theory and Practice of Tangible

Tuesday Week 5: Sensing Theory and Practice of Tangible User Interfaces

6

turned anti-clockwise

turned clockwise

somewhere in the middle

Potentiometers

• It’s like a faucet (if current is analog to water flow)

• Like any other resistor, but you can vary the amount of resistance

• Generally used for making a varying voltage (remember, Arduino measures voltage differences, not resistance differences)

Illustration adapted from Tod Kurt’s Spooky Projects with Arduino

Page 7: Showcase your project! - UC Berkeley School of Informationcourses.ischool.berkeley.edu/i290-4/f08/slides/Thursday_Week5... · Tuesday Week 5: Sensing Theory and Practice of Tangible

Tuesday Week 5: Sensing Theory and Practice of Tangible User Interfaces

7

Voltage Divider

Potentiometer is a type of voltage divider.

Illustration adapted from Tod Kurt’s Spooky Projects with Arduino

Page 8: Showcase your project! - UC Berkeley School of Informationcourses.ischool.berkeley.edu/i290-4/f08/slides/Thursday_Week5... · Tuesday Week 5: Sensing Theory and Practice of Tangible

Tuesday Week 5: Sensing Theory and Practice of Tangible User Interfaces

8

Photocells (aka photoresistor)

Brighter light == lower resistance

Photocell

Page 9: Showcase your project! - UC Berkeley School of Informationcourses.ischool.berkeley.edu/i290-4/f08/slides/Thursday_Week5... · Tuesday Week 5: Sensing Theory and Practice of Tangible

Tuesday Week 5: Sensing Theory and Practice of Tangible User Interfaces

9

Force Sensitive Resistors

More pressure == lower resistance

Page 10: Showcase your project! - UC Berkeley School of Informationcourses.ischool.berkeley.edu/i290-4/f08/slides/Thursday_Week5... · Tuesday Week 5: Sensing Theory and Practice of Tangible

Tuesday Week 5: Sensing Theory and Practice of Tangible User Interfaces

10

Force Sensitive Resistors

Experiment with different pressure objects, sponge, plates, etc.

Page 11: Showcase your project! - UC Berkeley School of Informationcourses.ischool.berkeley.edu/i290-4/f08/slides/Thursday_Week5... · Tuesday Week 5: Sensing Theory and Practice of Tangible

Tuesday Week 5: Sensing Theory and Practice of Tangible User Interfaces

11

Working with ProcessingArduino as an interface board

Page 12: Showcase your project! - UC Berkeley School of Informationcourses.ischool.berkeley.edu/i290-4/f08/slides/Thursday_Week5... · Tuesday Week 5: Sensing Theory and Practice of Tangible

Tuesday Week 5: Sensing Theory and Practice of Tangible User Interfaces

12

Arduino to Computer

USB to serial chip

Arduino microcontroller

Page 13: Showcase your project! - UC Berkeley School of Informationcourses.ischool.berkeley.edu/i290-4/f08/slides/Thursday_Week5... · Tuesday Week 5: Sensing Theory and Practice of Tangible

Tuesday Week 5: Sensing Theory and Practice of Tangible User Interfaces

13

Arduino to Computer

Arduino microcontroller

USB to serial chip

USB to serial driver

Arduino programmer

Processing sketch

Java program

Laptop Arduino board

USBRX

TX

Program of your choice!

RX

TX

or

or

or

Illustration adapted from Tod Kurt’s Spooky Projects with Arduino

Page 14: Showcase your project! - UC Berkeley School of Informationcourses.ischool.berkeley.edu/i290-4/f08/slides/Thursday_Week5... · Tuesday Week 5: Sensing Theory and Practice of Tangible

Tuesday Week 5: Sensing Theory and Practice of Tangible User Interfaces

14

Processing

Open source programming language and environment for images, animation, and interactions.

Page 15: Showcase your project! - UC Berkeley School of Informationcourses.ischool.berkeley.edu/i290-4/f08/slides/Thursday_Week5... · Tuesday Week 5: Sensing Theory and Practice of Tangible

Tuesday Week 5: Sensing Theory and Practice of Tangible User Interfaces

15

Processing

Page 16: Showcase your project! - UC Berkeley School of Informationcourses.ischool.berkeley.edu/i290-4/f08/slides/Thursday_Week5... · Tuesday Week 5: Sensing Theory and Practice of Tangible

Tuesday Week 5: Sensing Theory and Practice of Tangible User Interfaces

16

Processing and Serial

Processing has a “Serial” library to talk to Arduino.

1. load library2. set portname3. open port4. read/write port

adapted from Tod Kurt’s Spooky Projects with Arduino

Page 17: Showcase your project! - UC Berkeley School of Informationcourses.ischool.berkeley.edu/i290-4/f08/slides/Thursday_Week5... · Tuesday Week 5: Sensing Theory and Practice of Tangible

Tuesday Week 5: Sensing Theory and Practice of Tangible User Interfaces

17

In Class Exercise

Page 18: Showcase your project! - UC Berkeley School of Informationcourses.ischool.berkeley.edu/i290-4/f08/slides/Thursday_Week5... · Tuesday Week 5: Sensing Theory and Practice of Tangible

Tuesday Week 5: Sensing Theory and Practice of Tangible User Interfaces

18

Photocell and LED

SinglePotControlsBrightness.txt

SinglePotControlsBlinking.txt

Page 19: Showcase your project! - UC Berkeley School of Informationcourses.ischool.berkeley.edu/i290-4/f08/slides/Thursday_Week5... · Tuesday Week 5: Sensing Theory and Practice of Tangible

Tuesday Week 5: Sensing Theory and Practice of Tangible User Interfaces

19

FSR and LED

SinglePotControlsBrightness.txt

SinglePotControlsBlinking.txt

Page 20: Showcase your project! - UC Berkeley School of Informationcourses.ischool.berkeley.edu/i290-4/f08/slides/Thursday_Week5... · Tuesday Week 5: Sensing Theory and Practice of Tangible

Tuesday Week 5: Sensing Theory and Practice of Tangible User Interfaces

20

Processing

Download and install Processing from processing.org

Page 21: Showcase your project! - UC Berkeley School of Informationcourses.ischool.berkeley.edu/i290-4/f08/slides/Thursday_Week5... · Tuesday Week 5: Sensing Theory and Practice of Tangible

Tuesday Week 5: Sensing Theory and Practice of Tangible User Interfaces

21

Processing and Arduino

arduino_ball_paint

Every time a number is received via the serial port, it draws a ball that size.

Project adapted from Tod Kurt’s Spooky Projects with Arduino

Page 22: Showcase your project! - UC Berkeley School of Informationcourses.ischool.berkeley.edu/i290-4/f08/slides/Thursday_Week5... · Tuesday Week 5: Sensing Theory and Practice of Tangible

Tuesday Week 5: Sensing Theory and Practice of Tangible User Interfaces

22

Assignment this 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.

Page 23: Showcase your project! - UC Berkeley School of Informationcourses.ischool.berkeley.edu/i290-4/f08/slides/Thursday_Week5... · Tuesday Week 5: Sensing Theory and Practice of Tangible

Tuesday Week 5: Sensing Theory and Practice of Tangible User Interfaces

23

Supplement Readings

Force sensitive resistors: Chapter 11 of Physical Computing

Voltage divider: Chapter 6, pp. 102-108 of Physical Computing

Page 24: Showcase your project! - UC Berkeley School of Informationcourses.ischool.berkeley.edu/i290-4/f08/slides/Thursday_Week5... · Tuesday Week 5: Sensing Theory and Practice of Tangible

Tuesday Week 5: Sensing Theory and Practice of Tangible User Interfaces

24

Photocell and LED

SinglePotControlsBrightness.txt

SinglePotControlsBlinking.txt

Page 25: Showcase your project! - UC Berkeley School of Informationcourses.ischool.berkeley.edu/i290-4/f08/slides/Thursday_Week5... · Tuesday Week 5: Sensing Theory and Practice of Tangible

Tuesday Week 5: Ambient Media Theory and Practice of Tangible User Interfaces

25

LumiTouch[Chang, Resner et al., 2001]

Page 26: Showcase your project! - UC Berkeley School of Informationcourses.ischool.berkeley.edu/i290-4/f08/slides/Thursday_Week5... · Tuesday Week 5: Sensing Theory and Practice of Tangible

Tuesday Week 5: Sensing Theory and Practice of Tangible User Interfaces

26

Homework

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.

Page 27: Showcase your project! - UC Berkeley School of Informationcourses.ischool.berkeley.edu/i290-4/f08/slides/Thursday_Week5... · Tuesday Week 5: Sensing Theory and Practice of Tangible

Tuesday Week 5: Sensing Theory and Practice of Tangible User Interfaces

27

Thanks!