Your cart is currently empty!
What is Pulse Width Modulation?
In this tutorial you will learn about Pulse Width Modulation (PWM) and how it is used in industrial applications as well as the PWM configuration in the control software (MapleLogic).
What is Pulse Width Modulation (PWM)
Pulse Width Modulation (PWM) is a technique used in electronics to control the average power delivered to a load by varying the width of the pulses in a periodic waveform. In PWM, a fixed frequency signal (the carrier wave) is turned on and off at varying intervals, creating pulses with different widths.
PWM Duty Cycle
The duty cycle is a parameter used in the context of pulse width modulation (PWM). It represents the ratio of the duration when a signal is in the “on” state (high) to the total period of the signal (which includes both the “on” and “off” states). The duty cycle is usually expressed as a percentage.
A higher duty cycle means that the signal is on for a greater portion of the total period, delivering more power to the load, while a lower duty cycle means less power is delivered. The duty cycle is a key parameter in PWM, as it determines the average voltage or current supplied to a device, influencing its behavior or output.

A zero percent duty cycle in the context of Pulse Width Modulation (PWM) means that the signal is always in the “off” state, and there is no time during the period when the signal is in the “on” state.
A 50 percent duty cycle in pulse width modulation (PWM) means that the signal is on for half of the total period. This implies an equal amount of time in the “on” state and the “off” state.
A 75 percent duty cycle in the context of Pulse Width Modulation (PWM) means that the signal is on for 75 percent of the total period.
A 100 percent duty cycle in pulse width modulation (PWM) means that the signal is on continuously throughout the entire period, and there is no “off” state.

A good example of using the duty cycle for PWM is dimming an LED light.
A PWM turns the power on and off, and the perceived output is changed by varying the duty cycle.
It is how the signal is turned on versus turned off.

Above is an example of a 10V LED light.
- 0% Duty Cycle is 0V
- 25% is 2.5V
- 50% is 5V
- 75% is 7.5V
- 100% is 10V
The LED would be dim at a lower duty cycle and brighter the higher the duty cycle gets, 100% being the brightest.
PWM Frequency
Pulse Width Modulation (PWM) frequency refers to the rate at which the PWM signal repeats its cycle, measured in Hertz (Hz). It represents how quickly the signal oscillates between the “on” and “off” states.

For LED light dimming, PWM frequencies are often in the kilohertz range, typically above 1 khz.
An example of something that requires 100 Hz to several kilohertz would be a DC motor or three phase AC motors. For motors, higher PWM frequencies generally offer smoother control and quieter operation.
PWM Configuration in MapleLogic
Below is MapleLogic. Next, we’ll cover the PWM configurations.
Once you create a project using a Maple Modular PLC (The Maple Micro PLC doesn’t have the PWM feature),
Go to Program — right click on new program — select PWM for PLC-ES — click OK.

The window in the image below, will then open.
The PWM Configuration window would be utilized if your PWM settings are intended to be constant without the need for automation.

1. Slot: Choose a slot number for the PWM module according to where it is placed in your IO Chassis.
2. Channel Group: There are 12 total PWM outputs for the PWM module. Here is where you would select Channels 1-4, 5-8 or 9-12. This depends on the amount you are configuring.
3. Online Edit: This initiates any changes made to the configurations and saves to the PLC while you are online.
4. Frequency Value and Change Time: These settings can also be configured by channel group 1-4, 5-8, 9-12. The PWM module has max frequency rate of 4,000 htz. Change time is the amount of time it takes for the device or system to go from one frequency to the next. In many applications, a shorter frequency ramp time is preferred to enable rapid and accurate frequency changes.
5. High Speed Output Enable Selection: Check off the channel you are using. Each channel can be configured individually.
6. Duty Ratio and Change Time: Set these according to your Duty Cycle. The max range for the PWM module is 100% Duty Cycle. This is according to how long the signal or pulse is in the “ON” state. Change Time is the time taken for the duty cycle to change from one value to another. A shorter ramp time indicates a quicker transition from one duty cycle to another.
7. Write: Once you have everything configured, click “Write” to initiate the settings with the PLC.
8. Initialize: Pressing this will reset all the settings in the configuration window.

For example, the settings above can be used to control the speed of a 24V DC motor. At 1000 Htz (Frequency Value), you can ramp up the motor from 0 to 100% Duty Cycle (Duty Ratio) over a period of 10 seconds (1000-Duty Ratio Change Time).
PWM Module Buffer Memory
Besides using the PWM Configuration GUI, you can also use the PWM Module Buffer Memory to automate your process.
This could be utilized if you need to perform full automation. Using the buffer memory allows you to turn bits ON and OFF that control the PWM Module Channels, Frequency, Duty Cycle, Frequency Ramp Time and Duty Cycle Ramp Time within ladder diagram logic.
This will be covered in full detail in the How to Control the Speed of a Motor Using Pulse Width Modulation tutorial page.
The PWM Buffer Memory can be found in the MapleLogic Help Files under PLC-ES > PWM Module > Buffer Memory.

Resources & Documentation
Maple PLC/MapleLogic Resources
- MapleLogic Programming Software
- MapleLogic User Manual
- Maple Modular User Manual
- PWM Output User Manual
- Maple Modular PLC Terminal Block & Cables
More
Tutorials
Sample Projects
See our Support Center for a complete list of Quick Start and Installation Guides

About the Author