Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Android Things Quick Start Guide

You're reading from  Android Things Quick Start Guide

Product type Book
Published in Aug 2018
Publisher Packt
ISBN-13 9781789341799
Pages 192 pages
Edition 1st Edition
Languages
Author (1):
Raul Portales Raul Portales
Profile icon Raul Portales

PWM overview

PWM is an output digital signal that is commonly used to apply a proportional control signal to an external device using a single digital output pin.

PWM is a square wave (no intermediate values, only 0 and 1) that oscillates according to a given frequency and duty cycle. It encodes the information in the length of the pulse, hence its name. A Pulse Width Modulation signal has two components:

  • Frequency (expressed in Hz), which describes how often the output pulse repeats
  • Duty cycle (expressed as a percentage), which describes the amount of time the pulse is on

For example, a PWM signal set to 50% duty is active for half of each cycle:

You can adjust the duty cycle to increase or decrease the amount of time the signal is on, which is reflected in the average value of it (the analog equivalent). The following diagram shows how the signal looks like with 0%, 25%, and...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}