Text preview for : 5989-6673EN PWM Waveform Generation Using the U1252A Handheld Digital Multimeter - Application Note part of



| Home

Keysight Technologies
PWM Waveform Generation
Using U1252B DMM


Application Note
Introduction

Square wave is a unique function for many applications such as pulse width modulation (PWM). PWM is
widely used in a variety of measurement and digital control applications. It offers a simple method for digital
control logic to create an analog equivalent. Most of today's microcontrollers have built-in PWM capability
that simplifies the control's implementation. PWM is widely-used in communication systems because the
digital signals are more robust and less vulnerable to noise.

This application note provides an overview of PWM and shows how the feature-packed Keysight Technolo-
gies, Inc. U1252B handheld digital multimeter (DMM), with a built-in programmable square wave generator,
can be used to create PWM signals.


What is Pulse Width Modulations
PWM is a method of digitally encoding analog signal levels. By digitally controlling analog circuits, system
cost and power consumption can be drastically reduced. Many microcontrollers and digital signal proces-
sors (DSPs) already include the PWM controller chip, thus making implementation easier.
Frequency and Duty Cycle

Figure 1 shows a circuit with a battery, switch, and LED. This circuit turns on the
LED for one second and then turns off the LED for one second using the switch
control.

The LED is ON for 50% of the period and OFF the other 50%. The period is
defined as the total time taken to complete one cycle (from OFF to ON state and
back to OFF state).

The signal can be further characterized by duty cycle, which is the ratio of the
ON time divided by the period. A high duty cycle will generate a bright LED while
a small duty cycle will generate a dimmer LED. The example shown in Figure 1
provides a 50% duty cycle.

The duty cycle of a square wave is modulated to encode a specific analog
signal level using high-resolution counters. The PWM signal remains a digital
signal because the DC supply is either ON or OFF. The voltage or current source
is supplied to the analog load by repeating a series of ON and OFF pulses.
When On, the DC supply is applied to the load and when OFF, the DC supply is
switched off.

Referring to Figure 2, two waveforms with different frequencies produce the
same amount of light. Note that the amount of light is independent from the
frequency, but proportional to the duty cycle.

The frequency range used to control a circuit is limited by the response time to
the circuit. From the example shown in Figure 1, a low frequency can cause the
LED to flash noticeably. Whereby, a high frequency can cause an inductive load
to saturate. For example, a transformer has a limited frequency range to transfer
the energy efficiently.

For some designs, harmonics (or beat frequencies) of the PWM frequency
can get coupled into the analog circuitry, causing unwanted noise. If the right
frequency is selected, the load being controlled will act as a stabilizer, a light
will glow continuously, and the momentum will allow a rotor to turn smoothly.




LED


Frequency: 100 Hz
Duty cycle: 75%

50%
ON Frequency: 200 Hz
Duty cycle: 75%
OFF


Figure 1. A simple circuit for controlling the brightness Figure 2. Two pulses with the same duty cycle
of a LED using PWM




3
Generating PWM Signals

The PWM signals are easy to Sine wave
generate using a comparator with a +
generator
sine wave as one of the input signals.
Comparator PWM output
As an example, Figure 3 shows a
block diagram of an analog PWM
Input signal