Sensing: Potentiometers

Start Date: Thursday, September 17, 2009

Due Date: Wednesday, Midnight of September 23, 2009

Description: Digitize potentiometer input and use pulse width modulation of LEDs as output, variable resistors as sensors.

Before the Lab

You should have already successfully built the 3 LED (RGB) circuit and gotten them to fade with various color combinations. Congratulations!

In Lab Exercise

Objective

In this lab, we explore analog input. Specifically, we’ll be looking at variable resistance devices known as potentiometers or “pots” for short. In exploring analog input, we will use Arduino to read pot values and control the LEDs as a function of the pot. We’ll also be moving away from the more elementary circuit diagrams to the more advanced circuit schematic diagrams.

Activities

Part 1 – Soldering

1) Take 1 red, 1 black, 1 yellow wires, and 1 pot (One pot is in your kit).

2) Strip off about ¼” of the insulation from each of these wires.

3) Solder wires to the pot.

gt; a) Soldering often requires more than 2 hands. That’s why we have “helping hands”. Use them like in the image below to secure your pot and your wire.

b) To solder, you place the soldering iron on the wire/terminal and heat the joint, then apply the solder (keep the tip on the joint), remove the solder, then remove the iron in that order.

c) Let it cool before moving it around (it’ll take just a few seconds)

 

Part 2 – Controlling Single LED from Single Pot

1) Extend your 3 LED circuit so that it includes a pot. Follow the circuit diagrammed below

2) On the course website, there are two programs which allow you to use the pot to control the brightness of an LED or the blinking speed of the LED. Make sure the pins in the code match the pins you used for the LEDs and the pot.

 

Part 3 – Multiple Pots Controlling Multiple LEDs

1) There are two options for this part.

a) Use one pot to control the brightness and the other pot to control the blinking.

b) Use three pots, each pot controls the brightness of RGB Hue/Colors. (You will need to get extra pots from us and solder on the wires).

2) Extend your circuit to include two or three pots. The circuit diagram and image for three pots are given below. The two pot setup is really similar.

3) On the website is code that allows you to use 3 pots (2a) or 2 pots (2b). Make sure the pins in the code match the pins you used for the LEDs and the pot.

Homework (Due Sept 23 midnight, 2009)

Use multiple pots to control your LEDs

Option 1: One pot controls brightness, another pot controls blinking

Option 2: 3 Pots for 3 LEDs (each pot controls brightness of RGB Hue / colors

Extra point:

Come up with an interesting mapping between the rotational position pot and LED output.

 

Useful Readings in Physical Computing:

  • Analog input: p. 102-104
  • Soldering: p. 41-42

Click here to post your assignment

 

Lecture slides:

Week 4 Lab: Potentiometers

 

Attachment Size
1a_SinglePotControlsBrightness.txt 581 bytes
1b_SinglePotControlsBlinking.txt 970 bytes
2a_Control3LEDsWith3Pots.txt 3.44 KB
2b_OnePotControlsBrightnessOnePotControlsBlinking.txt 1.22 KB