This lab dealt with analog input for our Arduino. The difference between analog and digital inputs is that analog inputs take in a certain amount of voltage and convert it to a digital number while digital inputs can not change voltage. A good example of this is a potentiometer can change the voltage running through it from 0 to 5 volts.
Cal and I started off this lab by wiring a potentiometer, an LED, and a resistor to our breadboard. We then got to see first-hand how the potentiometer worked. As the dial was turned, the intensity of the light would increase/decrease depending on which way the dial was turned. This was the increase/decrease in voltage across the potentiometer.
Next, we moved on to the photo resistor section of the lab. This required some of the same components such as the LED and the 560 Ohm resistor. However, there were a few new components to the circuit. These components were a photo resistor and a 10K Ohm resistor. The photo resistor uses the same principles as the potentiometer, but uses light intensity to change the voltage. A low voltage was produced when the sensor is under bright light and a high voltage is produced when the sensor is under low-light. This is sort of confusing since common sense would think it would be the other way around.
|
This is the LED being lit up while minimum light is being input into the photo resistor. |
|
This is the LED being lit up while a high amount of light is being picked up by the photo resistor. |
After completing the photo resistor circuit, Cal and I moved on to the temperature sensor. The temperature sensor we used has three pins (ground, 5 volts, and signal). This sensor outputs 10 millivolts per degree centigrade on the signal pin. This allows this sensor to measure temperatures below freezing. The proper code was obtained from the maker of the sensor's website which allowed us to view the current degrees Fahrenheit of the environments we were measuring.
The final section of the lab consisted of wiring in a pressure sensor. This sensor was very similar to the potentiometer. Instead of turning a knob, this changes voltage by using pressure applied to the sensor. The resistance is high when there is no pressure, and the resistance is low when there is high resistance.