Victor Update – Update 1

RGB LED Strip Driver Design:

I am going to be updating the colors on the RGB LED Strip using Pulse Width Modulation (PWM).

THE RGB LED strip is going to be controlled using three signals (1 controls the Red color, 1 controls the Green color, and 1 controls the Blue color). It is the combination of these three signals that creates the different colors seen on the RGB LED strip.

I decided to drive the signals at a frequency of 500Hz because this is a very easy frequency to work with when performing the necessary calculations to achieve this frequency.

I am also powering the LED Strip using a 12V power supply (which is the recommended voltage for the strip).


PWM Overview:

Pulse Width Modulation is achieved by switching a signal on and off which in turn creates a square waveform. Changing the signal between being on and off simulates voltages that lie between the maximum voltage of 12V and the minimum voltage of 0V. This is achieved by altering the amount of time that the signal stays turned on as opposed to the amount of time that it stays turned off.

The amount of time that the signal stays on is known as the pulse width. In order to get differrent analog values for the signal, it becomes necessary to change the pulse witdth. Each percentage of time that a signal stays high is referred to as that signal’s duty cycle. For example, if a signal were set high for 50% of the time and then set low for the other 50% of the time, that signal would be said to have a 50% duty cycle. For our design, changing the pulse width results in the signal (and thus the color it is controlling) to vary in intensity and combining all of these signals results in a specific color being shown on the RGB LED strip. Here are the common duty cycles experienced in PWM:

*Note that each blue line represents the start of a new 2ms period / the end of the previous 2ms period.


Signal PWM Combinations:

We will have four different colors that are being generated in our design: blue, green, red, and gray. Here is how I am going to achieve each color:

*Note that each blue line represents the start of a new 2ms period / the end of the previous 2ms period.









Calculations for designing RGB Strip LED Driver in Verilog:

Nexys2 On-Board clk – 50MHz

period of clock: 1/50MHz = 0.2×10^-6s= 20×10^-9s = 20ns

desired frequency for LED PWM: 500Hz

1/500Hz = 0.0002s = 2ms.

20ns * x = 2ms

x = 2ms/20ns = 1ms/10ns = .001 / .000000010 = .1 x 10^6 = 100,000

counter register must be able to count up to 100,000 (0 – 99,999)

2^10 ≈ 1,000 , 2^11 ≈ 2,000 , 2^12 ≈ 4,000, 2^13 ≈ 8,000, 2^14 ≈ 16,000, 2^15 ≈ 32,000, 2^16 ≈ 64,000, 2^17 ≈ 128,000

*counter register must be at least 17-bits wide.

LED Driver Block Diagram:

LED Driver Block Diagram



One thought on “Victor Update – Update 1

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s