Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Electrical & Electronics Expert

PULSE WIDTH MODULATOR

Part-1

Introduction:

A pulse width modulation (PWM) circuit works by varying the duty cycle of the square wave while keeping the period fixed. In simple terms, it is a technique to provide a logic "1", and a logic "0" for a controlled period of time.

DUTY CYCLE : The duty cycle is the percentage of the period of a square wave that that signal is high. A 50% duty cycle would be high for 50% of the time and low for 50% of the time. Likewise, a 10% duty cycle would be high for 10% and low for 90%.

2178_Pulse width modulator.png

A block diagram for the system is shown above.

Implementation:

A simple VHDL description of the circuit might look like this:

CONSTANT duty_cycle : INTEGER := A; -- for easy change of duty cycle

Signal count_value      : Integer Range 0 to max_value;

Signal PWM                 : STD_LOGIC;

PROCESS(CLK)
BEGIN
IF RISING_EDGE(CLK) THEN
IF (count_value < max_value) THEN
count_value <= count_value + 1;           -- note that we use a counter to keep track
IF (count_value = A) THEN                      -- of the fraction of the cycle for which PWM is High

PWM <= NOT(PWM);                               -- toggle PWM Bit
END IF;
ELSE
count_value <= 0;
PWM <= '1';                                             -- assuming you want to
start with '1' level
END IF;
END IF;
END PROCESS;

This is just one way of implementing the Pulse Width Modulator.

However, for your lab assignment, implement your circuit according to the flow chart given below.

1924_Pulse width modulator2.png

Write and test the VHDL code that represents a description of this PWM circuit using Quartus II.

Hand in your code and a fully documented simulation, being sure to completely describe your design and test methodology.

Part 2:

Use the clock division code that you designed for the traffic light controller in the first lab and for programming the Altera DE-II board. You should be able to demonstrate the change in the turn on times for the LEDs. Use the toggle switches for changing the duty cycle and LEDs as the respective outputs. Prepare an excel sheet for the relevant error compared to the required duty cycle.

Electrical & Electronics, Engineering

  • Category:- Electrical & Electronics
  • Reference No.:- M9716429
  • Price:- $25

Priced at Now at $25, Verified Solution

Have any Question?


Related Questions in Electrical & Electronics

Problems -problem 1 - find v0 in the op amp circuit of fig

Problems - Problem 1 - Find v 0 in the op amp circuit of Fig. 1. Problem 2 - Compute i 0 (t) in the op amp circuit in Fig. 2 if v s = 4 cos(10 4 t). Problem 3 - If the input impedance is defined as Z in = v s /I s , find ...

1 a name the three major groups of contamination and

1. (a) Name the three major groups of contamination and briefly describe their physical characteristics. (b) Where do the above contamination types come from? Give one example of each. 2. Name two processes metrics which ...

1 goalin this project you will solve a non-trivial design

1 Goal In this project you will solve a non-trivial design problem explicitly using the divide-and-conquer (D&C) approach. The main reason for using the D&C approach is the ease of the design process and the streamlined ...

Question 1for the ce amplifier in figure 1 given the

Question 1 For the CE amplifier in Figure (1), given the following component parameters: Parameter Value β DC , β AC 150 V BE 0 . 7 V V CC 12 V R C 820 ? R E 1 100 ? R E 2 220 ? R 1 20 k? R 2 5 . 2 k? R L 100 k? C 1 , C ...

Problem 1given a sequence xn for 0lenle3 where x0 1 x1 1

Problem # 1: Given a sequence x(n) for 0≤n≤3, where x(0) = 1, x(1) = 1, x(2) = -1, and x(3) = 0, compute its DFT X(k). (Use DFT formula, don't use MATLAB function) Problem # 2: Use inverse DFT and apply it on the Fourier ...

Problem 1given a sequence xn for 0lenle3 where x0 1 x1 1

Problem # 1: Given a sequence x(n) for 0≤n≤3, where x(0) = 1, x(1) = 1, x(2) = -1, and x(3) = 0, compute its DFT X(k). (Use DFT formula, don't use MATLAB function) Problem # 2: Use inverse DFT and apply it on the Fourier ...

Questions -problem 1 - given the sinuosidal voltage vt 50

Questions - Problem 1 - Given the sinuosidal voltage v(t) = 50 cos(30t+10 o ) V, find: (a) the amplitude V m (b) the period T, (c) the frequency f and (d) v(t) at t = 10 ms. Problem 2 - A current source in a linear circu ...

Question 1 a pnp transistor withnbspbeta 60 is connected

Question 1. A pnp transistor with β = 60 is connected in a common-base configuration as shown in figure P5.8 (a) The emitter is driven by a constant-current source with I E = 0.75 mA. Determine I B , I C , α, and V C . ( ...

Assignment -consider a common emitter amplifiernow lets say

Assignment - Consider a common emitter amplifier: Now let's say that R B and R C do a fine job at DC biasing the BJT but they are large so they can be neglected for small signal (AC) analysis. In that case, the equivalen ...

Questions -problem 1 - solve for i0 in fig using mesh

Questions - Problem 1 - Solve for i 0 in Fig. using mesh analysis. Problem 2 - Use mesh analysis to find current i 0 in the circuit. Problem 3 - Use mesh analysis to find v 0 in the circuit. Let v s1 = 120 cos(100t+ 90 o ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As