{"id":33555,"date":"2020-06-16T16:06:46","date_gmt":"2020-06-16T08:06:46","guid":{"rendered":"\/blog\/?p=33555"},"modified":"2021-01-15T17:10:32","modified_gmt":"2021-01-15T09:10:32","slug":"basic-electronics-pulse-width-modulationpwm-and-arduino-applications","status":"publish","type":"post","link":"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/16\/basic-electronics-pulse-width-modulationpwm-and-arduino-applications\/","title":{"rendered":"What is Pulse Width Modulation (PWM)? Applications and Accessories"},"content":{"rendered":"\n<p>Having trouble changing the brightness of the LED in your project? Directly changing the power supply voltage in the circuit to accomplish that isn&#8217;t easy. But you can use Pulse Width Modulation (PWM) to help you with that! This can be easily implemented by coding in Arduino.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2020\/06\/What-is-Pulse-Width-Modulation-PWM_-Applications-and-Accessories-1030x579.png\" alt=\"What is Pulse Width Modulation (PWM)? Applications and Accessories\" class=\"wp-image-39722\" width=\"544\" height=\"306\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/What-is-Pulse-Width-Modulation-PWM_-Applications-and-Accessories-1030x579.png 1030w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/What-is-Pulse-Width-Modulation-PWM_-Applications-and-Accessories-300x169.png 300w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/What-is-Pulse-Width-Modulation-PWM_-Applications-and-Accessories-768x432.png 768w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/What-is-Pulse-Width-Modulation-PWM_-Applications-and-Accessories-1536x864.png 1536w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/What-is-Pulse-Width-Modulation-PWM_-Applications-and-Accessories-2048x1152.png 2048w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/What-is-Pulse-Width-Modulation-PWM_-Applications-and-Accessories-1024x576.png 1024w\" sizes=\"(max-width: 544px) 100vw, 544px\" \/><\/figure><\/div>\n\n\n\n<p>In this tutorial, I will cover the following :<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>What is Pulse Width Modulation(PWM)?<\/li><li>Duty Cycle and Frequency of PWM<\/li><li>Application of Pulse Width Modulation(PWM) <\/li><li>Implementing PWM with Arduino<\/li><li>PWM Related Accessories<\/li><\/ul>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">What is Pulse Width Modulation(PWM)?<\/h2>\n\n\n\n<p>Pulse Width Modulation(PWM) is a digital technology that uses the amount of power delivered to a device that can be changed. It generates analogue signals by using a digital source. A PWM signal is basically a square wave which is switched between on and off state. The duty cycle and frequency of a PWM signal determine its behaviour. <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img decoding=\"async\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2020\/06\/pwm-basis-1030x368.png\" alt=\"\" class=\"wp-image-33557\" width=\"551\" height=\"197\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/pwm-basis-1030x368.png 1030w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/pwm-basis-300x107.png 300w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/pwm-basis-768x275.png 768w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/pwm-basis-1024x366.png 1024w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/pwm-basis.png 1398w\" sizes=\"(max-width: 551px) 100vw, 551px\" \/><\/figure><\/div>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Duty Cycle in PWM<\/h3>\n\n\n\n<p>The duty cycle of the PWM signal refers to the ratio of the time that the signal is in a high(on) state over the total time it takes to complete one cycle. It is commonly expressed as a percentage or a ratio. <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img decoding=\"async\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2020\/06\/Figure_1-1030x832.png\" alt=\"\" class=\"wp-image-33556\" width=\"425\" height=\"343\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/Figure_1-1030x832.png 1030w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/Figure_1-300x242.png 300w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/Figure_1-768x620.png 768w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/Figure_1-1536x1241.png 1536w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/Figure_1-2048x1654.png 2048w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/Figure_1-1024x827.png 1024w\" sizes=\"(max-width: 425px) 100vw, 425px\" \/><\/figure><\/div>\n\n\n\n<p>A 50% duty cycle means that the high state takes half of the time and the low state takes the other half of the time, this is the same as an ideal square wave. If this ratio is greater than 50%, the logic high signal takes a longer time than logic low, vice versa. Thus, a 100% duty cycle means the signal is always on(full-scale), and the 0% duty cycle means the signal is always off(grounding). <\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Frequency of PWM signal<\/h3>\n\n\n\n<p>A period is equal to the time this signal completes a one-and-off cycle. The frequency is the number of times a periodic change is completed per unit time and it is the inverse of the period. It determines the speed at which the PWM completes one cycle, which means the speed at which the signal switches between high and low states. If we turn the digital signal on and off repeatedly with a high enough frequency, the output will behave like an analogue signal with a constant voltage. <\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Application of Pulse Width Modulation(PWM) <\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Adjust Brightness of Screen using PWM<\/h3>\n\n\n\n<p>For PWM, adjusting the brightness of the screen does not rely on the power but by alternating on and off of the screen. When the PWM dimming screen is lit, it does not continuously emit light, but it constantly lights up and turns off the screen. If this changes fast enough, our eyes treat is as always on but with different brightness based on different duty cycles. The larger the duty cycle, the brighter the screen.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Other PWM Applications<\/h3>\n\n\n\n<p>There are other applications that use PWM technology, including:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Drive buzzer with different loudness<\/li><li>Control speed of the <a href=\"https:\/\/www.seeedstudio.com\/Motor-Pack-for-Arduino-p-4000.html\">motor<\/a><\/li><li>Control the direction of a <a href=\"https:\/\/www.seeedstudio.com\/Grove-Servo.html\">servo<\/a><\/li><li>Provide an analog output<\/li><li>Generate audio signal<\/li><li>Telecommunication: Encode message<\/li><\/ul>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Implementing PWM with Arduino<\/h2>\n\n\n\n<p>PWM can be implemented in various ways on Arduino. On <a href=\"https:\/\/www.seeedstudio.com\/Seeeduino-V4-2-p-2517.html\">Seeeduino board<\/a>, there are 6 pins(i.e. pin 3, 5, 6, 9, 10, 11 ) which can output a PWM wave with<strong> analogWrite()<\/strong> function. Calling the AnalogWrite() function allows a stable square wave with a specified duty cycle to be generated on the PWM pins. Generally, the frequency of these pins are about 490Hz, and the pin 5 and 6 of <a href=\"https:\/\/www.seeedstudio.com\/Seeeduino-V4-2-p-2517.html\">Seeeduino <\/a>or its similar boards have the frequency of 980Hz. <\/p>\n\n\n\n<p>The output voltage from Arduino pins are 5V, and different duty cycles output different voltage levels as stated  below:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"\"><tbody><tr><td class=\"has-text-align-center\" data-align=\"center\"><strong>Duty Cycle&nbsp;<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>Output Voltage Levels<\/strong><\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">0%<\/td><td class=\"has-text-align-center\" data-align=\"center\">0V<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">25%<\/td><td class=\"has-text-align-center\" data-align=\"center\">1.25V<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">50%<\/td><td class=\"has-text-align-center\" data-align=\"center\">2.5V<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">75%<\/td><td class=\"has-text-align-center\" data-align=\"center\">3.75V<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">100%<\/td><td class=\"has-text-align-center\" data-align=\"center\">5V<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Adjust the Brightness of LED<\/h3>\n\n\n\n<p>To control the brightness of an LED with Arduino with the PWM technique. You can follow the example below:<\/p>\n\n\n\n<p><strong>Hardware<\/strong> <strong>Connection<\/strong><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-11-at-8.48.59-pm-1030x684.png\" alt=\"\" class=\"wp-image-33606\" width=\"515\" height=\"342\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-11-at-8.48.59-pm-1030x684.png 1030w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-11-at-8.48.59-pm-300x199.png 300w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-11-at-8.48.59-pm-768x510.png 768w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-11-at-8.48.59-pm-1536x1020.png 1536w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-11-at-8.48.59-pm-1024x680.png 1024w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-11-at-8.48.59-pm-675x450.png 675w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-11-at-8.48.59-pm.png 1542w\" sizes=\"(max-width: 515px) 100vw, 515px\" \/><\/figure><\/div>\n\n\n\n<p><strong>Software<\/strong><\/p>\n\n\n\n<p>analogWrite() Function Syntax:<\/p>\n\n\n\n<p><code>analogWrite ( pin , value ) ;<\/code>  <\/p>\n\n\n\n<p>The value representing the duty cycle, and the number is between 0(off) and 255(on). <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>int ledPin = 9; \/\/ LED connected to digital pin 9\n\nvoid setup() {\n   pinMode(ledPin, OUTPUT); \/\/ sets the pin as output\n}\n\nvoid loop() {\n   analogWrite(ledPin, 255); \/\/set duty cycle to always on\n}<\/code><\/pre>\n\n\n\n<p>You can change &#8216;255&#8217; to any number between 0~255 for different outputs, or you can modify the code to change the value continuously. <\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">PWM Related Accessories<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/www.seeedstudio.com\/Grove-16-Channel-PWM-Driver-PCA9685.html\">Grove &#8211; 16-Channel PWM Driver (PCA9685)<\/a><\/h3>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2020\/06\/httpsstatics3.seeedstudio.comseeedfile2018-11bazaar995130_perspective-1030x773.jpg\" alt=\"\" class=\"wp-image-33607\" width=\"515\" height=\"387\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/httpsstatics3.seeedstudio.comseeedfile2018-11bazaar995130_perspective-1030x773.jpg 1030w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/httpsstatics3.seeedstudio.comseeedfile2018-11bazaar995130_perspective-300x225.jpg 300w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/httpsstatics3.seeedstudio.comseeedfile2018-11bazaar995130_perspective-768x576.jpg 768w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/httpsstatics3.seeedstudio.comseeedfile2018-11bazaar995130_perspective-1024x768.jpg 1024w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/httpsstatics3.seeedstudio.comseeedfile2018-11bazaar995130_perspective.jpg 1400w\" sizes=\"(max-width: 515px) 100vw, 515px\" \/><\/figure><\/div>\n\n\n\n<p>Have you ever felt anxious because of the limited number of development board PWM output interfaces? Don&#8217;t worry! The Grove &#8211; 16-Channel PWM Driver is based on NXP PCA9685, which is a 16-Channel 12bit I2C PWM driver. This PCA9685 16-Channel 12bit I2C PWM driver board can drive up to 16 servos with external power supply.<\/p>\n\n\n\n<p>Based on the features of NXP PCA9685, this PWM driver board can well meet the needs of multi-channel PWM projects, such as a hexapod walker, MarsCar. Additionally, you can use this board as a LED controller. You can easily control this driver board through the I2C Grove interface.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/www.seeedstudio.com\/Motor-Pack-for-Arduino-p-4000.html\">Motor Pack for Arduino<\/a><\/h3>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2020\/06\/motor-1030x722.png\" alt=\"\" class=\"wp-image-33671\" width=\"515\" height=\"361\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/motor-1030x722.png 1030w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/motor-300x210.png 300w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/motor-768x538.png 768w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/motor-1024x717.png 1024w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/motor.png 1062w\" sizes=\"(max-width: 515px) 100vw, 515px\" \/><\/figure><\/div>\n\n\n\n<p>Motor Pack for Arduino is a perfect kit for you to learn motor with Arduino. Whether your project requires a DC motor, a stepper motor, or a steering gear, all of them can be found in this kit! But do you know how to use PWM to control the motor?<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Use PWM for Motor Control<\/h4>\n\n\n\n<p>For a DC motor, when the load (torque) of the motor is constant, the speed is proportional to the power supply voltage. As discussed above, the output voltage level is determined by the duty cycle of PWM, thus the PWM can be used to control the speed of the motor. <\/p>\n\n\n\n<p><strong>Hardware Connection<\/strong><\/p>\n\n\n\n<p>Similar hardware connection would apply to Motor as well. <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Connect Motor to pin 9 and GND.<\/li><li>You might need to connect a voltage regulator between motor and Arduino, because Arduino can only output voltage which is up to 5V. <\/li><\/ul>\n\n\n\n<p><strong>Software<\/strong><\/p>\n\n\n\n<p>analogWrite() Function Syntax:<\/p>\n\n\n\n<p><code>analogWrite ( pin , value ) ;<\/code>  <\/p>\n\n\n\n<p>The value representing the duty cycle, and the number is between 0(off) and 255(on). <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>int ledPin = 9; \/\/ LED connected to digital pin 9\n\nvoid setup() {\n   pinMode(ledPin, OUTPUT); \/\/ sets the pin as output\n}\n\nvoid loop() {\n   analogWrite(ledPin, 255); \/\/set duty cycle to always on\n}<\/code><\/pre>\n\n\n\n<p>You can change &#8216;255&#8217; to any number between 0~255 for different outputs, or you can modify the code to change the value continuously. <\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Summary<\/h2>\n\n\n\n<p>And that&#8217;s all on PWM! Have you learnt something new through this blog? Hope that we managed to help you with your projects, happy tinkering!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Having trouble changing the brightness of the LED in your project? Directly changing the power<\/p>\n","protected":false},"author":3500,"featured_media":39722,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","_price":"","_stock":"","_tribe_ticket_header":"","_tribe_default_ticket_provider":"","_tribe_ticket_capacity":"0","_ticket_start_date":"","_ticket_end_date":"","_tribe_ticket_show_description":"","_tribe_ticket_show_not_going":false,"_tribe_ticket_use_global_stock":"","_tribe_ticket_global_stock_level":"","_global_stock_mode":"","_global_stock_cap":"","_tribe_rsvp_for_event":"","_tribe_ticket_going_count":"","_tribe_ticket_not_going_count":"","_tribe_tickets_list":"[]","_tribe_ticket_has_attendee_info_fields":false,"iawp_total_views":0,"footnotes":""},"categories":[1],"tags":[6,1961,2175],"class_list":["post-33555","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news","tag-arduino","tag-arduino-led","tag-arduino-motor-control"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>What is Pulse Width Modulation (PWM)? Applications and Accessories - Latest News from Seeed Studio<\/title>\n<meta name=\"description\" content=\"Having trouble changing the brightness of the LED in your project? Directly changing the power supply voltage in the circuit to accomplish that isn&#039;t easy. But you can use Pulse Width Modulation (PWM) to help you with that! This can be easily implemented by coding in Arduino.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/16\/basic-electronics-pulse-width-modulationpwm-and-arduino-applications\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is Pulse Width Modulation (PWM)? Applications and Accessories - Latest News from Seeed Studio\" \/>\n<meta property=\"og:description\" content=\"Having trouble changing the brightness of the LED in your project? Directly changing the power supply voltage in the circuit to accomplish that isn&#039;t easy. But you can use Pulse Width Modulation (PWM) to help you with that! This can be easily implemented by coding in Arduino.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/16\/basic-electronics-pulse-width-modulationpwm-and-arduino-applications\/\" \/>\n<meta property=\"og:site_name\" content=\"Latest News from Seeed Studio\" \/>\n<meta property=\"article:published_time\" content=\"2020-06-16T08:06:46+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-01-15T09:10:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/What-is-Pulse-Width-Modulation-PWM_-Applications-and-Accessories.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2240\" \/>\n\t<meta property=\"og:image:height\" content=\"1260\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"ikikVC\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"ikikVC\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/16\/basic-electronics-pulse-width-modulationpwm-and-arduino-applications\/\",\"url\":\"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/16\/basic-electronics-pulse-width-modulationpwm-and-arduino-applications\/\",\"name\":\"What is Pulse Width Modulation (PWM)? Applications and Accessories - Latest News from Seeed Studio\",\"isPartOf\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/16\/basic-electronics-pulse-width-modulationpwm-and-arduino-applications\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/16\/basic-electronics-pulse-width-modulationpwm-and-arduino-applications\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/What-is-Pulse-Width-Modulation-PWM_-Applications-and-Accessories.png\",\"datePublished\":\"2020-06-16T08:06:46+00:00\",\"dateModified\":\"2021-01-15T09:10:32+00:00\",\"author\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/f719d4360793137aab650bfd5e715b57\"},\"description\":\"Having trouble changing the brightness of the LED in your project? Directly changing the power supply voltage in the circuit to accomplish that isn't easy. But you can use Pulse Width Modulation (PWM) to help you with that! This can be easily implemented by coding in Arduino.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/16\/basic-electronics-pulse-width-modulationpwm-and-arduino-applications\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/16\/basic-electronics-pulse-width-modulationpwm-and-arduino-applications\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/16\/basic-electronics-pulse-width-modulationpwm-and-arduino-applications\/#primaryimage\",\"url\":\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/What-is-Pulse-Width-Modulation-PWM_-Applications-and-Accessories.png\",\"contentUrl\":\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/What-is-Pulse-Width-Modulation-PWM_-Applications-and-Accessories.png\",\"width\":2240,\"height\":1260,\"caption\":\"What is Pulse Width Modulation (PWM)? Applications and Accessories\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/16\/basic-electronics-pulse-width-modulationpwm-and-arduino-applications\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.seeedstudio.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"What is Pulse Width Modulation (PWM)? Applications and Accessories\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#website\",\"url\":\"https:\/\/www.seeedstudio.com\/blog\/\",\"name\":\"Latest News from Seeed Studio\",\"description\":\"Emerging IoT, AI and Autonomous Applications on the Edge\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.seeedstudio.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/f719d4360793137aab650bfd5e715b57\",\"name\":\"ikikVC\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/9ad3f1d8f47e5bfee7ba1bbbb6acacec?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/9ad3f1d8f47e5bfee7ba1bbbb6acacec?s=96&r=g\",\"caption\":\"ikikVC\"},\"url\":\"https:\/\/www.seeedstudio.com\/blog\/author\/ikikvc\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What is Pulse Width Modulation (PWM)? Applications and Accessories - Latest News from Seeed Studio","description":"Having trouble changing the brightness of the LED in your project? Directly changing the power supply voltage in the circuit to accomplish that isn't easy. But you can use Pulse Width Modulation (PWM) to help you with that! This can be easily implemented by coding in Arduino.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/16\/basic-electronics-pulse-width-modulationpwm-and-arduino-applications\/","og_locale":"en_US","og_type":"article","og_title":"What is Pulse Width Modulation (PWM)? Applications and Accessories - Latest News from Seeed Studio","og_description":"Having trouble changing the brightness of the LED in your project? Directly changing the power supply voltage in the circuit to accomplish that isn't easy. But you can use Pulse Width Modulation (PWM) to help you with that! This can be easily implemented by coding in Arduino.","og_url":"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/16\/basic-electronics-pulse-width-modulationpwm-and-arduino-applications\/","og_site_name":"Latest News from Seeed Studio","article_published_time":"2020-06-16T08:06:46+00:00","article_modified_time":"2021-01-15T09:10:32+00:00","og_image":[{"width":2240,"height":1260,"url":"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/What-is-Pulse-Width-Modulation-PWM_-Applications-and-Accessories.png","type":"image\/png"}],"author":"ikikVC","twitter_card":"summary_large_image","twitter_misc":{"Written by":"ikikVC","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/16\/basic-electronics-pulse-width-modulationpwm-and-arduino-applications\/","url":"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/16\/basic-electronics-pulse-width-modulationpwm-and-arduino-applications\/","name":"What is Pulse Width Modulation (PWM)? Applications and Accessories - Latest News from Seeed Studio","isPartOf":{"@id":"https:\/\/www.seeedstudio.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/16\/basic-electronics-pulse-width-modulationpwm-and-arduino-applications\/#primaryimage"},"image":{"@id":"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/16\/basic-electronics-pulse-width-modulationpwm-and-arduino-applications\/#primaryimage"},"thumbnailUrl":"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/What-is-Pulse-Width-Modulation-PWM_-Applications-and-Accessories.png","datePublished":"2020-06-16T08:06:46+00:00","dateModified":"2021-01-15T09:10:32+00:00","author":{"@id":"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/f719d4360793137aab650bfd5e715b57"},"description":"Having trouble changing the brightness of the LED in your project? Directly changing the power supply voltage in the circuit to accomplish that isn't easy. But you can use Pulse Width Modulation (PWM) to help you with that! This can be easily implemented by coding in Arduino.","breadcrumb":{"@id":"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/16\/basic-electronics-pulse-width-modulationpwm-and-arduino-applications\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.seeedstudio.com\/blog\/2020\/06\/16\/basic-electronics-pulse-width-modulationpwm-and-arduino-applications\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/16\/basic-electronics-pulse-width-modulationpwm-and-arduino-applications\/#primaryimage","url":"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/What-is-Pulse-Width-Modulation-PWM_-Applications-and-Accessories.png","contentUrl":"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/What-is-Pulse-Width-Modulation-PWM_-Applications-and-Accessories.png","width":2240,"height":1260,"caption":"What is Pulse Width Modulation (PWM)? Applications and Accessories"},{"@type":"BreadcrumbList","@id":"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/16\/basic-electronics-pulse-width-modulationpwm-and-arduino-applications\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.seeedstudio.com\/blog\/"},{"@type":"ListItem","position":2,"name":"What is Pulse Width Modulation (PWM)? Applications and Accessories"}]},{"@type":"WebSite","@id":"https:\/\/www.seeedstudio.com\/blog\/#website","url":"https:\/\/www.seeedstudio.com\/blog\/","name":"Latest News from Seeed Studio","description":"Emerging IoT, AI and Autonomous Applications on the Edge","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.seeedstudio.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/f719d4360793137aab650bfd5e715b57","name":"ikikVC","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/9ad3f1d8f47e5bfee7ba1bbbb6acacec?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9ad3f1d8f47e5bfee7ba1bbbb6acacec?s=96&r=g","caption":"ikikVC"},"url":"https:\/\/www.seeedstudio.com\/blog\/author\/ikikvc\/"}]}},"modified_by":"Gigi","views":86756,"featured_image_urls":{"full":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/What-is-Pulse-Width-Modulation-PWM_-Applications-and-Accessories.png",2240,1260,false],"thumbnail":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/What-is-Pulse-Width-Modulation-PWM_-Applications-and-Accessories-80x80.png",80,80,true],"medium":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/What-is-Pulse-Width-Modulation-PWM_-Applications-and-Accessories-300x169.png",300,169,true],"medium_large":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/What-is-Pulse-Width-Modulation-PWM_-Applications-and-Accessories-768x432.png",640,360,true],"large":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/What-is-Pulse-Width-Modulation-PWM_-Applications-and-Accessories-1030x579.png",640,360,true],"1536x1536":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/What-is-Pulse-Width-Modulation-PWM_-Applications-and-Accessories-1536x864.png",1536,864,true],"2048x2048":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/What-is-Pulse-Width-Modulation-PWM_-Applications-and-Accessories-2048x1152.png",2048,1152,true],"visody_icon":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/What-is-Pulse-Width-Modulation-PWM_-Applications-and-Accessories.png",32,18,false],"magazine-7-slider-full":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/What-is-Pulse-Width-Modulation-PWM_-Applications-and-Accessories-1536x1020.png",1536,1020,true],"magazine-7-slider-center":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/What-is-Pulse-Width-Modulation-PWM_-Applications-and-Accessories-936x897.png",936,897,true],"magazine-7-featured":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/What-is-Pulse-Width-Modulation-PWM_-Applications-and-Accessories-1024x576.png",1024,576,true],"magazine-7-medium":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/What-is-Pulse-Width-Modulation-PWM_-Applications-and-Accessories-720x380.png",720,380,true],"magazine-7-medium-square":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/What-is-Pulse-Width-Modulation-PWM_-Applications-and-Accessories-675x450.png",675,450,true]},"author_info":{"display_name":"ikikVC","author_link":"https:\/\/www.seeedstudio.com\/blog\/author\/ikikvc\/"},"category_info":"<a href=\"https:\/\/www.seeedstudio.com\/blog\/category\/news\/\" rel=\"category tag\">News<\/a>","tag_info":"News","comment_count":"0","_links":{"self":[{"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts\/33555","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/users\/3500"}],"replies":[{"embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/comments?post=33555"}],"version-history":[{"count":10,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts\/33555\/revisions"}],"predecessor-version":[{"id":39723,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts\/33555\/revisions\/39723"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/media\/39722"}],"wp:attachment":[{"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/media?parent=33555"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/categories?post=33555"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/tags?post=33555"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}