Lab 6 - Optical illusions for the lazy scientist

Assignment: DC Motor: Actuation Assignment 1

Collaborators:

Here I demonstrate Benham's artificial spectrum top (from Nature, 51:113-114, 1894), which gives the viewer the illusion of seeing color from moving black and white hues. Catering to the lazy scientist, this Benham's top spins with a push of a button. The button is just a force sensing resistor (FSR), which goes through the Arduino to turn on a small DC motor that rotates a disk with black and white patterns on it.

This illusion of color from moving black and white hues is referred to as pattern-induced flicker colors or Fechnel colors. They are subjectively perceived. They are thought to arise from network interactions between the three different types of color-perceiving sensors in the retina, namely the red, green, and blue cones, which have different time latencies in detecting light.

Attached are photos of the disks that produce the optical illusion of color. Below is a short video example of the optical illusion:

 

 

Below is my code.

/*
* a FSR controls one motor
* modified version of AnalogInput
* by DojoDave <http://www.0j0.org>
* http://www.arduino.cc/en/Tutorial/AnalogInput
* Modified again by dave
*/

int FSRPin = 0; // select the input pin for the FSR
int motorPin = 9; // select the pin for the motor
int val = 0;      // variable to store the value coming from the sensor

void setup() {
Serial.begin(9600);
}
void loop() {
val = analogRead(FSRPin);    // read the value from the sensor, between 0 - 1024
Serial.println(val);
analogWrite(motorPin, 255 - val/4); // analogWrite can be between 0-255
}