🧰 Project 2B: Pulse-Width Modulation (PWM) Dimmer! | myBetabox

🧰 Project 2B: Pulse-Width Modulation (PWM) Dimmer!

This Project is an Example of…

Also known as Beacon lights, these pulsing lights are required on every aircraft to improve its visibility to others and to warn other pilots.

In this project we are going to make an LED on a breadboard fade on and off repeatedly using pulse width modulation (PWM).

  • The Arduino can control wave patterns that allow it to decrease the amount of voltage that a component "thinks" it is receiving. This acts like a dimmer switch.
  • The LED in this project will dim gradually and then come back up to full brightness as if someone were turning a dimmer switch up and down again and again.
  • This is a powerful tool that lets the Arduino "throttle" power to many components with no mechanical components at all. This capability is entirely electronic.

Required Components

Add Sketch to Editor

Download the Sketch

Fritzing Diagram

Now that you've wired up a few projects, try to build this one just by looking at the diagram above. Just an FYI though, it is the same as the last project!

      Building Tips

      • Wire this project according to the Fritzing diagram for Project 2B.
      • NOTE that this is exactly the same build as Project 2A! You don’t need to change any hardware; just load the new sketch for Project 2B to the Arduino. If Project 2A was working, 2B should immediately work as well.
      • IMPORTANT: Make sure to plug the long leg of the LED next to the resistor, and the short leg of the LED into the ground power column that the black jumper wire is connected to.
      • Make sure to use Digital Pin 10 for the color jumper wire to the LED.
      • Double-check your connections before powering up.
      • UPLOAD AND SAVE the correct/current sketch to your Arduino from the Web Editor.

      Expand Your Learning

      • Research pulse width modulation (PWM) on the Internet to get a better understanding of how this process works.
      • Identify other components besides LEDs that can be throttled using PWM.