0% found this document useful (0 votes)
26 views4 pages

LAB ACTIVITY 5 Analog Input

The document describes an experiment using an Arduino board to read analog input voltages from a variable resistance and display the readings on a serial monitor. It involves connecting a circuit, writing a program to read the analog voltages every second at different scales and baud rates, and comparing using transistors versus relays for driving loads.

Uploaded by

Aldrin Mndz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views4 pages

LAB ACTIVITY 5 Analog Input

The document describes an experiment using an Arduino board to read analog input voltages from a variable resistance and display the readings on a serial monitor. It involves connecting a circuit, writing a program to read the analog voltages every second at different scales and baud rates, and comparing using transistors versus relays for driving loads.

Uploaded by

Aldrin Mndz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

CPET11L-M - Microprocessor and Microcontroller Systems, Lab

Experiment Number 5

Analog Input

To learn how to implement analog input using the Arduino board.


Instructions:
(analogRead, and map). See the instruction reference book.
Equipment:
• Arduino UNO board
• A variable resistance
Procedure:
1. Connect the circuit of Fig.1.
2. Write a program to read the analog voltage on the AN0 pin, and
display it on the serial monitor GUI every 1 second.
3. Repeat step 2 with scaling the analog voltage readings to the range (0-
5)V.
4. Repeat step 3 using a different baud rate.

Fig. 1
Discussion:
Design and write the program for an Arduino based system to read two
analog signals continuously. Pin 13 is ON when Sig1>Sig2. Otherwise, pin
13 is OFF.

Page 1 of 4
Prepared By; Jonel R Macalisang
Equipment:
• Arduino UNO board
• npn transistor
• DC motor
• DC power supply

Theory:
 When the load requires an amount of current greater than that can be
supplied by the output pins of the Arduino card, then a driving circuit
must be used.
 The driving circuit connects/disconnects the load to an external power
supply under the control of an Arduino output pin.
 This switching action is implemented by using a transistor or a relay.
Procedure:
1. Connect the circuit of Fig.1.
2. Write a program to turn the CD motor ON and OFF every 1 second.
3. Connect the circuit of Fig. 2, and repeat step 2.

Fig. 1 Fig. 2

Discussion:
1. Compare between using transistors and relays from the driving
capability, size, and cost points of view.

Page 2 of 4
Prepared By; Jonel R Macalisang
Results and Discussion of Method of Exercises (Individual)
(Screenshot, Code and Discussion, follow the guidelines below.)

Include relevant schematic diagrams, charts, visualizations, code snippets, and


program outputs for each required problem or task. Please provide insights,
commentaries, or explanations regarding the data. If an explanation requires the support
of literature such as academic journals, books, magazines, reports, or web articles
please cite and reference them using the IEEE format.
Please take note of the styles on the style ribbon as these would serve as the style
format of this laboratory report. The body style is Times New Roman size 12, line
spacing: 1.5. Body text should be in Justified alignment, while captions should be center-
aligned. Images should be readable and include captions. Please refer to the sample
below:

If an image is taken from another literature or intellectual property, please cite


them accordingly in the caption. Always keep in mind the Honor Code [1] of our course
to prevent failure due to academic dishonesty.

Supplemental Activities (By Group)


Write a program that do the ff:
Design and write a program for an Arduino based system that controls the
ON/OFF switching of an 4 AC lamp using a switch.

 Your program in tinkercad.


 Flowchart
 Block Diagram
 Schematic Diagram
 Discussion of the Supplementary activities.

Page 3 of 4
Prepared By; Jonel R Macalisang
Page 4 of 4
Prepared By; Jonel R Macalisang

You might also like