Monday, September 24, 2012

Lab: Analog Input

Overview:

The purpose of this lab was to practice preforming analog input with the Arduino.

Twisting:

For this circuit, I used a potentiometer connected the pins used for analog input which take a voltage (say 5 volts) and convert it to a digital number between 0 and 1023 (which is 5 volts). This is useful for a potentiometer because it allows a varying amount of resistance. I added an LED so that the varying resistance could be seen and then gave it code that make the LED blink at decreasing and increasing speeds depending on the twisting of the potentiometer.

Light:

I used photo resistors which sense the relative light for this light circuit which is useful for when I want it to be environmentally controlled. When the sensor is well lit a low value of light is produced, but when the sensor is in the dark it will produce a high value of light.

Temperature:

I used a temperature sensor made by another student which allowed me to measure temperature by an integrated circuit inside of the transistor. The Arduino takes in the values as digital values and then I used some math to convert it to degrees. I then used the debug window to output the value on the monitor!

Squeezing:

For this circuit I used a force sensitive resistor that is similar to a potentiometer used earlier except that its resistance varies with pressure instead of position. When there is no pressure the resistance is high and low when the pressure is high.

Problems:

When working with the temperature sensor, I continued to get incorrect readings. The problem was in my code. Make sure your conversions make sense mathematically or the values will be incorrect.

For more Information:

No comments:

Post a Comment