thursday week 3: analog input theory and practice of ... · thursday week 3: analog input 11 theory...
TRANSCRIPT
![Page 1: Thursday Week 3: Analog Input Theory and Practice of ... · Thursday Week 3: Analog Input 11 Theory and Practice of Tangible User Interfaces 1. RGB LED Fade 2. Strip wires 3. Solder](https://reader034.vdocuments.mx/reader034/viewer/2022051922/600fbf71646b1717b721699f/html5/thumbnails/1.jpg)
Thursday Week 3: Analog Input
1
Theory and Practice of Tangible User Interfaces
Sensor 1: PotentiometersAnalog input
week 03
![Page 2: Thursday Week 3: Analog Input Theory and Practice of ... · Thursday Week 3: Analog Input 11 Theory and Practice of Tangible User Interfaces 1. RGB LED Fade 2. Strip wires 3. Solder](https://reader034.vdocuments.mx/reader034/viewer/2022051922/600fbf71646b1717b721699f/html5/thumbnails/2.jpg)
Thursday Week 3: Analog Input
2
Theory and Practice of Tangible User Interfaces
Red LED Recall
![Page 3: Thursday Week 3: Analog Input Theory and Practice of ... · Thursday Week 3: Analog Input 11 Theory and Practice of Tangible User Interfaces 1. RGB LED Fade 2. Strip wires 3. Solder](https://reader034.vdocuments.mx/reader034/viewer/2022051922/600fbf71646b1717b721699f/html5/thumbnails/3.jpg)
Thursday Week 3: Analog Input
3
Theory and Practice of Tangible User Interfaces
DiffusersShowcase your diffuser!
![Page 4: Thursday Week 3: Analog Input Theory and Practice of ... · Thursday Week 3: Analog Input 11 Theory and Practice of Tangible User Interfaces 1. RGB LED Fade 2. Strip wires 3. Solder](https://reader034.vdocuments.mx/reader034/viewer/2022051922/600fbf71646b1717b721699f/html5/thumbnails/4.jpg)
Thursday Week 3: Analog Input
4
Theory and Practice of Tangible User Interfaces
![Page 5: Thursday Week 3: Analog Input Theory and Practice of ... · Thursday Week 3: Analog Input 11 Theory and Practice of Tangible User Interfaces 1. RGB LED Fade 2. Strip wires 3. Solder](https://reader034.vdocuments.mx/reader034/viewer/2022051922/600fbf71646b1717b721699f/html5/thumbnails/5.jpg)
Thursday Week 3: Analog Input
5
Theory and Practice of Tangible User Interfaces
Digital vs.
AnalogBinary vs. continuous signals
•
Binary / Digital = “whether or not”•
Continuous / Analog signal = “how much”
or “faster,”
“brighter,”
etc.
Binary / Digital :
•
0V (LOW) or 5V (HIGH)
Continuous / Analog : e.g.
•
0.095V
•
1.0V•
4.555V•
etc.
![Page 6: Thursday Week 3: Analog Input Theory and Practice of ... · Thursday Week 3: Analog Input 11 Theory and Practice of Tangible User Interfaces 1. RGB LED Fade 2. Strip wires 3. Solder](https://reader034.vdocuments.mx/reader034/viewer/2022051922/600fbf71646b1717b721699f/html5/thumbnails/6.jpg)
Thursday Week 3: Analog Input
6
Theory and Practice of Tangible User Interfaces
Digitizing Analog InputMicroprocessor cannot deal with analog signal internally, so you
digitize it. Afterwards, computer only knows the dashed line so to computer, analog input is “chunky.”
digitized point
digitized signal
sampled point
time
analog
signal
voltage
Illustration adapted from Tod
Kurt’s Spooky Projects with Arduino
![Page 7: Thursday Week 3: Analog Input Theory and Practice of ... · Thursday Week 3: Analog Input 11 Theory and Practice of Tangible User Interfaces 1. RGB LED Fade 2. Strip wires 3. Solder](https://reader034.vdocuments.mx/reader034/viewer/2022051922/600fbf71646b1717b721699f/html5/thumbnails/7.jpg)
Thursday Week 3: Analog Input
7
Theory and Practice of Tangible User Interfaces
Analog Input on Arduino•
Arduino has 6 ADC (Analog to Digital Converter) inputs
•
Reads voltage between 0 to 5 V
•
Resolution is 10 bits: 210 = 1024 states
•
5V/1024 = 4.8mV smallest voltage difference Arduino can measure
Analog Input
![Page 8: Thursday Week 3: Analog Input Theory and Practice of ... · Thursday Week 3: Analog Input 11 Theory and Practice of Tangible User Interfaces 1. RGB LED Fade 2. Strip wires 3. Solder](https://reader034.vdocuments.mx/reader034/viewer/2022051922/600fbf71646b1717b721699f/html5/thumbnails/8.jpg)
Thursday Week 3: Analog Input
8
Theory and Practice of Tangible User Interfaces
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 9: Thursday Week 3: Analog Input Theory and Practice of ... · Thursday Week 3: Analog Input 11 Theory and Practice of Tangible User Interfaces 1. RGB LED Fade 2. Strip wires 3. Solder](https://reader034.vdocuments.mx/reader034/viewer/2022051922/600fbf71646b1717b721699f/html5/thumbnails/9.jpg)
Thursday Week 3: Analog Input
9
Theory and Practice of Tangible User Interfaces
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 10: Thursday Week 3: Analog Input Theory and Practice of ... · Thursday Week 3: Analog Input 11 Theory and Practice of Tangible User Interfaces 1. RGB LED Fade 2. Strip wires 3. Solder](https://reader034.vdocuments.mx/reader034/viewer/2022051922/600fbf71646b1717b721699f/html5/thumbnails/10.jpg)
Thursday Week 3: Analog Input
10
Theory and Practice of Tangible User Interfaces
In Class ExerciseControlling LEDs
with potentiometers
Control your color mixer with multiple pots
![Page 11: Thursday Week 3: Analog Input Theory and Practice of ... · Thursday Week 3: Analog Input 11 Theory and Practice of Tangible User Interfaces 1. RGB LED Fade 2. Strip wires 3. Solder](https://reader034.vdocuments.mx/reader034/viewer/2022051922/600fbf71646b1717b721699f/html5/thumbnails/11.jpg)
Thursday Week 3: Analog Input
11
Theory and Practice of Tangible User Interfaces
1. RGB LED Fade
2. Strip wires
3. Solder wires to pot
4. Control one LED
5. Control LED(s) with multiple pots
In Class Exercise
![Page 12: Thursday Week 3: Analog Input Theory and Practice of ... · Thursday Week 3: Analog Input 11 Theory and Practice of Tangible User Interfaces 1. RGB LED Fade 2. Strip wires 3. Solder](https://reader034.vdocuments.mx/reader034/viewer/2022051922/600fbf71646b1717b721699f/html5/thumbnails/12.jpg)
Thursday Week 3: Analog Input
12
Theory and Practice of Tangible User Interfaces
Circuit with 3 LEDsPlug in the three LEDs, red, green, and blue, and make different colors
![Page 13: Thursday Week 3: Analog Input Theory and Practice of ... · Thursday Week 3: Analog Input 11 Theory and Practice of Tangible User Interfaces 1. RGB LED Fade 2. Strip wires 3. Solder](https://reader034.vdocuments.mx/reader034/viewer/2022051922/600fbf71646b1717b721699f/html5/thumbnails/13.jpg)
Thursday Week 3: Analog Input
13
Theory and Practice of Tangible User Interfaces
1. RGB LED Fade
2. Strip wires
3. Solder wires to pot
4. Control one LED
5. Control LED(s) with multiple pots
In Class Exercise
![Page 14: Thursday Week 3: Analog Input Theory and Practice of ... · Thursday Week 3: Analog Input 11 Theory and Practice of Tangible User Interfaces 1. RGB LED Fade 2. Strip wires 3. Solder](https://reader034.vdocuments.mx/reader034/viewer/2022051922/600fbf71646b1717b721699f/html5/thumbnails/14.jpg)
Thursday Week 3: Analog Input
14
Theory and Practice of Tangible User Interfaces
Strip the WiresTake 6 wires (2 red, 2 yellow, and 2 black) and strip off about ¼”
of insulation at both ends of each wire.
Photos from Tod
Kurt’s Spooky Projects with Arduino
![Page 15: Thursday Week 3: Analog Input Theory and Practice of ... · Thursday Week 3: Analog Input 11 Theory and Practice of Tangible User Interfaces 1. RGB LED Fade 2. Strip wires 3. Solder](https://reader034.vdocuments.mx/reader034/viewer/2022051922/600fbf71646b1717b721699f/html5/thumbnails/15.jpg)
Thursday Week 3: Analog Input
15
Theory and Practice of Tangible User Interfaces
1. RGB LED Fade
2. Strip wires
3. Solder wires to pot
4. Control one LED
5. Control LED(s) with multiple pots
In Class Exercise
![Page 16: Thursday Week 3: Analog Input Theory and Practice of ... · Thursday Week 3: Analog Input 11 Theory and Practice of Tangible User Interfaces 1. RGB LED Fade 2. Strip wires 3. Solder](https://reader034.vdocuments.mx/reader034/viewer/2022051922/600fbf71646b1717b721699f/html5/thumbnails/16.jpg)
Thursday Week 3: Analog Input
16
Theory and Practice of Tangible User Interfaces
Potentiometers
to GND
to 5V
to Analog In
Solder the wires to your pots. Solder the wires for two pots.
![Page 17: Thursday Week 3: Analog Input Theory and Practice of ... · Thursday Week 3: Analog Input 11 Theory and Practice of Tangible User Interfaces 1. RGB LED Fade 2. Strip wires 3. Solder](https://reader034.vdocuments.mx/reader034/viewer/2022051922/600fbf71646b1717b721699f/html5/thumbnails/17.jpg)
Thursday Week 3: Analog Input
17
Theory and Practice of Tangible User Interfaces
SolderingHeating the joint, not the solder. Use lead-less solder.
1 2 3Heat the joint, not the solder
Melt the solder Release the solder
Illustrations from http://www.chaneyelectronics.com/training/soldering.htm
![Page 18: Thursday Week 3: Analog Input Theory and Practice of ... · Thursday Week 3: Analog Input 11 Theory and Practice of Tangible User Interfaces 1. RGB LED Fade 2. Strip wires 3. Solder](https://reader034.vdocuments.mx/reader034/viewer/2022051922/600fbf71646b1717b721699f/html5/thumbnails/18.jpg)
Thursday Week 3: Analog Input
18
Theory and Practice of Tangible User Interfaces
Soldering: Helping Hands
![Page 19: Thursday Week 3: Analog Input Theory and Practice of ... · Thursday Week 3: Analog Input 11 Theory and Practice of Tangible User Interfaces 1. RGB LED Fade 2. Strip wires 3. Solder](https://reader034.vdocuments.mx/reader034/viewer/2022051922/600fbf71646b1717b721699f/html5/thumbnails/19.jpg)
Thursday Week 3: Analog Input
19
Theory and Practice of Tangible User Interfaces
Soldering: SafetyPlease wear safety goggles! It’s stylish!
![Page 20: Thursday Week 3: Analog Input Theory and Practice of ... · Thursday Week 3: Analog Input 11 Theory and Practice of Tangible User Interfaces 1. RGB LED Fade 2. Strip wires 3. Solder](https://reader034.vdocuments.mx/reader034/viewer/2022051922/600fbf71646b1717b721699f/html5/thumbnails/20.jpg)
Thursday Week 3: Analog Input
20
Theory and Practice of Tangible User Interfaces
1. RGB LED Fade
2. Strip wires
3. Solder wires to pot
4. Control one LED
5. Control LED(s) with multiple pots
In Class Exercise
![Page 21: Thursday Week 3: Analog Input Theory and Practice of ... · Thursday Week 3: Analog Input 11 Theory and Practice of Tangible User Interfaces 1. RGB LED Fade 2. Strip wires 3. Solder](https://reader034.vdocuments.mx/reader034/viewer/2022051922/600fbf71646b1717b721699f/html5/thumbnails/21.jpg)
Thursday Week 3: Analog Input
21
Theory and Practice of Tangible User Interfaces
Controlling your LED with a Potentiometer
![Page 22: Thursday Week 3: Analog Input Theory and Practice of ... · Thursday Week 3: Analog Input 11 Theory and Practice of Tangible User Interfaces 1. RGB LED Fade 2. Strip wires 3. Solder](https://reader034.vdocuments.mx/reader034/viewer/2022051922/600fbf71646b1717b721699f/html5/thumbnails/22.jpg)
Thursday Week 3: Analog Input
22
Theory and Practice of Tangible User Interfaces
Controlling an LED with a Pot
Make one LED to dim and blink at different rate
![Page 23: Thursday Week 3: Analog Input Theory and Practice of ... · Thursday Week 3: Analog Input 11 Theory and Practice of Tangible User Interfaces 1. RGB LED Fade 2. Strip wires 3. Solder](https://reader034.vdocuments.mx/reader034/viewer/2022051922/600fbf71646b1717b721699f/html5/thumbnails/23.jpg)
Thursday Week 3: Analog Input
23
Theory and Practice of Tangible User Interfaces
1. RGB LED Fade
2. Strip wires
3. Solder wires to pot
4. Control one LED
5. Control LED(s) with multiple pots
In Class Exercise
![Page 24: Thursday Week 3: Analog Input Theory and Practice of ... · Thursday Week 3: Analog Input 11 Theory and Practice of Tangible User Interfaces 1. RGB LED Fade 2. Strip wires 3. Solder](https://reader034.vdocuments.mx/reader034/viewer/2022051922/600fbf71646b1717b721699f/html5/thumbnails/24.jpg)
Thursday Week 3: Analog Input
24
Theory and Practice of Tangible User Interfaces
Controlling multiple LEDs with multiple Pots
Option 1:
control one LED with two pots
Option 2:
control three LEDs
with three pots
![Page 25: Thursday Week 3: Analog Input Theory and Practice of ... · Thursday Week 3: Analog Input 11 Theory and Practice of Tangible User Interfaces 1. RGB LED Fade 2. Strip wires 3. Solder](https://reader034.vdocuments.mx/reader034/viewer/2022051922/600fbf71646b1717b721699f/html5/thumbnails/25.jpg)
Thursday Week 3: Analog Input
25
Theory and Practice of Tangible User Interfaces
Soldering
Be careful: It could be 1000 degrees!
![Page 26: Thursday Week 3: Analog Input Theory and Practice of ... · Thursday Week 3: Analog Input 11 Theory and Practice of Tangible User Interfaces 1. RGB LED Fade 2. Strip wires 3. Solder](https://reader034.vdocuments.mx/reader034/viewer/2022051922/600fbf71646b1717b721699f/html5/thumbnails/26.jpg)
Thursday Week 3: Analog Input
26
Theory and Practice of Tangible User Interfaces
Next ThursdaySensor 2: Force sensitive resistors and photocells
Arduino as an interface board: Processing
Read Intro to Processing at processing.org
![Page 27: Thursday Week 3: Analog Input Theory and Practice of ... · Thursday Week 3: Analog Input 11 Theory and Practice of Tangible User Interfaces 1. RGB LED Fade 2. Strip wires 3. Solder](https://reader034.vdocuments.mx/reader034/viewer/2022051922/600fbf71646b1717b721699f/html5/thumbnails/27.jpg)
Thursday Week 3: Analog Input
27
Theory and Practice of Tangible User Interfaces
Thanks!