PWM Concepts Illustrated with an Oscilloscope

R Jordan Kreindler introduces PWM concepts using an ESP32 board and oscilloscope.

Jeremy Cook
5 years ago

PWM, AKA pulse width modulation, is used to control a wide variety of devices, from lighting intensity, to servo positions, and more. We often take this for granted, but if you really want to see what’s going on, there’s no better way to visualize the process than with an oscilloscope. In his article, R Jordan Kreindler elaborates on how to do so in a good amount of detail.

This type of PWM control/visualization is shown in the video below, with the increasing and decreasing pulse width shown on an oscilloscope, while a red LED pulses on and off in turn. To generate this series of pulses, Kreindler is using an ESP32 development board, and notes that other ESP32 boards should work as well — or even an Arduino Uno. He also mentions that he’s using a 10mm red LED, but other LEDs will do the same thing, though you’ll need to consider their different voltage requirements.

Code is laid out in the write-up, and to hook things up you’ll need to add two new jumpers to the breadboard setup in the second video. With everything properly set up (he even goes over how to calibrate the scope), you can see the pulses increasing and decreasing and the LEDs reaction. Although many readers will have some knowledge of these concepts, seeing things on an oscilloscope can be a great way to cement things in your mind. This is also a great way to introduce novices to this type of simulated analog output!

Jeremy Cook
Engineer, maker of random contraptions, love learning about tech. Write for various publications, including Hackster!
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles