Course Number: ECET 340
Lab 3: Pulse Width Modulation (PWM)
Pulse width modulation (PWM) techniques have many applications in the fields of consumer electronics, industrial and telecommunication. PWM can be used to provide variable speed for motors, to generate audio signals, to control brightness in smart lighting system, etc.
In this lab, we will learn how to generate PWM with varying frequencies and duty cycles using Arduino function analogWrite(). We will learn how to use the Proteus virtual OSCILLOSCOPE to display the PWM signals.
• Determine PWM output level based on the effective voltage
• Write code to program PWM on Arduino mega2560
IBM PC or Compatible with Windows 2000 or Higher
Proteus VSM 8.8 from Citrix
Step 1 Create a new Proteus project called PWM.pdsprj. Draw the schematic diagram in Schematic Capture pane as shown in Figure 1. See step 2 for how to pick the virtual terminal and oscilloscope.
Figure 1. Schematic for PWM.pdsprj
Step 2 Click the Instrument mode icon to pick the OSCILLOSCOPE. The OSCILLOSCOPE has four channels. In this lab, channel A (YELLOW) and channel B (BLUE)are used to display the PWM waveforms.
Figure 2. Select OSCILLOSCOPE
Step 3 Enter the C/C++ codes in the Source Code pane as shown below:

Please click on the download link below to get the answer for the above tutorial:

Leave a Comment