Labs‎ > ‎

Perception

This lab explores the fundamentals of the human visual system using an Arduino and other components. Find out how to trick your brain into seeing things that aren't really there. Find out why there are no purple lasers. Find out why your screen doesn't make yellow photons.

Prelab Questions

1. What is persistence of vision? What is the flicker fusion threshold?

2. What is the purpose of a current limiting resistor? Using a 5V supply and a 1k current limiting resistor, what will be the current through an LED if the turn on voltage is 2V?

3. What is pulse width modulation? How can it be used to control an RGB LED?

4. Compare and contrast the RGB, HSV, and CMYK colorspaces.


Assembling the Breakout Boards

The two main components used in this lab are an RGB LED and a Color Light Sensor. The kit includes two breakout boards that will allow you to interface these components with the Arduino.

Assembled RGB LED and Light to Frequency (L2F) breakout boards

To assemble the boards, gather the necessary components.
  • RGB LED
  • TAOS L2F
  • 1k resistor (x3)
  • 40 pin male header (cut off one 6 pin header, one 4 pin header, and one 2 pin header)
First, solder in the RGB and the current limiting resistors. (The kits use 1k current limiting resistors.) If you are new to soldering, here is a helpful guide. The LED has a straight edge on one side. Make sure the orientation of the LED matches the outline on the board. Second, solder the L2F. Make sure the orientation of the L2F is correct. Pin one is labeled P1 on the board. Here is a helpful guide to soldering surface mount parts. Finally solder on the male headers.
  

Flicker Fusion
RBG LED Breakout board on the Arduino

Insert the RGB LED breakout board 
in pins 8-11 
on the Arduino. Load FlickerFusion.pde and a

djust the delay time until the LED appears to be constantly on. (You may need to use delayMicroseconds instead of delay.) What frequency is this? Confirm the LED is still flashing by waving your hand in front of the LED. Repeat the experiment with the LED in your peripheral vision. Repeat these experiments for each color of the LED. Is there any difference in the frequency?



Color Mixing

Load ColorMixing.pde and e

xplore the RGB colorspace. What colors are produced with RGB coordinates (0,255,255) (255,0,255) (255,255,0)? Now try to find the RGB coordinate to match colors from Wikipedia's Shades of Color. What are some reasons why it is hard to get an exact match?



Analyzing Color
L2F Breakout Board on the Arduino

Insert the L2F breakout board 
in pins 2-9 
on the Arduino. Load AnalyzingColor.pde and open the Serial Monitor. This program uses the TCS230 library, which must be included in your Sketchbook folder in "/libraries/TCS230". This library was created using a modified version of the code available here. Examine the program and the library. What does the program do? How would you modify this program to output a physical quantity such as irradiance? Point the L2F at your monitor and record the relative levels of red, green, and blue in each color in the image below.



Analyzing Brightness

The TCS230 can be used to measure relative brightness. Measure the relative brightness of the following objects inside.

  • White paper

  • Black paper

  • White paper illuminated with a flashlight

  • Black paper illuminated with a flashlight

  • Computer monitor (white)

  • Computer monitor (black)

Now repeat the measurements outside. How bright is the black paper outside? How does this brightness compare to with the white paper inside? Can you see the flashlight on the papers outside? Estimate the contrast ratio of the monitor (inside and outside).

Subpages (1): Perception Files
Comments