Sie sind auf Seite 1von 6

CENTRAL PHILIPPINE UNIVERSITY

COLLEGE OF ENGINEERING
ILOILO CITY, PHILIPPINES

LABORATORY EXPERIMENT NO. 3


ANALOG TO DIGITAL CONVERSION

Submitted to:
Engr. Ramon Alguidano, Jr.

Submitted by:
Agoncillo, Mark Geoffel
Celestino, Ian Louise
Miado, Alistair Ray

I. OBJECTIVES
a.) To familiarize analog to digital signal conversion function of Arduino
b.) To familiarize the Voltage Reader function and its corresponding program.
c.) To familiarize the Temperature Sensor function and its corresponding program.
II. THEORY
By turning the shaft of the potentiometer, it can effect change on the amount of resistance
on either side of the wiper which is connected to the center pin of the potentiometer. This
changes the voltage at the center pin. When the resistance between the center and the side
connected to 5 volts is close to zero (and the resistance on the other side is close to 10 kilohms),
the voltage at the center pin nears 5 volts. When the resistances are reversed, the voltage at the
center pin nears 0 volts, or ground. This voltage is the analog voltage that is read as an input.
The microcontroller of the board has a circuit inside called an analog-to-digital converter
or ADC that reads this changing voltage and converts it to a number between 0 and 1023. When
the shaft is turned all the way in one direction, there are 0 volts going to the pin, and the input
value is 0. When the shaft is turned all the way in the opposite direction, there are 5 volts going
to the pin and the input value is 1023. In between, analogRead() returns a number between 0 and
1023 that is proportional to the amount of voltage being applied to the pin.
The LM35 series are precision integrated-circuit temperature devices with an output
voltage linearly-proportional to the Centigrade temperature. The LM35 device has an advantage
over linear temperature sensors calibrated in Kelvin, as the user is not required to subtract a large
constant voltage from the output to obtain convenient Centigrade scaling. The LM35 device does
not require any external calibration or trimming to provide accuracies of +/- 1/4C at room
temperature and +/- 3/4C over a full -55C to 150C temperature range.
II. Diagram
A.) Voltage Reader

B.) Temperature Sensor

IV. MATERIALS/EQUIPMENTS
a.) Gizduino board
b.) Personal computer
c.) Power supply
d.) Trainer kit
e.) Connecting Wires
f.) Potentiometer

V. PROCEDURE
A. Voltage Reader
1.)

Prepare all the materials/equipment for this experiment.

2.)

Get an Arduino board and USB cable.

3.)

Connect the three wires from the potentiometer to your board.

4.)

The first goes to ground from one of the outer pins of the potentiometer.

5.)

The second goes to 5 volts from the other outer pin of the potentiometer.

6.)

The third goes from the middle pin of the potentiometer to analog input 2.

7.)

Code the program and download it into the Arduino board.

8.)

Run the program on the Arduino board and open the serial monitor to check the
output values.

B.) Temperature Sensor


1.)

Prepare all the materials/equipment for this experiment.

2.)

Get an Arduino board and USB cable.

3.)

Connect the temperature sensor to board

4.)

Connect the +Vs to +5v on your Arduino board.

5.)

Connect Vout to Analog0 or A0 on Arduino board.

6.)

Connect GND with GND on Arduino.

VI. Results

A.) Voltage Reader

B.) Temperature Sensor

Das könnte Ihnen auch gefallen