Pulse Width Modulation (PWM) is a technique used in electronics to control the average voltage applied to a load by rapidly switching a digital signal on and off at varying duty cycles. This method is commonly employed in applications such as motor speed control, LED brightness adjustment, and power regulation. By adjusting the duty cycle of the signal, PWM enables precise control over the output voltage or power, allowing for efficient and flexible manipulation of electrical devices.
My project involves Pulse Width Modulation (PWM), allowing the duty cycle to be adjusted between 10% and 80% using 3 switches with 7 different combinations. Each combination increments the duty cycle by 10%. For example, '000' represents a 10% duty cycle, and '111' represents an 80% duty cycle. The PWM was designed for a frequency of 1KHz.
The above image represents the PWM module that was designed.
[2:0] LOAD | Duty Cicle |
---|---|
000 | 10% |
001 | 20% |
010 | 30% |
011 | 40% |
100 | 50% |
101 | 60% |
110 | 70% |
111 | 80% |
In the previous table, the variation of the duty cycle is shown as a function of the LOAD input combination.
The LOAD input should be connected to a switch, CLK is connected to a 50MHz clock, and RESET to a button. To ensure proper operation, press RESET to set the initial conditions. Once this is done, choose the LOAD input combination to set the desired duty cycle.
The external hardware includes one LED, a 1k ohm resistor, and three 2-position switches.
# | Input | Output | Bidirectional |
---|---|---|---|
0 | load 0 | ||
1 | load 1 | ||
2 | load 2 | ||
3 | |||
4 | |||
5 | |||
6 | |||
7 | PWM |