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.
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
Assembled RGB LED and Light to Frequency (L2F) breakout boards
To assemble the boards, gather the necessary components.
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.
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?
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?
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.
RGB Color Mixing Sample
The TCS230 can be used to measure relative brightness. Measure the relative brightness of the following objects inside.
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).