You are on page 1of 25

Proiect CAD

Ciorogariu Mihai Cristian, Grupa 2022

PWM Generator

Theoretical support
PWM stands for ‘Pulse Width Modulation’ and means adjusting the width of the output square
wave. This technique has been used in Telecommunications for encoding purposes, for audio
outputs, Brightness in Smart Lighting Systems, controlling the speed of motors, etc. Pulse width
modulation is used to control the analog circuit by the digital output of the microprocessor. A PWM
wave will be produced by a comparator and a triangular wave generator. The duty cycle will be
inversely proportional to the input voltage.

Block diagram

Oscillator Triangle wave


Comparator
generator
(PWM
Gain Block PWM Signal
Generator)
Oscillator:

The frequency of the oscillator in this case will be 2kHz. The oscillator has the purpose of generating
the signal that will later become a triangle waveform with the help of the triangle wave generator.

Triangle wave generator:

The triangle wave generator will generate a PWM waveform, with the help of a comparator, with a
duty cycle that is inversely proportional to the input voltage. Most PWM systems will not allow 0%
or 100% modulation, because the output signall would be DC and as a result it may damage other
components in its path. As a result, the amplitude of the triangular wave must be set greater than the
maximum input voltage. Low resistor values in the triangle wave generator can cause excess current
to flow from the OpAmp output, which would disort the triangular waveform.
Comparator

The comparator (PWM Generator) has the purpose of generating a pulse-width-modulated


waveform with a duty cycle that is inversely proportional to the input voltage. The comparator also
aids in generating a triangular waveform. With the help of the potentiometer, the duty cycle can be
adjusted.

Gain Block

The gain block is the part where a voltage marker will be placed in order to observe the PWM
waveform. The resistor R9 has the purpose of adjusting the output voltage.
Electrical Scheme
Part2

PWM Generator
The Oscillator:

Setting values for resistors:

-The frequency must be f=2000Hz

1
f= 2∗R7 = 2kHz
2∗R5∗C1∗ln ( +1)
R6

We set:

R5=170k, R6=12k, R7=10k, C1=1.5n


1 10^6 10^6
 f= 2∗10k = 510∗0.980829 = 500.22 = 1999.12 ≈ 2000Hz
2∗255k∗1n∗ln ( +1)
12k

The OpAmp used will be an Op-27, that will have +9V and -9V at its inputs

In order to obtain the 2kHz frequency with the real components, their values will be adjusted as
follows:

R5=175k, R6=12k, R7=10k, C1=1.4n

To show the frequency we can use the FFT Plot or the formula for the period: 1/T
Triangular wave generator

For the triangular wave generator we set the value of R2, so that it will be ~8 times the size of R1 for
an optimal observation of the signal.

In this case we set R1=12.3k and R2=100k, so that the triangular wave will not be disproportionated.

The amplitude of the triangular wave will be 10V using ideal components. (Real values will slightly
change the value of the amplitude)

Comparator (PWM Generator)

The comparator contains the potentiometer R15=2.2k, that allows the duty cycle of the output signal
to change. We adjust the resistors R16and R14, so that the duty cycle will vary between [30%; 60%]
𝐷𝑢𝑡𝑦𝐶𝑦𝑐𝑙𝑒
Using the formula: V = 10 − ( ) ∗ 20 we will obtain:
100

V = 4V for 30% Duty Cycle

V = -2V for 60% Duty Cycle

We set the ideal values for the resistors:


9−4
R16 = 4−(−2) = 1.83k
2.2

9+2
R14= 4−(−2) = 4.03k
2.2

We replace them with real components and make adjustments in order to fit the interval [30%; 60%]

R16 =3k and R14=1.7k

The formula used to check the duty cycle is: DutyCycle(V(out))*100

For Set=1 the duty cycle will be 30%:

For Set=0 the duty cycle will be 60%:


Gain Block:

The gain block contains the potentiometer R12=2.2k that will modify the amplitude of the output
signal. We adjust the resistors R11and R9, so that the amplitude will vary between [4; 5]

Calculations:
𝑅11 10
=
2.2+𝑅9 5

𝑅11 10
=
0+𝑅9 4

 R9=8.8k
 R11=22k

We replace them with real components and make adjustments in order to fit the interval [4; 5]

R9=10.4k

R11=22k

To analyse the amplitude we use the formula Max(V(out)):

For Set=1 the amplitude will be 5:

For Set=0 the amplitude will be 4:


Standardization&Association with real components

Calculus Standard Name Toleranc


values e
R5=175kΩ 175kΩ Wirewound Resistors - Chassis Mount 50watt 175K 5% 5%
High Power
L50J175K
C1=1.4nF=1400p 1400pF Mica Capacitors 1400pF 500V 5% 5%
F CD19FD142JO3
R1=12.3kΩ 12.3kΩ Thick Film Resistors - SMD 12.3kOhms 1/10W 0603 1%
1%
RC0603FR-1313K3L
R6=12kΩ 12kΩ Metal Oxide Resistors 5W XSM M/OX 5% 12K 5%
279-ROX5SSJ12K
R11=22kΩ 22kΩ Thick Film Resistors - SMD 01005 22KOhm 5% Anti- 5%
Sulf
ERJ-U0XJ223Y
R2=100kΩ 100kΩ Thick Film Resistors - SMD 100 Kohms 5% 200ppm 5%
RCC1206100KJNEA
R16=3kΩ 3kΩ Metal Film Resistors - Through Hole 1/4watt 3Kohms 5%
5% Ra ted to 1/2watt
CCF073K00JKE36
R14=1.7kΩ 1.7kΩ https://eu.mouser.com/ProductDetail/YAGEO/CFR- 5%
50JT-52-
1K7?qs=xZ%2FP%252Ba9zWqaxP2azJ3fS6A%3D%3
D
603-CFR-50JT-52-1K7
C2=10nF 0.01uF=10n Multilayer Ceramic Capacitors MLCC - Leaded 100V 5%
F 10nF 5% C0G Green Auto
594-A103J20C0GH5UAAP
R8=R10=1kΩ 1kΩ Thick Film Resistors - SMD 1 Kohms 5% 200ppm 5%
71-RCC12061K00JNEA
R12=R15=2.2kΩ 2.2kΩ Potentiometers 3watts 2.2Kohm 10% 25mm slotted 10%
PE30L0FL222KAB
R9=10.4kΩ 10.4kΩ Thin Film Resistors - SMD 10.4kOhm,0402,1%,25p 1%
pm,63mW,50V
RN73H1ETTP1042F25
9V Power supply 9V Power ECE05US09
supply https://www.trcelectronics.com/View/XP-
Power/ECE05US09.shtml
Op-27 OP27AZ-ND

https://www.digikey.com/en/products/detail/analog-
devices-inc/OP27AZ/612651

IC OPAMP GP 1 CIRCUIT 8CERDIP


General Purpose Amplifier 1 Circuit - 8-CERDIP
Schematic:
Part 3

PWM Generator

Time domain analysis:

Duty Cycle 30%, amplitude 4:


Duty Cycle 60%, amplitude 4:

Duty Cycle 30%, amplitude 5:


Duty Cycle 60%, amplitude 5:
Parametric Analysis:

1). Amplitude:

The variation of the amplitude between 4V and 5V


Max(V(out)): The amplitude varies from 4 to 5

2). Duty Cycle:

The variation of the duty cycle between 30% and 60%


DutyCycle(V(out))*100: The duty cycle varies between 30% and 60%

Monte Carlo Analysis:


We use the formula “DutyCycle(V(out))*100” to analyse the duty cycle:

The potentiometer is set to 0, so the duty cycle should be around 30%:

As seen from the plot, the duty cycle of the signal varies between [28%; 32%], because of the 5%
tolerances in the circuit. There is a 25% chance that the duty cycle will be between 30.4% and 30.8%
We set the potentiometer to 1, in order to have a 60% duty cycle:

In this case, the duty cycle will vary from between [59.8%; 63.2%], because of the tolerances.

There is a 25% chance that the duty cycle will be between 62% and 62.2%

Next, we will analyse the variance of the amplitude of the output signal.

We use the formula “Max(V(out))”:

First we will set the potentiometer to 0:

In this case, the amplitude varies from 3.84 to 4.36 and there is a 15% chance that the amplitude will
be 3.96, 4.08 or 4.36.
Now we set the potentiometer to 1:

The amplitude varies from 4.65 to 5.30. There is a 20% chance that the value of the amplitude will
be between 4.9 and 4.95.

Worst Case Analysis:


The green plot represents the least favorable case and the red one represents the nominal value.

The Output file:


Total Cost of the Circuit

Calculus Name Price


R5=175kΩ Wirewound Resistors - Chassis Mount 50watt 175K 5% 13.04 €
High Power
L50J175K
C1=1.4nF=1400pF Mica Capacitors 1400pF 500V 5% 0,381 €
CD19FD142JO3
R1=12.3kΩ Thick Film Resistors - SMD 12.3kOhms 1/10W 0603 0.085 €
1%
RC0603FR-1313K3L
R6=12kΩ Metal Oxide Resistors 5W XSM M/OX 5% 12K 0,576 €
279-ROX5SSJ12K
R11=22kΩ Thick Film Resistors - SMD 01005 22KOhm 5% Anti- 0,39 €
Sulf
ERJ-U0XJ223Y
R2=100kΩ Thick Film Resistors - SMD 100 Kohms 5% 200ppm 0,466 €
RCC1206100KJNEA
R9=10.4kΩ Thin Film Resistors - SMD 10.4kOhm,0402,1%,25p $0.34
pm,63mW,50V
RN73H1ETTP1042F25
R8=R10=1kΩ Thick Film Resistors - SMD 1 Kohms 5% 200ppm 0.237€
71-RCC12061K00JNEA
R16=3kΩ Metal Film Resistors - Through Hole 1/4watt 3Kohms 0,085 €
5% Ra ted to 1/2watt
CCF073K00JKE36
R14=1.7kΩ https://eu.mouser.com/ProductDetail/YAGEO/CFR- 0,102 €
50JT-52-
1K7?qs=xZ%2FP%252Ba9zWqaxP2azJ3fS6A%3D%3D
603-CFR-50JT-52-1K7
C2=10nF Multilayer Ceramic Capacitors MLCC - Leaded 100V 0,576 €
10nF 5% C0G Green Auto
594-A103J20C0GH5UAAP
R12=R15=2.2kΩ Potentiometers 3watts 2.2Kohm 10% 25mm slotted 30 € *2
PE30L0FL222KAB
Op-27 OP27AZ-ND $54.01000
*4
IC OPAMP GP 1 CIRCUIT 8CERDIP
General Purpose Amplifier 1 Circuit - 8-CERDIP
9Vdc Power ECE05US09 $18.54
supply https://www.trcelectronics.com/View/XP-
Power/ECE05US09.shtml
Conclusion:
The PWM Generator is a very useful circuit used in many situations, such as Telecommunications
for encoding purposes, controlling Smart Lighting Systems, Audio/Video amplifiers, Computer
Motherboards, etc.

It has several advantages, such as a relatively low cost, accuracy and quick response time and
prevents LEDs from overheating, while maintaining their brightness (in case of Smart Lighting
Systems).
References:
(https://www.atlantis-press.com/proceedings/icsnce-16/25859628, n.d.)

(https://www.powerelectronics.com/technologies/power-management/article/21854863/faqs-pulse-
width-modulation-pwm, n.d.)

(https://webcache.googleusercontent.com/search?q=cache:0P3l1HHS2FAJ:https://www.ti.com/lit/pd
f/slau508+&cd=2&hl=ro&ct=clnk&gl=ro, n.d.)

(https://www.youtube.com/watch?v=P3hpMeWtM7k, n.d.)

(https://en.wikipedia.org/wiki/Pulse-width_modulation, n.d.)

(http://ecee.colorado.edu/~ecen4618/lab2.pdf, n.d.)

(https://en.wikipedia.org/wiki/Duty_cycle, n.d.)

(https://www.ti.com/, n.d.)

(https://eu.mouser.com/Passive-Components/Resistors/_/N-5g9n?P=1yzefxa, n.d.)

(http://www.bel.utcluj.ro/dce/didactic/ed/, n.d.)

You might also like