The main objective of this project is to help people understand the concepts behind PWM. What is it and how it works.
Some students have problems understanding how PWM works, so I decided to build an Arduino shield, that using the Arduino PWM outputs and some easy code, can demonstrate with the help of an osciloscope, how PWM works.
The shield is not mandatory. The circuit can be easily put together in a Breadboard. However if you want a more permanent system, I recomend building the shield.
This circuit can also do other things like demonstrating the charge and discharge of a capacitor, with the help of an osciloscope.
Or demonstrating how duty cycle affects the mean value:
This project also gives the oportunity to the student to familiarize with the Arduino platform capabilities. We will use Analog input, Digital outputs and PWM outputs.
This project has 2 working modes:
In this mode, we use pins 10 and 11 to generate two complimentary PWM signals that control 2 LEDs (red and green). The duty cycle is dependent of the analog value present at analog Input A0. This analog value is commanded via a potentiometer. Changing the duty cycle, changes the mean value and the luminosity of the LEDs. (One LED increases luminosity, the other decreases).
Pins 5 and 6 have a complimentary PWM signal with a duty cycle that varies continuously at a sinusoidal rhythm. Applying a RC filter we can observe a sinusoidal signal.
With this operating mode, we have on pins D0 and D1 pulses with 10% and 90% duty cycle. On pin 13 we have rectangular wave (500Hz) with a 50% duty cycle
On pins 5 and 6 we have now complimentary square waves that are applied to RC network. We can see at the capacitor terminals the charge discharge curves.
The main objective of this project is to help people understand the concepts behind PWM. What is it and how it works.
Some students have problems understanding how PWM works, so I decided to build an Arduino shield, that using the Arduino PWM outputs and some easy code, can demonstrate with the help of an osciloscope, how PWM works.
The shield is not mandatory. The circuit can be easily put together in a Breadboard. However if you want a more permanent system, I recomend building the shield.
This circuit can also do other things like demonstrating the charge and discharge of a capacitor, with the help of an osciloscope.
Or demonstrating how duty cycle affects the mean value:
This project also gives the oportunity to the student to familiarize with the Arduino platform capabilities. We will use Analog input, Digital outputs and PWM outputs.
This project has 2 working modes:
In this mode, we use pins 10 and 11 to generate two complimentary PWM signals that control 2 LEDs (red and green). The duty cycle is dependent of the analog value present at analog Input A0. This analog value is commanded via a potentiometer. Changing the duty cycle, changes the mean value and the luminosity of the LEDs. (One LED increases luminosity, the other decreases).
Pins 5 and 6 have a complimentary PWM signal with a duty cycle that varies continuously at a sinusoidal rhythm. Applying a RC filter we can observe a sinusoidal signal.
With this operating mode, we have on pins D0 and D1 pulses with 10% and 90% duty cycle. On pin 13 we have rectangular wave (500Hz) with a 50% duty cycle
On pins 5 and 6 we have now complimentary square waves that are applied to RC network. We can see at the capacitor terminals the charge discharge curves.