Although I’m mostly working with the “normal” digital input / output on the Arduino, it might be a good idea to play with the PWM output, too, just to have a basic knowledge about it if needed.

I’ll not go too much into detail about the theoretical background of PWM (highly suggesting you to read the Wikipedia article about PWM if you want to learn more about it). Simply speaking, PWM on the Arduino creates an analogue signal between 0 and 5 Volts by pulsing the power with an interval, e.g. to provide 50% (2.5 Volts) the power is pulsed at a rate of 500 Hz (Arduino uses this frequency for PWM) with half of the time provding either 5 Volts or 0 Volts.

So, what about connecting a LED to the Arduino PWM, powering it at 50% and using high speed video recording?

Arduino PWM in slow motion from Nils on Vimeo.

At 1000 frames per second you can see the flickering that is caused by the switching power on and off at high frequency.

I currently don’t have any use case for PWM in my projects but it’s good to know how it basically works if needed ;)

Tagged with:

Leave a Reply

Your email address will not be published. Required fields are marked *