0% found this document useful (0 votes)
70 views3 pages

Arduino PWM Analog Output Lab

This document describes an experiment using an Arduino board to implement analog output in the form of pulse width modulation. The objectives are to learn how PWM works. The theory section defines duty cycle and how PWM can produce variable average output voltages. Instructions are given to connect components like an LED and potentiometer and write code to control the LED intensity with the potentiometer reading.

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)
70 views3 pages

Arduino PWM Analog Output Lab

This document describes an experiment using an Arduino board to implement analog output in the form of pulse width modulation. The objectives are to learn how PWM works. The theory section defines duty cycle and how PWM can produce variable average output voltages. Instructions are given to connect components like an LED and potentiometer and write code to control the LED intensity with the potentiometer reading.

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/ 3

CPET11L-M - Microprocessor and Microcontroller Systems, Lab

Experiment Number 6

Analog Output (PWM)


Objectives:
To learn how to implement analog output from the Arduino board in
the form of Pulse Width Modulation (PWM).
Theory:
For a square wave, the duty cycle is defined as:

.
A PWM signal is a variable duty cycle signal.
When the duty cycle is zero, then the average
output is 0 V. When the duty cycle is 100%,
then the average output is at its maximum
value (+5V in Arduino). As the duty cycle
increases from 0 to 100%, the average output
voltage increases, and vice versa.
Instructions:
(analog.Write). See the instruction reference book.
Equipment:
• Arduino UNO board
• LDE
• 220 resistor
• potentiometer Procedure:
1. Connect the circuit of Fig.1.
2. Write a program to read the input analog signal
and use it to control the intensity of the LED.
3. Display the intensity as a percentage (%) on the
serial monitor GUI.
Discussion:
Fig. 1

Page 1 of 3
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 the program of an Arduino based dc motor speed control using a
potentiometer.

 Your program in tinkercad.


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

Page 2 of 3
Prepared by: Jonel R Macalisang
Page 3 of 3
Prepared by: Jonel R Macalisang

You might also like