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.:- M9131167
  • Price:- $40

Priced at Now at $40, Verified Solution

Have any Question?


Related Questions in Electrical & Electronics

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 ...

Summative assessmentin 2017 sej101 assessment will consist

Summative Assessment In 2017 SEJ101 assessment will consist of nine tasks that will develop a portfolio of your assessed work. Throughout the trimester you will have the opportunity for feedback on all nine tasks before ...

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 . ( ...

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 ...

Nanotechnology engineering - resonance circuits questions

Nanotechnology Engineering - Resonance Circuits Questions - Q1) A series RLC network has R = 2KΩ, L = 40mH and C = 1μF. Calculate the impedance at resonance and at one-fourth, one-half, twice, and four times the resonant ...

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 ...

Question 1 in the voltage regulator circuit in figure p221

Question 1: In the voltage regulator circuit in Figure P2.21, V 1 = 20 V, V Z = 10 V, R i = 222Ω and P z (max) = 400 mW. (a) Determine I L, I z , and I L , if R L = 380Ω. (b) Determine the value of R L , that will establ ...

Research report1 read 3 to 4 journal articles about

Research report 1. Read 3 to 4 journal articles about digital control or industrial control, eg. one particular application, implementation aspect such as selection of sampling time, hardware etc. No text book example is ...

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 ...

Nanotechnology engineering program assignment - passive

Nanotechnology Engineering Program Assignment - Passive Filters Q1) Determine what type of filter is in circuit shown. Calculate the cutoff frequency f c . Q2) Determine what type of filter is in circuit shown. Calculate ...

  • 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