Post on 30-Sep-2020
89
ANEXOS
Anexo 1 Encuesta
Encuesta
Edad_______ Ocupación______________________________
De acuerdo a su criterio, determine las cargas, artefactos o electrodomésticos
que considere deberían estar dispuestos para una vivienda de estrato medio alto
y relacione con una X los horarios en los que usualmente hace uso de este tipo
de cargas en el transcurso del día.
AM PM
HORAS USUALES DE USO 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 11 12
ELECTRODOMÈSTICOS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Si se dispone de una vivienda, la cual como fuente de energía eléctrica usa única
y exclusivamente fuentes renovables (solar, eólica, etc…) cuales consideraría
usted, que serían los artefactos necesarios para garantizar los niveles básicos de
confort que haga de esta residencia un lugar habitable de forma continua. En
caso de presentarse racionamiento de energía, enumere del 1 al 9 los artefactos
descritos anteriormente, a los que usted le daría prioridad de mantener el
servicio, siendo el numero 1 el de mayor prioridad y 9 el de menor prioridad
90
PRIORIDAD
ELECTRODOMESTICOS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
91
Anexo 2 especificaciones técnicas del inversor
Inversor Monofásico de alta eficiencia 150w
Figura 69 Inversor REF 11K300I05
No de Modelo 11K300105
Datos de entrada DC
Tensión Máxima 27 V
Tensión mínima para inicial alimentación 19 V Máxima Corriente DC 8 A
Datos de Salida AC
Potencia máxima AC 150 W
Rango de tensión AC para salida 90-135 v Tensión nominal de red AC 110 v
Frecuencia 50 Hz
Distorsión (THD) < 5%
Eficiencia Máxima 92% Conexión de Salida AC Plug
Datos Generales
Dimensiones (A/A/F) 211x146.3x65.5 mm Peso 0,62 Kg
Temperatura de funcionamiento -10 -+40 °C
Enfriamiento 0-85%
Características de protección Características de Protección Protección Corto-circuito
92
Anexo 3 especificaciones técnicas modulo solar
93
94
Anexo 4 especificaciones técnicas Mosfet
95
Anexo 5 especificaciones fuente Agilent
96
Anexo 6 Modelo SEPIC controlado
97
Anexo 7 Control convertidor SEPIC
int g_nInputNodes=0;
int g_nOutputNodes=0;
int g_nStepCount=0;
float maximo=98; //Maximo y minimo de Vref y punto de inicio de trabajo
float minimo=0;
float Ri=2.30;
float I=0.0,V=0.0,Id=0,Icarga=0,Vcarga=0,Pcarga;
float P=0.0, Pa=0.0, AP=0.0,AV=0.0,AI=0.0;
float Ref=Ri, Ia=0.0, Va=0.0,INC=0.0,ts=0.0,tf=0.0,INC1=0,C=0.0;
int n=0;
int nd=0;
int m=0;
g_nStepCount++;
float INC=0.02,INC1=0.2;
ts=delt;
tf=0.005; // con este valor se fija la frecuencia de paso a 2000 HZ
nd=tf/ts;
if( m==nd) {
Ia=I;
Va=V;
V=in[0]*20;
I=in[2]*15.05;
Pa=P;
P=I*V;
AP=P-Pa;
AI=I-Ia;
AV=V-Va;
Vcarga=in[1]*20;
if( n>=1 ) { //Siguientes iteraciones
if(Vcarga<14){
if(AP>=0 ) {
if(AV>0 ) { Ref=Ref-INC;
}
if(AV<0 ) { Ref=Ref+INC;
}
if(AV=0 ) { Ref=Ref;
}
98
}
// if(AP>=0 )
if(AP<0 ) {
if(AV>0 ) { Ref=Ref+INC;
}
if(AV<0 ) { Ref=Ref-INC;
}
if(AV=0) { Ref=Ref;
}
}
else {Ref=Ref-INC;
}
}
n=1;
if( n<1 ) { Ref=Ri;
n=n+1;} //salida de potencia al xxx para el segundo paso
m=0;
if( Ref<=minimo) { Ref=minimo;
}
if( Ref>=maximo) { Ref=maximo;
}
} //if(
m==nd)
99
Anexo 8 Control Convertidor Boost SFV
#include <16f877a.h>
#fuses HS,NOWDT,NOPROTECT,NOLVP
#use delay(clock=20000000)
long Salida_digital;
int Ref=100;
long INC=1;
long maximo=200;
long minimo=50;
void main()
{
setup_adc_ports(All_ANALOG);
setup_timer_2(T2_DIV_BY_1,249,1);
setup_ccp1(CCP_PWM);
set_pwm1_duty(110);
setup_adc(ADC_CLOCK_DIV_32);
delay_ms(1000);
while(true)
{
set_adc_channel(3);
delay_us(50);
Salida_digital = read_adc();
if(Salida_digital<210 )
{
Ref=Ref+INC;
}
if(Salida_digital>210 )
{
Ref=Ref-INC;
}
if(Ref>maximo)
{
Ref=maximo;
100
}
if(Ref<minimo)
{
Ref=minimo;
}
set_pwm1_duty(Ref);
delay_ms(2);
}
}
101
Anexo 9 Control Convertidor Boost VE
#include <16f877a.h>
#fuses HS,NOWDT,NOPROTECT,NOLVP
#use delay(clock=20000000)
long Salida_digital;
int Ref=100;
long INC=1;
long maximo=190;
long minimo=50;
void main()
{
setup_adc_ports(All_ANALOG);
setup_timer_2(T2_DIV_BY_1,249,1);
setup_ccp1(CCP_PWM);
set_pwm1_duty(110);
setup_adc(ADC_CLOCK_DIV_32);
delay_ms(1000);
while(true)
{
set_adc_channel(0);
delay_us(50);
Salida_digital = read_adc();
if(Salida_digital<204)
{
Ref=Ref+INC;
}
if(Salida_digital>204)
{
Ref=Ref-INC;
}
102
if(Ref>maximo)
{
Ref=maximo;
}
if(Ref<minimo)
{
Ref=minimo;
}
set_pwm1_duty(Ref);
delay_ms(2);
}
}
103
Anexo 10 Código Sistema de Gestión
#include <18f4550.h>
#fuses HS,NOWDT,NOPROTECT,NOLVP
#use delay(clock=20000000)
int32 VIN; int32 VPanel; int32 VEV; int32 DISEV; int32 refpv; int32 tin; int32 top; int32
refev; int32 refpanel; int32 refout;
void main()
{
setup_adc_ports(All_ANALOG);
setup_adc(ADC_CLOCK_DIV_32);
refpv= 99; // 11.2v Bateria 12 voltios 7ah
refpanel= 120; //12.56v
refev= 96; //11v, Bateria 12 voltios 18ah
refout= 88;
tin=600;
top=1000;
Secuencia1:
while(1){
set_adc_channel(0); delay_us(50); VIN = read_adc();
if(VIN>=refpv){output_low(PIN_C2); output_high(PIN_D6); delay_ms(tin);}
if(VIN>=refpv){output_high(PIN_D1); delay_ms(tin);} //A2
if(VIN>=refpv){output_high(PIN_D7); delay_ms(tin);} //m1
if(VIN>=refpv){output_high(PIN_D3); delay_ms(tin);} //m2
if(VIN>=refpv){output_high(PIN_E1); delay_ms(tin);} //m3
if(VIN>=refpv){output_high(PIN_E2); delay_ms(tin);} //m4
if(VIN>=refpv){output_high(PIN_D5); delay_ms(tin);} //M5
if(VIN>=refpv){output_high(PIN_D0); delay_ms(tin);} //M6
if(VIN>=refpv){output_high(PIN_C1); delay_ms(tin);} //M7
if(VIN>=refpv){output_high(PIN_B0); delay_ms(tin);} //B1
if(VIN>=refpv){output_high(PIN_D2); delay_ms(tin);} //B2
104
if(VIN>=refpv){output_high(PIN_B1); delay_ms(tin);} //B3
if(VIN>=refpv){output_high(PIN_B5); delay_ms(tin);} //B4
if(VIN>=refpv){output_high(PIN_B6); delay_ms(tin);} //B5
if(VIN>=refpv){output_high(PIN_B4); delay_ms(tin);} //B6
if(VIN>=refpv){output_high(PIN_D4); delay_ms(tin);} //B7
if(VIN>=refpv){output_high(PIN_B2); delay_ms(tin);} //B8
if(VIN>=refpv){output_high(PIN_B3); delay_ms(tin);} //B9
if(VIN>=refpv){output_high(PIN_C7); delay_ms(tin);} //B10
if(VIN>=refpv){output_high(PIN_B7); delay_ms(tin);} //B11
if(VIN<refpv){output_low(PIN_B7); delay_ms(top); GOTO Secuencia2;}
}
Secuencia2:
while(1){
set_adc_channel(0); delay_us(50); VIN = read_adc();
if(VIN>=refpv){output_low(PIN_C2); output_high(PIN_D6);}
if(VIN>=refpv){output_high(PIN_D1); } //A2
if(VIN>=refpv){output_high(PIN_D7); } //m1
if(VIN>=refpv){output_high(PIN_D3); } //m2
if(VIN>=refpv){output_high(PIN_E1); } //m3
if(VIN>=refpv){output_high(PIN_E2); } //m4
if(VIN>=refpv){output_high(PIN_D5); } //M5
if(VIN>=refpv){output_high(PIN_D0); } //M6
if(VIN>=refpv){output_high(PIN_C1); } //M7
if(VIN>=refpv){output_high(PIN_B0); } //B1
if(VIN>=refpv){output_high(PIN_D2); } //B2
if(VIN>=refpv){output_high(PIN_B1); } //B3
if(VIN>=refpv){output_high(PIN_B5); } //B4
if(VIN>=refpv){output_high(PIN_B6); } //B5
if(VIN>=refpv){output_high(PIN_B4); } //B6
if(VIN>=refpv){output_high(PIN_D4); } //B7
if(VIN>=refpv){output_high(PIN_B2); } //B8
if(VIN>=refpv){output_high(PIN_B3); } //B9
105
if(VIN>=refpv){output_high(PIN_C7); } //B10
set_adc_channel(0);
delay_us(50);
VIN = read_adc();
if(VIN>=refpanel){delay_ms(top); GOTO Secuencia1;}
if(VIN<refout){GOTO SISEV;}
if(VIN<refpv){output_low(PIN_C7); delay_ms(top); GOTO Secuencia3;}
}
Secuencia3:
while(1){
set_adc_channel(0); delay_us(50); VIN = read_adc();
if(VIN>=refpv){output_low(PIN_C2); output_high(PIN_D6);}
if(VIN>=refpv){output_high(PIN_D1); } //A2
if(VIN>=refpv){output_high(PIN_D7); } //m1
if(VIN>=refpv){output_high(PIN_D3); } //m2
if(VIN>=refpv){output_high(PIN_E1); } //m3
if(VIN>=refpv){output_high(PIN_E2); } //m4
if(VIN>=refpv){output_high(PIN_D5); } //M5
if(VIN>=refpv){output_high(PIN_D0); } //M6
if(VIN>=refpv){output_high(PIN_C1); } //M7
if(VIN>=refpv){output_high(PIN_B0); } //B1
if(VIN>=refpv){output_high(PIN_D2); } //B2
if(VIN>=refpv){output_high(PIN_B1); } //B3
if(VIN>=refpv){output_high(PIN_B5); } //B4
if(VIN>=refpv){output_high(PIN_B6); } //B5
if(VIN>=refpv){output_high(PIN_B4); } //B6
if(VIN>=refpv){output_high(PIN_D4); } //B7
if(VIN>=refpv){output_high(PIN_B2); } //B8
if(VIN>=refpv){output_high(PIN_B3); } //B9
106
set_adc_channel(0);
delay_us(50);
VIN = read_adc();
if(VIN>=refpanel){delay_ms(top); GOTO Secuencia2;}
if(VIN<refout){GOTO SISEV;}
if(VIN<refpv){output_low(PIN_B3); delay_ms(top); GOTO Secuencia4;}
}
Secuencia4:
while(1){
set_adc_channel(0); delay_us(50); VIN = read_adc();
if(VIN>=refpv){output_low(PIN_C2); output_high(PIN_D6);}
if(VIN>=refpv){output_high(PIN_D1); } //A2
if(VIN>=refpv){output_high(PIN_D7); } //m1
if(VIN>=refpv){output_high(PIN_D3); } //m2
if(VIN>=refpv){output_high(PIN_E1); } //m3
if(VIN>=refpv){output_high(PIN_E2); } //m4
if(VIN>=refpv){output_high(PIN_D5); } //M5
if(VIN>=refpv){output_high(PIN_D0); } //M6
if(VIN>=refpv){output_high(PIN_C1); } //M7
if(VIN>=refpv){output_high(PIN_B0); } //B1
if(VIN>=refpv){output_high(PIN_D2); } //B2
if(VIN>=refpv){output_high(PIN_B1); } //B3
if(VIN>=refpv){output_high(PIN_B5); } //B4
if(VIN>=refpv){output_high(PIN_B6); } //B5
if(VIN>=refpv){output_high(PIN_B4); } //B6
if(VIN>=refpv){output_high(PIN_D4); } //B7
if(VIN>=refpv){output_high(PIN_B2); } //B8
set_adc_channel(0);
delay_us(50);
VIN = read_adc();
107
if(VIN>=refpanel){delay_ms(top); GOTO Secuencia3;}
if(VIN<refout){GOTO SISEV;}
if(VIN<refpv){output_low(PIN_B2); delay_ms(top); GOTO Secuencia5;}
}
Secuencia5:
while(1){
set_adc_channel(0); delay_us(50); VIN = read_adc();
if(VIN>=refpv){output_low(PIN_C2); output_high(PIN_D6);}
if(VIN>=refpv){output_high(PIN_D1); } //A2
if(VIN>=refpv){output_high(PIN_D7); } //m1
if(VIN>=refpv){output_high(PIN_D3); } //m2
if(VIN>=refpv){output_high(PIN_E1); } //m3
if(VIN>=refpv){output_high(PIN_E2); } //m4
if(VIN>=refpv){output_high(PIN_D5); } //M5
if(VIN>=refpv){output_high(PIN_D0); } //M6
if(VIN>=refpv){output_high(PIN_C1); } //M7
if(VIN>=refpv){output_high(PIN_B0); } //B1
if(VIN>=refpv){output_high(PIN_D2); } //B2
if(VIN>=refpv){output_high(PIN_B1); } //B3
if(VIN>=refpv){output_high(PIN_B5); } //B4
if(VIN>=refpv){output_high(PIN_B6); } //B5
if(VIN>=refpv){output_high(PIN_B4); } //B6
if(VIN>=refpv){output_high(PIN_D4); } //B7
set_adc_channel(0);
delay_us(50);
VIN = read_adc();
if(VIN>=refpanel){delay_ms(top); GOTO Secuencia4;}
if(VIN<refout){GOTO SISEV;}
108
if(VIN<refpv){output_low(PIN_D4); delay_ms(top); GOTO Secuencia6;}
}
Secuencia6:
while(1){
set_adc_channel(0); delay_us(50); VIN = read_adc();
if(VIN>=refpv){output_low(PIN_C2); output_high(PIN_D6);}
if(VIN>=refpv){output_high(PIN_D1); } //A2
if(VIN>=refpv){output_high(PIN_D7); } //m1
if(VIN>=refpv){output_high(PIN_D3); } //m2
if(VIN>=refpv){output_high(PIN_E1); } //m3
if(VIN>=refpv){output_high(PIN_E2); } //m4
if(VIN>=refpv){output_high(PIN_D5); } //M5
if(VIN>=refpv){output_high(PIN_D0); } //M6
if(VIN>=refpv){output_high(PIN_C1); } //M7
if(VIN>=refpv){output_high(PIN_B0); } //B1
if(VIN>=refpv){output_high(PIN_D2); } //B2
if(VIN>=refpv){output_high(PIN_B1); } //B3
if(VIN>=refpv){output_high(PIN_B5); } //B4
if(VIN>=refpv){output_high(PIN_B6); } //B5
if(VIN>=refpv){output_high(PIN_B4); } //B6
set_adc_channel(0);
delay_us(50);
VIN = read_adc();
if(VIN>=refpanel){delay_ms(top); GOTO Secuencia5;}
if(VIN<refout){GOTO SISEV;}
if(VIN<refpv){output_low(PIN_B4); delay_ms(top); GOTO Secuencia7;}
}
Secuencia7:
while(1){
109
set_adc_channel(0); delay_us(50); VIN = read_adc();
if(VIN>=refpv){output_low(PIN_C2); output_high(PIN_D6);}
if(VIN>=refpv){output_high(PIN_D1); } //A2
if(VIN>=refpv){output_high(PIN_D7); } //m1
if(VIN>=refpv){output_high(PIN_D3); } //m2
if(VIN>=refpv){output_high(PIN_E1); } //m3
if(VIN>=refpv){output_high(PIN_E2); } //m4
if(VIN>=refpv){output_high(PIN_D5); } //M5
if(VIN>=refpv){output_high(PIN_D0); } //M6
if(VIN>=refpv){output_high(PIN_C1); } //M7
if(VIN>=refpv){output_high(PIN_B0); } //B1
if(VIN>=refpv){output_high(PIN_D2); } //B2
if(VIN>=refpv){output_high(PIN_B1); } //B3
if(VIN>=refpv){output_high(PIN_B5); } //B4
if(VIN>=refpv){output_high(PIN_B6); } //B5
set_adc_channel(0);
delay_us(50);
VIN = read_adc();
if(VIN>=refpanel){delay_ms(top); GOTO Secuencia6;}
if(VIN<refout){GOTO SISEV;}
if(VIN<refpv){output_low(PIN_B6); delay_ms(top); GOTO Secuencia8;}
}
Secuencia8:
while(1){
set_adc_channel(0); delay_us(50); VIN = read_adc();
if(VIN>=refpv){output_low(PIN_C2); output_high(PIN_D6);}
if(VIN>=refpv){output_high(PIN_D1); } //A2
if(VIN>=refpv){output_high(PIN_D7); } //m1
110
if(VIN>=refpv){output_high(PIN_D3); } //m2
if(VIN>=refpv){output_high(PIN_E1); } //m3
if(VIN>=refpv){output_high(PIN_E2); } //m4
if(VIN>=refpv){output_high(PIN_D5); } //M5
if(VIN>=refpv){output_high(PIN_D0); } //M6
if(VIN>=refpv){output_high(PIN_C1); } //M7
if(VIN>=refpv){output_high(PIN_B0); } //B1
if(VIN>=refpv){output_high(PIN_D2); } //B2
if(VIN>=refpv){output_high(PIN_B1); } //B3
if(VIN>=refpv){output_high(PIN_B5); } //B4
set_adc_channel(0);
delay_us(50);
VIN = read_adc();
if(VIN>=refpanel){delay_ms(top); GOTO Secuencia7;}
if(VIN<refout){GOTO SISEV;}
if(VIN<refpv){output_low(PIN_B5); delay_ms(top); GOTO Secuencia9;}
}
Secuencia9:
while(1){
set_adc_channel(0); delay_us(50); VIN = read_adc();
if(VIN>=refpv){output_low(PIN_C2); output_high(PIN_D6);}
if(VIN>=refpv){output_high(PIN_D1); } //A2
if(VIN>=refpv){output_high(PIN_D7); } //m1
if(VIN>=refpv){output_high(PIN_D3); } //m2
if(VIN>=refpv){output_high(PIN_E1); } //m3
if(VIN>=refpv){output_high(PIN_E2); } //m4
if(VIN>=refpv){output_high(PIN_D5); } //M5
if(VIN>=refpv){output_high(PIN_D0); } //M6
if(VIN>=refpv){output_high(PIN_C1); } //M7
111
if(VIN>=refpv){output_high(PIN_B0); } //B1
if(VIN>=refpv){output_high(PIN_D2); } //B2
if(VIN>=refpv){output_high(PIN_B1); } //B3
set_adc_channel(0);
delay_us(50);
VIN = read_adc();
if(VIN>=refpanel){delay_ms(top); GOTO Secuencia8;}
if(VIN<refout){GOTO SISEV;}
if(VIN<refpv){output_low(PIN_B1); delay_ms(top); GOTO Secuencia10;}
}
Secuencia10:
while(1){
set_adc_channel(0); delay_us(50); VIN = read_adc();
if(VIN>=refpv){output_low(PIN_C2); output_high(PIN_D6);}
if(VIN>=refpv){output_high(PIN_D1); } //A2
if(VIN>=refpv){output_high(PIN_D7); } //m1
if(VIN>=refpv){output_high(PIN_D3); } //m2
if(VIN>=refpv){output_high(PIN_E1); } //m3
if(VIN>=refpv){output_high(PIN_E2); } //m4
if(VIN>=refpv){output_high(PIN_D5); } //M5
if(VIN>=refpv){output_high(PIN_D0); } //M6
if(VIN>=refpv){output_high(PIN_C1); } //M7
if(VIN>=refpv){output_high(PIN_B0); } //B1
if(VIN>=refpv){output_high(PIN_D2); } //B2
set_adc_channel(0);
delay_us(50);
VIN = read_adc();
if(VIN>=refpanel){delay_ms(top); GOTO Secuencia9;}
112
if(VIN<refout){GOTO SISEV;}
if(VIN<refpv){output_low(PIN_D2); delay_ms(top); GOTO Secuencia11;}
}
Secuencia11:
while(1){
set_adc_channel(0); delay_us(50); VIN = read_adc();
if(VIN>=refpv){output_low(PIN_C2); output_high(PIN_D6);}
if(VIN>=refpv){output_high(PIN_D1); } //A2
if(VIN>=refpv){output_high(PIN_D7); } //m1
if(VIN>=refpv){output_high(PIN_D3); } //m2
if(VIN>=refpv){output_high(PIN_E1); } //m3
if(VIN>=refpv){output_high(PIN_E2); } //m4
if(VIN>=refpv){output_high(PIN_D5); } //M5
if(VIN>=refpv){output_high(PIN_D0); } //M6
if(VIN>=refpv){output_high(PIN_C1); } //M7
if(VIN>=refpv){output_high(PIN_B0); } //B1
set_adc_channel(0);
delay_us(50);
VIN = read_adc();
if(VIN>=refpanel){delay_ms(top); GOTO Secuencia10;}
if(VIN<refout){GOTO SISEV;}
if(VIN<refpv){output_low(PIN_B0); delay_ms(top); GOTO Secuencia12;}
}
Secuencia12:
while(1){
set_adc_channel(0); delay_us(50); VIN = read_adc();
if(VIN>=refpv){output_low(PIN_C2); output_high(PIN_D6);}
if(VIN>=refpv){output_high(PIN_D1); } //A2
113
if(VIN>=refpv){output_high(PIN_D7); } //m1
if(VIN>=refpv){output_high(PIN_D3); } //m2
if(VIN>=refpv){output_high(PIN_E1); } //m3
if(VIN>=refpv){output_high(PIN_E2); } //m4
if(VIN>=refpv){output_high(PIN_D5); } //M5
if(VIN>=refpv){output_high(PIN_D0); } //M6
if(VIN>=refpv){output_high(PIN_C1); } //M7
set_adc_channel(0);
delay_us(50);
VIN = read_adc();
if(VIN>=refpanel){delay_ms(top); GOTO Secuencia11;}
if(VIN<refout){GOTO SISEV;}
if(VIN<refpv){output_low(PIN_C1); delay_ms(top); GOTO Secuencia13;}
}
Secuencia13:
while(1){
set_adc_channel(0); delay_us(50); VIN = read_adc();
if(VIN>=refpv){output_low(PIN_C2); output_high(PIN_D6);}
if(VIN>=refpv){output_high(PIN_D1); } //A2
if(VIN>=refpv){output_high(PIN_D7); } //m1
if(VIN>=refpv){output_high(PIN_D3); } //m2
if(VIN>=refpv){output_high(PIN_E1); } //m3
if(VIN>=refpv){output_high(PIN_E2); } //m4
if(VIN>=refpv){output_high(PIN_D5); } //M5
if(VIN>=refpv){output_high(PIN_D0); } //M6
set_adc_channel(0);
delay_us(50);
VIN = read_adc();
114
if(VIN>=refpanel){delay_ms(top); GOTO Secuencia12;}
if(VIN<refout){GOTO SISEV;}
if(VIN<refpv){output_low(PIN_D0); delay_ms(top); GOTO Secuencia14;}
}
Secuencia14:
while(1){
set_adc_channel(0); delay_us(50); VIN = read_adc();
if(VIN>=refpv){output_low(PIN_C2); output_high(PIN_D6);}
if(VIN>=refpv){output_high(PIN_D1); } //A2
if(VIN>=refpv){output_high(PIN_D7); } //m1
if(VIN>=refpv){output_high(PIN_D3); } //m2
if(VIN>=refpv){output_high(PIN_E1); } //m3
if(VIN>=refpv){output_high(PIN_E2); } //m4
if(VIN>=refpv){output_high(PIN_D5); } //M5
set_adc_channel(0);
delay_us(50);
VIN = read_adc();
if(VIN>=refpanel){delay_ms(top); GOTO Secuencia13;}
if(VIN<refout){GOTO SISEV;}
if(VIN<refpv){output_low(PIN_D5); delay_ms(top); GOTO Secuencia15;}
}
Secuencia15:
while(1){
set_adc_channel(0); delay_us(50); VIN = read_adc();
if(VIN>=refpv){output_low(PIN_C2); output_high(PIN_D6);}
if(VIN>=refpv){output_high(PIN_D1); } //A2
if(VIN>=refpv){output_high(PIN_D7); } //m1
if(VIN>=refpv){output_high(PIN_D3); } //m2
if(VIN>=refpv){output_high(PIN_E1); } //m3
115
if(VIN>=refpv){output_high(PIN_E2); } //m4
set_adc_channel(0);
delay_us(50);
VIN = read_adc();
if(VIN>=refpanel){delay_ms(top); GOTO Secuencia14;}
if(VIN<refout){GOTO SISEV;}
if(VIN<refpv){output_low(PIN_E2); delay_ms(top); GOTO Secuencia16;}
}
Secuencia16:
while(1){
set_adc_channel(0); delay_us(50); VIN = read_adc();
if(VIN>=refpv){output_low(PIN_C2); output_high(PIN_D6);}
if(VIN>=refpv){output_high(PIN_D1); } //A2
if(VIN>=refpv){output_high(PIN_D7); } //m1
if(VIN>=refpv){output_high(PIN_D3); } //m2
if(VIN>=refpv){output_high(PIN_E1); } //m3
set_adc_channel(0);
delay_us(50);
VIN = read_adc();
if(VIN>=refpanel){delay_ms(top); GOTO Secuencia15;}
if(VIN<refout){GOTO SISEV;}
if(VIN<refpv){output_low(PIN_E1); delay_ms(top); GOTO Secuencia17;}
}
Secuencia17:
while(1){
set_adc_channel(0); delay_us(50); VIN = read_adc();
116
if(VIN>=refpv){output_low(PIN_C2); output_high(PIN_D6);}
if(VIN>=refpv){output_high(PIN_D1); } //A2
if(VIN>=refpv){output_high(PIN_D7); } //m1
if(VIN>=refpv){output_high(PIN_D3); } //m2
set_adc_channel(0);
delay_us(50);
VIN = read_adc();
if(VIN>=refpanel){delay_ms(top); GOTO Secuencia16;}
if(VIN<refout){GOTO SISEV;}
if(VIN<refpv){output_low(PIN_D3); delay_ms(top); GOTO Secuencia18;}
}
Secuencia18:
while(1){
set_adc_channel(0); delay_us(50); VIN = read_adc();
if(VIN>=refpv){output_low(PIN_C2); output_high(PIN_D6);}
if(VIN>=refpv){output_high(PIN_D1); } //A2
if(VIN>=refpv){output_high(PIN_D7); } //m1
set_adc_channel(0);
delay_us(50);
VIN = read_adc();
if(VIN>=refpanel){delay_ms(top); GOTO Secuencia17;}
if(VIN<refpv){output_low(PIN_D7); delay_ms(top); GOTO SISEV;}
}
SISEV:
while(1)
{
set_adc_channel(5);
delay_us(50);
117
VEV = read_adc();
output_low(PIN_D0); output_low(PIN_D2); output_low(PIN_D3); output_low(PIN_E1);
output_low(PIN_E2); output_low(PIN_C1); output_low(PIN_C7); output_low(PIN_D4);
output_low(PIN_D5); output_low(PIN_D7); output_low(PIN_B0); output_low(PIN_B1);
output_low(PIN_B2); output_low(PIN_B3); output_low(PIN_B4); output_low(PIN_B5);
output_low(PIN_B6); output_low(PIN_B7);
if(VEV>=refev){output_high(PIN_C2); output_high(PIN_D6); output_high(PIN_D1);
delay_ms(top);}
set_adc_channel(0);
delay_us(50);
VIN = read_adc();
if(VIN>=refpanel){delay_ms(top); GOTO Secuencia18;}
if(VEV<refev){output_low(PIN_D1); delay_ms(top); GOTO SISEV2;}
}
SISEV2:
while(1)
{
set_adc_channel(5);
delay_us(50);
VEV = read_adc();
output_low(PIN_D0); output_low(PIN_D2); output_low(PIN_D3); output_low(PIN_E1);
output_low(PIN_E2); output_low(PIN_C1); output_low(PIN_C7); output_low(PIN_D4);
output_low(PIN_D5); output_low(PIN_D7); output_low(PIN_B0); output_low(PIN_B1);
output_low(PIN_B2); output_low(PIN_B3); output_low(PIN_B4); output_low(PIN_B5);
output_low(PIN_B6); output_low(PIN_B7);
if(VEV>=refev){output_high(PIN_C2); output_high(PIN_D6); delay_ms(top);}
set_adc_channel(0);
118
delay_us(50);
VIN = read_adc();
if(VIN>=refpanel){delay_ms(top); GOTO Secuencia18;}
if(VEV<refev){output_low(PIN_D6); delay_ms(top); GOTO fin;}
}
fin:
while(1)
{
output_low(PIN_C2);
set_adc_channel(0); delay_us(50); VIN = read_adc();
if(VIN>=refpanel){GOTO Secuencia18;}
set_adc_channel(5); delay_us(50); VEV = read_adc();
if(VEV>=128){GOTO SISEV;}
}
}
119
Anexo 11 Esquema Conexión Control Tensión Boost Sistema FV