Three Phase Final Presentation Slides NEW
-
Upload
api-3721578 -
Category
Documents
-
view
333 -
download
1
Transcript of Three Phase Final Presentation Slides NEW
![Page 1: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/1.jpg)
Three Phase Line & Load Regulation using SCR and
Microcontroller
1 2 3 4 5
![Page 2: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/2.jpg)
Introduction
Project Objective
General Introduction
Project Introduction
Back
![Page 3: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/3.jpg)
Objective
To upgrade the existing three phase analog regulatory system, to a three phase, microcontroller based SCR drive system. So that if any fluctuation comes in three phase voltage supply, controller will Sense that fluctuation and accordingly give triggering pulses to the SCR to get controlled regulated output at the load.
Back
![Page 4: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/4.jpg)
General Introduction In our day to day life we use a lot of electronic devices to satisfy our needs or to make our life comfortable and luxurious.
Every device needs a power supply, to work on. And for the optimum functioning of the device it is necessary that the supply should be reliable.
That is, it should provide a constant voltage. But this is not possible always.
Next
![Page 5: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/5.jpg)
There are many reasons due to which there is a fluctuation in the supply voltage. This change in the supply voltage may cause the device to damage.
The best alternative is to regulate the supply voltage. This is what we have tried to achieve here.
Regulation is a process to maintain the output of a circuit at a constant desired level irrespective to the variation in the input.
Back
![Page 6: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/6.jpg)
Project Introduction
Load has a constant voltage of 220 V dc., in spite of any variation in the input voltage.
The voltage regulation is achieved by controlling the firing angle of the SCR.
The voltage across the load is stepped down and provided to ADC.
This digital signal from ADC is then processed by the controller and generates a firing pulse for SCR, hence controlling the load current.
Back
![Page 7: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/7.jpg)
• Block Diagram
• Block Diagram Description
Back
![Page 8: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/8.jpg)
Back
POWERSUPPLY
SCR BRIDGE CKT
230V AC
ADC
ZEROCROSSINGDETECTOR
24V AC
CLOCK & RESET CKT
O/P
MICRO-CONTROLLER
POTENTIAL DIVIDER
![Page 9: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/9.jpg)
Block Diagram Description
POWER SUPPLY
ZERO CROSSING DETECTOR
SCR BRIDGE NETWORK
POTENTIAL DIVIDER
ANALOG TO DIGITAL CONVERTER (ADC 0808)
MICROCONTROLLER 89C51RD2
Back
![Page 10: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/10.jpg)
Power Supply
• Center tapped step down transformer with rating 240V to 24V and 500mA.
• Regulator LM7805 for 5V supply.
• Regulator MC7815C for 15V supply to op-amp.
• Regulator L7915 for -15V supply to op-amp.
Back
![Page 11: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/11.jpg)
Zero Crossing Detector
• Used for synchronization with input mains supply.
• OP-AMP UA 741 is used.
• Supply is given from regulators to OP-AMP.
Back
![Page 12: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/12.jpg)
SCR Bridge
Consist of:
• Two pair of SCR in a bridge form, i.e. each two in series
• And a load (assumed resistive, 10k ohm)
Back
![Page 13: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/13.jpg)
Potential Divider
• Provides feedback to ADC
• Uses the ratio is 59:1
Back
![Page 14: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/14.jpg)
Analog to Digital Converter
• Input dc analog from Potential divider
• Output digital to microcontroller
Back
![Page 15: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/15.jpg)
Micro-controller
• The only Decision making block of the system
• Takes decision of the firing angle of the SCR
• Acts as a comparator
Back
![Page 16: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/16.jpg)
• Circuit Diagram
• Component Specifications
Back
Circuit Diagram & Component Specification
![Page 17: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/17.jpg)
R 7
1 k
D 8
DIO
DE
C 2
10uf
T1
TR
AN
SF
OR
ME
R C
T
1 5
6
4 8
D 7
DIO
DE
2
-
+ U 8
UA
741C
3
26
7 14 5
Q 1S C R
U 2 L M 7 8 0 5
1 3V I N V O U T
D 1 D I O D E
U 9
AD
C08
08 7
1 0
1 1
1 21 6
2 2
2 32 42 5
2 62 72 8
12345
96
1 71 41 581 81 92 02 1
E O C
C L K
V C C
+V R E F-V R E F
A L E
A D D CA D D BA D D A
I N 0I N 1I N 2I N 3I N 4I N 5I N 6I N 7
O ES TA R T
D B 0D B 1D B 2D B 3D B 4D B 5D B 6D B 7
VCC
V C C
Y 1
20 M
HZ
C 3
0.1u
f
R 21 k
1
D 4 D I O D E
+5V
R 21 k
C 71 0 u f
U 6
M C 7 8 1 5 C1 3
V I N V O U T
R 6R 3
1 0 k
R 18 . 2 k
V C C
R 4
R4
+ R
5 +
R6
= 59
K
+15v
R 5
C 6 3 0 p f
-15v
C 53 0 p f
D 6D I O D E
24v DC
U 7L 7 9 1 5
2 3V I N V O U T
D 2D I O D E
D 3D I O D E C 4
0.1u
f
240v ac
Q 2S C R
P 2 . 5C 51 0 u f
U 3
89
C5
1
9
1 81 9
2 93 0
3 1
12345678
2 12 22 32 42 52 62 72 8
1 01 11 21 31 41 51 61 7
3 93 83 73 63 53 43 33 2
R S T
XTA L 2XTA L 1
P S E NA L E / P R O G
E A / V P P
P 1 . 0P 1 . 1P 1 . 2P 1 . 3P 1 . 4P 1 . 5P 1 . 6P 1 . 7
P 2 . 0 / A 8P 2 . 1 / A 9
P 2 . 2 / A 1 0P 2 . 3 / A 1 1P 2 . 4 / A 1 2P 2 . 5 / A 1 3P 2 . 6 / A 1 4P 2 . 7 / A 1 5
P 3 . 0 / R XDP 3 . 1 / TXD
P 3 . 2 / I N T0P 3 . 3 / I N T1
P 3 . 4 / T0P 3 . 5 / T1
P 3 . 6 / W RP 3 . 7 / R D
P 0 . 0 / A D 0P 0 . 1 / A D 1P 0 . 2 / A D 2P 0 . 3 / A D 3P 0 . 4 / A D 4P 0 . 5 / A D 5P 0 . 6 / A D 6P 0 . 7 / A D 7
Back
![Page 18: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/18.jpg)
Component Specification
• Regulators LM7805, MC7815, L7915
• Diodes 1N4007
• Op-Amp UA741
• Analog to Digital Converter ADC0808
• Micro-Controller P89C51RD2
• SCR MCR100-6
Back
![Page 19: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/19.jpg)
LM7805
• 3-Terminal Regulators
• Output Current up to 1.5 A
• Internal Thermal-Overload Protection
• Input voltage 35v max
• Operating virtual junction temperature, 150C
Back
![Page 20: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/20.jpg)
Back
![Page 21: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/21.jpg)
MC7815
• Output Current in Excess of 1.0 A
• No External Components Required
• Internal Thermal Overload Protection
• Internal Short Circuit Current Limiting
• Temperature Range of –40°C to +125°C
• Standard 3–Lead Transistor Packages
• Input voltage 40V dc Max
Back
![Page 22: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/22.jpg)
Back
![Page 23: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/23.jpg)
L7915
• Output Current up to 1.5A
• Thermal overload protection
• Short circuit protection
• Input voltage 40V dc Max
• Standard 3–Lead Transistor Packages
Back
![Page 24: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/24.jpg)
Back
![Page 25: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/25.jpg)
Diode• High surge current capability.
• Peak repetitive reverse voltage 1000 V
• Average rectified forward current 1A
• Operating junction temperature -55 to +175 C
• Power dissipation 3 W
Back
![Page 26: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/26.jpg)
Op-amp
• Large Input Voltage range• High gain• Short-Circuit protection• Supply voltage +/- 22V• Input voltage +/- 15V• Power dissipation 500mW
Back
![Page 27: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/27.jpg)
Microcontroller• 80C51 Central Processing Unit.• On-chip Flash Program Memory with In-System Programming (ISP) and In-Application Programming (IAP) capability• 6 clocks per machine cycle operation (standard)• Speed up to 20 MHz with 6 clock cycles per machine cycle(40 MHz equivalent performance)• RAM expandable externally to 64 kB• 4 level priority interrupt• Four 8-bit I/O ports. Pin diagram• Power control modes - Clock can be stopped and resumed - Idle mode - Power down mode
Back
![Page 28: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/28.jpg)
Back
![Page 29: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/29.jpg)
MCR 100-6
• Blocking Voltage to 600 V.
• ON State Current Rating of 0.8 Amperes.
• Latching Current is typ. 0.6 mA and max. 10 mA.
• Holding Current is typ. 0.5 mA and max. 5 mA.
• High Surge Current Capability 10 A.
• SCR Characteristics
• 3–Lead Transistor Packages Back
![Page 30: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/30.jpg)
Voltage Current characteristic of SCR
Back
![Page 31: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/31.jpg)
ADC 0808• 8-channel multiplexer with address logic.
• 0V to 5V input range with single 5V power supply.
• Resolution 8 bits.
• Conversion time 100 us.
• Voltage at Control Inputs -0.3V to +15V
Pin Diagram Back
![Page 32: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/32.jpg)
Back
![Page 33: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/33.jpg)
Back
![Page 34: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/34.jpg)
D 6D I O D E
-15v
C 2
10uf
T1
TR
AN
SF
OR
ME
R C
T
1 5
6
4 8
V C C
24v DC
R 21 k
Y 1
20 M
HZ
V C C
R 18 . 2 k
Q 1
S C R
240v ac
R 21 k
P 2 . 5
R 3
1 0 k
U 9
AD
C08
08 7
1 0
1 1
1 21 6
2 2
2 32 42 5
2 62 72 8
12345
96
1 71 41 581 81 92 02 1
E O C
C L K
V C C
+V R E F-V R E F
A L E
A D D CA D D BA D D A
I N 0I N 1I N 2I N 3I N 4I N 5I N 6I N 7
O ES TA R T
D B 0D B 1D B 2D B 3D B 4D B 5D B 6D B 7
C 4
0.1u
f
D 4 D I O D E
C 53 0 p f
D 3D I O D E
U 6
M C 7 8 1 5 C1 3
V I N V O U T
C 3
0.1u
f
C 71 0 u f
U 7L 7 9 1 5
2 3V I N V O U T
2
C 6 3 0 p f
D 2D I O D E
C 51 0 u f
U 3
89
C5
1
9
1 81 9
2 93 0
3 1
12345678
2 12 22 32 42 52 62 72 8
1 01 11 21 31 41 51 61 7
3 93 83 73 63 53 43 33 2
R S T
XTA L 2XTA L 1
P S E NA L E / P R O G
E A / V P P
P 1 . 0P 1 . 1P 1 . 2P 1 . 3P 1 . 4P 1 . 5P 1 . 6P 1 . 7
P 2 . 0 / A 8P 2 . 1 / A 9
P 2 . 2 / A 1 0P 2 . 3 / A 1 1P 2 . 4 / A 1 2P 2 . 5 / A 1 3P 2 . 6 / A 1 4P 2 . 7 / A 1 5
P 3 . 0 / R XDP 3 . 1 / TXD
P 3 . 2 / I N T0P 3 . 3 / I N T1
P 3 . 4 / T0P 3 . 5 / T1
P 3 . 6 / W RP 3 . 7 / R D
P 0 . 0 / A D 0P 0 . 1 / A D 1P 0 . 2 / A D 2P 0 . 3 / A D 3P 0 . 4 / A D 4P 0 . 5 / A D 5P 0 . 6 / A D 6P 0 . 7 / A D 7
R 4
R4
+ R
5 +
R6
= 5
9K
U 2 L M 7 8 0 5
1 3V I N V O U T
R 5
1
R 6Q 2S C R
VCC
+5V
P 2 . 5
R 8
1 k
D 1 D I O D E
Q 4S C R
+15v
Q 3S C R
-
+ U 8
UA
741
C
3
26
7 14 5
Back
![Page 35: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/35.jpg)
Three Phase Line & Load Regulation using SCR and
Microcontroller
![Page 36: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/36.jpg)
FLOW CHARTS
• Main Program (Flow-chart & Code)
• Read Output of ADC
• Pulse Width Calculation
• Delay Calculation for Firing Pulse
• Delay for Firing Pulse Back
![Page 37: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/37.jpg)
Three Phase Line & Load Regulation using SCR and
Microcontroller
![Page 38: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/38.jpg)
Start
End
Set timer in mode zero
Load timer with ADC Val.
Start timer
Stop timer
Reset timer flag
Is TF=1
No
Yes
Back
![Page 39: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/39.jpg)
Start
Get value for timer
register from look-up table
End
Back
![Page 40: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/40.jpg)
Start
Reset timer flag
Stop timer
Start timer
Load timer register
Set timer in mode zero
Is TF=1
End
Yes
No
Back
![Page 41: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/41.jpg)
Start
Activate SOC
Monitor EOC
Activate output enable
ActivateALE
End
Back
![Page 42: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/42.jpg)
A
Set port pin P2.1
Delay for firing pulse
Delay calc. for firing pulse
Read output from ADC
Is ZCD=1
Reset port pin P2.1
Pulse width delay
R
Yes
No
Back
![Page 43: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/43.jpg)
START
Set port P1 as input port
Read output of ADC
Delay calc. for firing pulse
Delay for firing pulse
Set port pin P2.0
Pulse width delay
Reset port pin P2.0
Is ZCD=1
A
R
No
Yes
Next
![Page 44: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/44.jpg)
Back
![Page 45: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/45.jpg)
Conclusion
We designed hardware for voltage regulation by using SCR Bridge, which senses fluctuations in the single-phase input mains supply across the load and nullifies it.
Hence our device is capable of regulating the single-phase mains supply to a constant dc supply across the load, irrespective of any changes in the supply, hence providing protection to the load device from getting damaged due to sudden variations in the mains.
Next
![Page 46: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/46.jpg)
Future Enhancement
To implement the line and load regulation of three phase supply.
Implementation of ARM co-processor in place of micro-controller 89C51RD2.
Next
![Page 47: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/47.jpg)
Thank you
![Page 48: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/48.jpg)
unsigned int delay_calc(){ unsigned char i,ip=0; unsigned int hex_value=0; code unsigned char ip_adc[ ]={0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xc7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF,
0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF, 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9,
0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF}; code unsigned int tmod_value[ ]={0xFD1D, 0xFBDE, 0xFAED, 0xFA23, 0xF972, 0xF8D4, 0xF843,
0xF7BC, 0xF73F, 0xF6C9, 0xF659, 0xF5EF, 0xF58A, 0xF529, 0xF4CC, 0xF472, 0xF41B, 0xF3C8, 0xF377, 0xF329, 0xF2DD, 0xF293, 0xF248, 0xF205, 0xF1C0, 0xF17E, 0xF13C, 0xF0FD, 0xF0BF, 0xF082, 0xF046, 0xF00C, 0xEFD3, 0xEF9A, 0xEF63, 0xEF2D, 0xEEF8, 0xEEC4, 0xEE91, 0xEE5F, 0xEE2D, 0xEDFD, 0xEDCD, 0xED9D, 0xED6F, 0xED41, 0xED14, 0xECE8, 0xECBC, 0xEC91, 0xEC66, 0xEC3D, 0xEC13, 0xEBEA, 0xEBC2, 0xEB9A,
0xEB73, 0xEB4C, 0xEB26, 0xEB00, 0xEADB, 0xEAB6};ip=P1;if(ip>0xC1){ for(i=0;i<62;i++)
{ if(ip==ip_adc[i]) { hex_value=tmod_value[i];
break; } }} else{hex_value=0xFFFF;}return(hex_value);
}
Back
![Page 49: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/49.jpg)
sbit trigger1=P2^0;
sbit trigger2=P2^1;
sbit soc=P2^2;
sbit eoc=P2^3;
sbit oe=P2^4;
sbit zcd=P2^5;
Back
![Page 50: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/50.jpg)
unsigned char ADC(void);
void delay_trigger(void);
unsigned int delay_calc(void);
void angle_delay(unsigned char, unsigned char);
Back
![Page 51: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/51.jpg)
unsigned char ADC(void){
oe=1;
soc=1;LOOP_5:
soc=0;if(soc==1)goto LOOP_5;
while(eoc==1);
oe=0;return(0);
}
Back
![Page 52: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/52.jpg)
void delay_trigger(){
TMOD=0x01;TH0=0xF9;TL0=0x7D;TR0=1;while(!TF0);TR0=0;TF0=0;
}
Back
![Page 53: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/53.jpg)
void angle_delay(unsigned char tl0, unsigned char th0){
TMOD=0x01;TL0 = tl0;TH0 = th0;TR0 = 1;while(!TF0);TR0 = 0;TF0 = 0;
}
Back
![Page 54: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/54.jpg)
#include <stdio.h>#include <reg51.h>#include <set_bit.h>#include <func_declaration.h>#include <ADC.h>#include <delay_trigger.h>#include <angle_delay.h>#include <delay_calc.h>void main(){ unsigned int b; unsigned char tl0,th0;do{ P1=0x0ff;
ADC();b = delay_calc();tl0 = b;b = b&0xFF00;b = b>>8;th0=b;while(!zcd);angle_delay(tl0,th0);
LOOP_2:trigger1=1;if(!trigger1)goto LOOP_2;
delay_trigger(); //turn on time delay(pulse width)tot=1000us.
Next
![Page 55: Three Phase Final Presentation Slides NEW](https://reader033.fdocuments.us/reader033/viewer/2022051615/552907544a7959c2158b45f0/html5/thumbnails/55.jpg)
LOOP_3: trigger1=0;if(trigger1)goto LOOP_3;
ADC();b = delay_calc();tl0 = b;b = b&0xFF00;b = b>>8;th0=b;while(zcd);angle_delay(tl0,th0);LOOP_4: trigger2=1;
if(!trigger2)goto LOOP_4;
delay_trigger(); //turn on time delay(pulse width)tot=1000us.
LOOP_5: trigger2=0;if(trigger2)goto LOOP_5;
}while(1);}
Back