14
Voltage Controlled Digital AC DIMMER PROJECT Made by Mudasser Rahim 2013-EE-36 Malik Muhammad Zaid 2013-EE-37 M. Zeeshan Joiya 2013-EE-93 M. Nauman 2012-EE-155 University of Engineering And Technology Lahore

report

Embed Size (px)

Citation preview

Page 1: report

Voltage Controlled DigitalAC DIMMERPROJECT

Made by

Mudasser Rahim 2013-EE-36

Malik Muhammad Zaid 2013-EE-37

M. Zeeshan Joiya 2013-EE-93

M. Nauman 2012-EE-155University of Engineering And Technology

Lahore

Page 2: report

Voltage Controlled digital AC Dimmer (Project) Report

Contents

1 Introduction 1

2 Brief Introduction to Components 12.1 Bridge Rectifier . . . . . . . . . . . . . . . . . . . . . . . . . . 12.2 4N25 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.3 Microcontroller . . . . . . . . . . . . . . . . . . . . . . . . . . 22.4 MOC3021 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32.5 BT136 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

3 Working and Circuit Diagram 4

4 Observation Set 5

5 Voltage Waveforms For Reading Number Three 65.1 Across Load . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65.2 Across TRIAC . . . . . . . . . . . . . . . . . . . . . . . . . . 65.3 Across Load With FFT . . . . . . . . . . . . . . . . . . . . . . 7

6 Voltage Waveforms For Reading Number Six 76.1 Across Load . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76.2 Across TRIAC . . . . . . . . . . . . . . . . . . . . . . . . . . 86.3 Across Load With FFT . . . . . . . . . . . . . . . . . . . . . . 8

7 Voltage Waveforms For Reading Number Nine 97.1 Across Load . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97.2 Across TRIAC . . . . . . . . . . . . . . . . . . . . . . . . . . 97.3 Across Load With FFT . . . . . . . . . . . . . . . . . . . . . . 10

8 Efforts for Project 10

9 Expenses on Project 11

Page

Page 3: report

Voltage Controlled digital AC Dimmer (Project) Report

List of Figures

1 4N25 Internal Circuitry . . . . . . . . . . . . . . . . . . . . . . 22 STM32F401VC Discovery Microcontroller . . . . . . . . . . . 33 MOC3021 IC . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 BT136 TRIAC Diagram . . . . . . . . . . . . . . . . . . . . . 45 Working And Circuit Diagram . . . . . . . . . . . . . . . . . . 56 Reading No. Three Across Load . . . . . . . . . . . . . . . . . 67 Reading No. Three Across TRIAC . . . . . . . . . . . . . . . 68 Reading No. Three Across Load with FFT . . . . . . . . . . . 79 Reading No. Six Across Load . . . . . . . . . . . . . . . . . . 710 Reading No. Six Across TRIAC . . . . . . . . . . . . . . . . . 811 Reading No. Six Across Load with FFT . . . . . . . . . . . . 812 Reading No. Nine Across Load . . . . . . . . . . . . . . . . . 913 Reading No. Nine Across TRIAC . . . . . . . . . . . . . . . . 914 Reading No. Nine Across Load with FFT . . . . . . . . . . . . 10

Page

Page 4: report

Voltage Controlled digital AC Dimmer (Project) Report

Voltage Controlled Digital AC Dimmer Project

1 Introduction

“Voltage Controlled digital AC dimmer” is the circuit which controls theAC voltage digitally with the help of a microcontroller. The microcontrollertakes a zero crossing signal from a zero-crossing detector circuit and providesa signal to a DIAC which controls the voltage waveform across the load.

2 Brief Introduction to Components

• 180K ohms (2)• 1K ohms (1)• 220 ohms (1)• 1N4007 (4)• 4N25 (1)• Microcontroller (1)• MOC3021 (1)• BT136 (1)• Bulb (1)• Bulb Holder (1)• Breadboard (2)• Connecting Wires

2.1 Bridge Rectifier

while doing our project we took 4 1N4007 diodes to make make bridge rec-tifier. This full wave rectifier provides unidirectional voltage to the opto-coupler to operate in dc mode.

2.2 4N25

4N25 is basically an opto-switching device. It provides protection to micro-controller by isolating bridge rectifier from microcontroller. The BJT actingas switching device provides output at zero crossing of voltage. Whenever,

Page 1

Page 5: report

Voltage Controlled digital AC Dimmer (Project) Report

output voltage from bridge rectifier is greater than zero, the photodiode in4N25 provides triggers current in the base of BJT, which in consequence ofIB, raises IC in the device and hence zero voltage appears at the Collectorterminal of BJT. But when input voltage is zero, the photodiode is off keep-ing IB zero which in return makes IC zero, so all Vcc voltage appears acrossCollector-terminal of transistor. In this way, it is working as zero-crossingdetector to AC voltage. Following is the pin-out diagram of the 4N25 IC:

Figure 1: 4N25 Internal Circuitry

2.3 Microcontroller

The microcontroller we used in our project is STM32F401VC. It takes zero-crossing output at its GPIO-pin. We are taking PA0 as input interrupt pin.Whenever, an interrupt appears at pin, it starts an up-count timer whichprovides an interrupt at reload-value. So, by adjusting reload value we cancreate different interrupts at different time intervals. And this interruptappears at GPIO pin PD2 as an output.

Page 2

Page 6: report

Voltage Controlled digital AC Dimmer (Project) Report

Figure 2: STM32F401VC Discovery Microcontroller

2.4 MOC3021

MOC3021 is also an opto-isolator TRIAC driver. It consists of a photodiodeand DIACE. The photodiode is driven by the microcontroller and it trig-gers the DIACE at different time intervals. While the DIACE is connectedbetween the supply terminal and to gate of the TRIAC. The terminal 4 ofMOC3021 provides triggering pulses to the gate terminal of TRIAC for bothpositive and negative halves of supply. Its pin-out diagram is shown below:

Figure 3: MOC3021 IC

2.5 BT136

BT136 is the TRIAC device. It consists of three terminals. One terminal isgate while the others are for supply and two diodes are connected in reverseposition to each other. When there is no triggering pulse at the gate terminal.

Page 3

Page 7: report

Voltage Controlled digital AC Dimmer (Project) Report

The device is off. But whenever a voltage appears at the gate its turn on thediodes quickly moving the terminals from open circuit to short circuit.

Figure 4: BT136 TRIAC Diagram

3 Working and Circuit Diagram

The circuit diagram is shown below in figure. The part of the circuit rep-resents the zero-crossing detector while the below part is the AC triggeringpart. The AC mains is applied to bridge rectifier with 180k ohms in theirpath to limit the current. The DC output voltage is applied to 4N25 opto-coupler. The zero-crossing out is collected from terminal 5 of the IC at GPIOPA0 by the STM32F401. STM32F401 generates a timer interrupt at GPIOPD2 which is collected by the MOC3021 IC. The MOC3021 then providestrigger pulses to the gate of BT136. The terminal T2 is connected to oneterminal of supply, the other terminal provides as output terminal to load.The load (20W bulb) is connected between this terminal and the other ter-minal of supply and it brightness shows how much of the part of AC cycle isappearing across bulb.

Page 4

Page 8: report

Voltage Controlled digital AC Dimmer (Project) Report

Figure 5: Working And Circuit Diagram

4 Observation Set

Readings at different firing angles are as follows

Page 5

Page 9: report

Voltage Controlled digital AC Dimmer (Project) Report

5 Voltage Waveforms For Reading Number

Three

5.1 Across Load

Figure 6: Reading No. Three Across Load

5.2 Across TRIAC

Figure 7: Reading No. Three Across TRIAC

Page 6

Page 10: report

Voltage Controlled digital AC Dimmer (Project) Report

5.3 Across Load With FFT

Figure 8: Reading No. Three Across Load with FFT

6 Voltage Waveforms For Reading Number

Six

6.1 Across Load

Figure 9: Reading No. Six Across Load

Page 7

Page 11: report

Voltage Controlled digital AC Dimmer (Project) Report

6.2 Across TRIAC

Figure 10: Reading No. Six Across TRIAC

6.3 Across Load With FFT

Figure 11: Reading No. Six Across Load with FFT

Page 8

Page 12: report

Voltage Controlled digital AC Dimmer (Project) Report

7 Voltage Waveforms For Reading Number

Nine

7.1 Across Load

Figure 12: Reading No. Nine Across Load

7.2 Across TRIAC

Figure 13: Reading No. Nine Across TRIAC

Page 9

Page 13: report

Voltage Controlled digital AC Dimmer (Project) Report

7.3 Across Load With FFT

Figure 14: Reading No. Nine Across Load with FFT

8 Efforts for Project

Two members of group arranged a motor-bike and made their way to Hallroad and purchased the required components for the Dimmer Circuit. Thenwe issued a STM32F401 microcontroller from project lab at the expenseof 2700 Rp. One member patched circuit on bread board with necessaryprecautions. Instead of jumper wires, male-male and male-female connectorswere used in order to insure safety of circuit. For 220V supply, we issueda supply box from Control Lab. One member of group spent much timewhile thinking the logic and composing the required code for the project.The code is totally interrupt based. No polling was used in the code. Whilechecking the project, one member tried to show both voltages i.e. across loadand across TRIAC. The black cables of channels were connected to differentterminals. So, when the circuit was energized, it short circuits the BT136.So it got blown. We quickly switched off the circuit and tried to think whatmistake we made. Then we realized that the black terminals i.e. groundterminals of both channels are internally shorted. That’s why our circuitwas shorted. Then we removed BT136 and applied another TRIAC.

Page 10

Page 14: report

Voltage Controlled digital AC Dimmer (Project) Report

9 Expenses on Project

• 1N4007: 4 x 2 = 8• 4N25: 2 x 20 = 40• MOC3021: 2 x 25 = 50• BT136 + BT139: 20 + 20 = 40• STM32F401VC Discovery: 2700 (Refundable)• Connectors: 100• 2 Metre Cable: 30• 1N4007: 4 x 2 = 8• Bike Rent + Fuel: 100

Total Cost: Rs 3138/= (2700 Refundable)

Page 11