Wednesday, September 30, 2009

Lab4-Analog Input

Connect Power from Arduino to Breadboard:
A red wire was connected from the 5V power output of the Arduino to the power column of the breadboard. A black wire was connected from the ground input of the Arduino to the breadboard's ground column. Red and black wires were then connected across the breadboard from power and ground columns to the opposite side power and ground columns.

Potentiometer Input:
A potentiometer was connected to the breadboard's power and ground, and the middle pin was connected to the Analog input pin 3 on the Arduino board.


Add an LED for PWM Output:
A wire was connected from the PWM Digital output pin 9 on the Arduino board to a 330 Ohm resistor on the breadboard. The other side of the resistor was connected to an LED, which in turn was connected to ground.


Load a Program to Control the Arduino:
The provided code was loaded on to the Arduino board. The potentiometer was twisted and the values on the serial output fluctuated accordingly. The LED faded brighter and dimmer as the potentiometer resistance was raised and lowered.

Try other Variable Resistors:
A thermistor was connected to the breadboard's power supply, and the other end was connected to a 10K Ohm resistor. The other end of the 10K Ohm resistor was then connected to ground. This was done to create a voltage divider in the circuit. A wire was connected at the junction between the thermistor and 10K Ohm resistor and connected to the Arduino board analog input pin 3. This was done to sense the changes in voltage in the serial output window.

When a 1K Ohm resistor was inserted in place of the 10K Ohm resistor, the serial output reading rose. This is due to the Ohm's Law ratio changing.

Invent Something:
I decided to create an exhibit of how one aspect of vision works. The rod and cone photoreceptor cells on the retina surface respond to darkness and light(& color) respectively. I simulated this by hooking up a photoresistor to the circuit, and splitting the resulting varied voltage across 2 LED's. When a light shone into the photoresistor, the LED representing the cone cell lit up. When the photoresistor received no light, the LED representing the rod cell lit up.

Here's a video demonstration:
http://www.youtube.com/watch?v=oR5DAbMoOi8

No comments:

Post a Comment