Professional Documents
Culture Documents
A. Preparatory Notes:
i. Equip yourself with (a) the basic essence of pulse-width-modulation (PWM), (b) the
operating principle and basic characteristic features of the PWM IC SG2524 and (c) the
features and principles of operation of the microcontroller AT89S52 from the suggested
readings as given in iii below.
ii. A particular student will be allowed to conduct the experiments only after she/he has
made a detailed survey of the working of the circuits and made investigations on certain
pertinent points. As an example, the following points should be clear:
(a) What is „pulse-width-modulation‟? Why and where is it used?
(b) What is meant by „PWM-resolution‟? Why is it important?
(c) Why is it often preferred to use a PWM IC (e.g. SG2524) for PWM control instead of
fabricating an OPAMP-based circuit?
(d) What are the principle features of the IC SG2524? Where is it primarily used?
(e) Describe the various peripherals, available in the controller AT89S52.
(f) What are the various types of memories, available in AT89S52?
(g) What is meant by „assembly language programming‟? What is its advantages with
reference to AT89S52?
B. Objective:
i. To study and understand the working principle of the AT89S52 controller, as used in
this experiment.
ii. To study and understand the working principle of the PWM IC SG2524, as used in this
experiment.
iii. To observe and understand how a digital controller (AT89S52) may be used a „master-
IC‟ to control a PWM IC (SG2524), acting as a „slave IC‟.
iv. To understand the principle of (a) starting/stopping and (b) Controlling of Pulse-width of
the PWM IC (SG2524) by the master-controller (AT89S52).
v. To find out the relationship between the control signal from the „master-IC‟ (AT89S52)
and the output of the „slave-IC‟ (SG2524).
vi. To alter parameters of the „master-IC‟ output like (a) switching frequency, (b) duty cycle
etc.
D. Apparatus:
(a) Digital Storage Oscilloscope
(b) Digital Multi-meter
(c) Windows based PC (for changing the source code)
E. Circuit Diagram:
Kindly refer to Fig. 1 for the microcontroller-section, Fig. 2 for the analogue-section and to
Fig. 3 for the power-supply-section of the set up.
Fig. 3. Power-supply-section
Plug in the input wires of the power supply section to a 230 V, 50 Hz, 1-ph socket.
(d) Press push-button PB1 once again. Repeat the measurements of step (a) of RUN-1 and
note down the observations in Table-I.
Table-I
RUN-2: CONTROLLING THE OUTPUT PULSE WIDTH OF THE PWM IC WITH THE
MASTER CONTROLLER
(a) With the set-up in powered ON condition, press the appropriate push-button (PB0 or
PB1), connected to the master-controller, to ensure that the PWM IC has started
(b) Note the waveforms at the following locations/pins (all w. r. t GROUND): (i) pin no. 38 of
AT89S52, (ii) pin no. 2 of SG2524, and (iii) pin nos. 11 & 14 of SG2524 (together in one
screen-shot – one below the other).
(c) Measure the following:- (i) pulse-width and time-period of the pulses at pin no. 38 of
AT89S52, (ii) DC value of the voltage at pin no. 2 of SG2524, and (iii) pulse width and
time-period of the pulses at pin nos. 11 and 14 of SG2524. Fill up the data in the
relevant columns of Table-II.
Dr. S. Dalapati, Asst. Prof., Dept. of EE, IIEST Shibpur Page 5 of 7
Department of Electrical Engineering, IIEST, Shibpur
Embedded Systems Laboratory Expt. on Control of PWM IC by AT89S52
(d) Press PB2 (PW+) push-button, connected to AT89S52 once and repeat step (c) once
again.
(e) Keep repeating steps (c) and (d) for around 10 - 12 sets of observations. Take the
relevant waveforms (as noted in step-b of RUN-2) for one intermediate step and the final
step.
Table-II
Obs. AT89S52 pin no. 38 SG2524
No. Pulse Time Computed Pin no. Pin no. 11 Pin no. 14
width Period Duty 2
(μ- (μ- Cycle (%) DC Pulse Time Computed Pulse Time Computed
sec) sec) (x) voltage width Period Duty width Period Duty
(V) (μ- (μ- Cycle (%) (μ- (μ- Cycle (%)
(y1) sec) sec) (y2) sec) sec) (y3)
1.
2.
3.
4.
G. Report:
i. Explain the working of the pulse generator circuit (slave-IC), as used in this experiment.
Explain how the on-time and switching frequency are being controlled in this IC (without
using a master-controller).
ii. Explain how the master controller is achieving control over the PWM IC in terms of (a)
turning the controller ON/OFF and (b) controlling the pulse-width of the same.
iii. Can you state any other method, by which a digital controller can control the pulse-width
of an analogue IC? State the advantage/disadvantage of your method as compared to
the technique used here.
iv. Can you justify the values of resistances and capacitances, connected between pin nos.
7 and 9 of LM224 (Fig. 2)?
v. Using plane graph-paper(s), draw the graphs between the following quantities (i) y1, (ii)
y2 and (iii) y3 – all on the y-axis, with the variable „x‟ on the x-axis (ref. Table-II).
vi. Comment on the nature of variations, as observed in the graphs, drawn in art. (v) and
thereby state the importance of the 5 k-ohm potentiometer (Fig. 2) for this experiment.