nis2311
Member level 3
- Joined
- Nov 19, 2016
- Messages
- 54
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,286
- Activity points
- 1,804
I am trying to find out the phases of the given supply, the project main aim to protect the three phase motor if any wrong sequence given to motor...........
I am giving three phase AC Voltage (5 volt) with different phases, let us assume R Y B to the RA0 RA1 RA2
I am taking each phase 30 samples, but I cant find it out which phase is that........ How to find the phase starting point or ending point........
My code is below ............Please check the code give me an idea to find phase sequence....................
displaying r,y,b..........
sometimes R is greater or Y is greater or b is greater they are Random in Amplitude...........
but I can't find the which Phase is that...........
I am giving three phase AC Voltage (5 volt) with different phases, let us assume R Y B to the RA0 RA1 RA2
I am taking each phase 30 samples, but I cant find it out which phase is that........ How to find the phase starting point or ending point........
My code is below ............Please check the code give me an idea to find phase sequence....................
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 while(1) { for(i=0;i<=30;i++) { ADCON0=0x85; ///ANO ON adc_read(); ///reading ADC RESULT adc_convert(); ////ADC RESULT CONVERTING TO DECIMAL samples_r[i]=adc_total; ADCON0=0x0D; ///AN1 ON adc_read(); adc_convert(); samples_y[i]=adc_total; ADCON0=0x15; ////AN2 ON adc_read(); adc_convert(); samples_b[i]=adc_total; __delay_ms(10); } for (i =0; i <=30; i++) { if (largest < samples_r[i]) largest = samples_r[i]; }//////finding largest values from samples R PHASE adc_total=largest; r=largest; largest=0; for (i =0; i <=30; i++) { if (largest < samples_y[i]) largest = samples_y[i]; }//largest for Y phase adc_total=largest; y=largest; largest=0; for (i =0; i <=30; i++) { if (largest < samples_b[i]) largest = samples_b[i]; }///largest for B PHASE adc_total=largest; b=largest; largest=0; }
displaying r,y,b..........
sometimes R is greater or Y is greater or b is greater they are Random in Amplitude...........
but I can't find the which Phase is that...........
Last edited by a moderator: