Wednesday, 26 November 2014

week 11 - testing the dc motor engine

12v DC MOTOR

In order to make the prototype cruise, 12V DC motor is installed to the back of prototype. This motor is connected directly from the PIC microcontroller circuit.



12V DC motor as engine



Thursday, 20 November 2014

week 10 - data collection

1) SOLAR PANEL DATA COLLECTION

Time
voltage
current
08.00a.m
19.45 volt
0.154 amp
09.00a.m
20.01 volt
0.149 amp
10.00a.m
19.99 volt
0.150 amp
11.00a.m
18.53 volt
0.161 amp
12.00p.m
20.00 volt
0.150 amp
01.00p.m
18.78 volt
0.159 amp
02.00p.m
20.00 volt
0.150 amp
03.00p.m
18.31 volt
0.163 amp
04.00p.m
17.59 volt
0.170 amp
05.00p.m
17.26 volt
0.173 amp
06.00p.m
17.45 volt
0.171 amp
07.00p.m
13.90 volt
0.215 amp
08.00p.m
01.51 volt
1.986 amp





















data collection from 8.00a.m to 8.00p.m for solar energy




Graph of solar panel output voltage




2) WIND TURBINE DATA COLLECTION


Speed (km/h)
voltage
0
0
1
1.26 volt
2
3.62 volt
3
4.73 volt
4
6.10 volt
5
7.20 volt
6
8.40 volt













data collection of wind turbine 


Graph of wind turbine output voltage

3) SEA - WAVES GENERATOR


Strokes per 10 seconds
voltage
one
3.490 volt
two
8.760 volt
Three
12.11 volt
Four
12.59 volt
average
9.237 volt

data collection for sea-waves generator



graph of sea-waves generator


Wednesday, 12 November 2014

week 9 - testing the prototype


1) SOLAR PANEL TEST

In this task, it focuses on testing the solar radiation test. From the task that carried out, the results that obtained from this project will be explained throughout this chapter by a graph and table. 



2) WIND TURBINE TEST

In this task, it focuses on testing the wind turbine test. From the task that carried out, the results that obtained from this project will be explained throughout this chapter by a graph and table.



3) SEA-WAVES GENERATOR

In this task, it focuses on testing the sea-waves generator. Based on the task carried out, the result are collected and recorded. All the data are able in the table.





.

Thursday, 6 November 2014

week 8 - assembling the circuit to the structure


After all circuit and structure complete assemble, this prototype is ready for testing and collecting data. There are few leakage and cause water get into the prototype. To solve the problem hot glue is use to seal the leakage.


top view of the prototype


side view of the prototype



back view of the prototype


front view of the prototype

Friday, 31 October 2014

week 7 semester 2 - testing the circuit

After a few times correcting the coding error and circuit, its finally work the way i desire. here is the picture of the running circuit without renewable source yet.






VA = to indicate voltage in from the first source
VB = to indicate voltage in from the second source
VC = to indicate voltage in from the third source
VD = the amount of the supply or storage
Total = to indicate the voltage amount left in the storage
% of VD = percentage of the total amount in the storage

Sunday, 26 October 2014

week 6 semester 2 - The program

here is where we reach the part which coding or programming take place. since the circuit have be troubleshoot and work properly, it need a program to complete the system. so, the program for this project or circuit not very complex or complicated, because it just want to show the display of the voltage input and the total voltage collected in the storage.




 //variables
unsigned int batA,batB,batC,batD;
unsigned char arr_batA[4],arr_batB[4],arr_batC[4],arr_batD[5];

/*----------------------------- Initialization function -----------*/
void mcu_init()
{
//Lcd
Lcd_Config(&PORTB, 4, 5, 6, 3, 2, 1, 0); // Lcd_Init
Lcd_Cmd(Lcd_CLEAR);//Clear display
Lcd_Cmd(Lcd_CURSOR_OFF);//Turn cursor off

//relay
TRISD=0;
PORTD=1;
}
/*-------------------------- End of intialization --------------------*/

/*----------------------------- display values ----------------*/
void display_values()
{
 unsigned long temp,percent;
 unsigned int total;
//calculat battery A voltage
 temp=(unsigned long)(batA*20);
 temp=temp*100;
 batA = (unsigned int)(temp/1023);
  arr_batA[0]=batA/1000;
  arr_batA[1]=(batA%1000)/100;
  arr_batA[2]=((batA%1000)%100)/10;
  arr_batA[3]=((batA%1000)%100)%10;
  Lcd_Chr(1, 4, arr_batA[0]+'0');
  Lcd_Chr(1, 5, arr_batA[1]+'0');
  Lcd_Chr(1, 6, '.');
  Lcd_Chr(1, 7, arr_batA[2]+'0');
  Lcd_Chr(1, 8, arr_batA[3]+'0');


//calculate battery B  voltage
 temp=(unsigned long)(batB*20);
 temp=temp*100;
 batB = (unsigned int)(temp/1023);
  arr_batB[0]=batB/1000;
  arr_batB[1]=(batB%1000)/100;
  arr_batB[2]=((batB%1000)%100)/10;
  arr_batB[3]=((batB%1000)%100)%10;
  Lcd_Chr(1, 13, arr_batB[0]+'0');
  Lcd_Chr(1, 14, arr_batB[1]+'0');
  Lcd_Chr(1, 15, '.');
  Lcd_Chr(1, 16, arr_batB[2]+'0');
  Lcd_Chr(1, 17, arr_batB[3]+'0');
  
  //calculate battery C  voltage
 temp=(unsigned long)(batC*20);
 temp=temp*100;
 batC = (unsigned int)(temp/1023);
  arr_batC[0]=batC/1000;
  arr_batC[1]=(batC%1000)/100;
  arr_batC[2]=((batC%1000)%100)/10;
  arr_batC[3]=((batC%1000)%100)%10;
  Lcd_Chr(2, 4, arr_batC[0]+'0');
  Lcd_Chr(2, 5, arr_batC[1]+'0');
  Lcd_Chr(2, 6, '.');
  Lcd_Chr(2, 7, arr_batC[2]+'0');
  Lcd_Chr(2, 8, arr_batC[3]+'0');
  
  //calculate battery D voltage
 temp=(unsigned long)(batD*20);
 temp=temp*100;
 batD = (unsigned int)(temp/1023);
  arr_batD[0]=batD/1000;
  arr_batD[1]=(batD%1000)/100;
  arr_batD[2]=((batD%1000)%100)/10;
  arr_batD[3]=((batD%1000)%100)%10;
  Lcd_Chr(2, 13, arr_batD[0]+'0');
  Lcd_Chr(2, 14, arr_batD[1]+'0');
  Lcd_Chr(2, 15, '.');
  Lcd_Chr(2, 16, arr_batD[2]+'0');
  Lcd_Chr(2, 17, arr_batD[3]+'0');
  
total=batA+batB+batC;
  arr_batD[0]=total/1000;
  arr_batD[1]=(total%1000)/100;
  arr_batD[2]=((total%1000)%100)/10;
  arr_batD[3]=((total%1000)%100)%10;
  Lcd_Chr(3, 7, arr_batD[0]+'0');
  Lcd_Chr(3, 8, arr_batD[1]+'0');
  Lcd_Chr(3, 9, '.');
  Lcd_Chr(3, 10, arr_batD[2]+'0');
  Lcd_Chr(3, 11, arr_batD[3]+'0');
percent= ((unsigned long)batD*100)/12;
  arr_batD[0]=percent/10000;
  arr_batD[1]=(percent%10000)/1000;
  arr_batD[2]=((percent%10000)%1000)/100;
  arr_batD[3]=(((percent%10000)%1000)%100)/10;
  arr_batD[4]=(((percent%10000)%1000)%100)%10;
  Lcd_Chr(4, 9, arr_batD[0]+'0');
  Lcd_Chr(4, 10, arr_batD[1]+'0');
  Lcd_Chr(4, 11, arr_batD[2]+'0');
  Lcd_Chr(4, 12, '.');
  Lcd_Chr(4, 13, arr_batD[3]+'0');
  Lcd_Chr(4, 14, arr_batD[4]+'0');
 


}
/*--------------------------------------------------------------*/

/*----------------------------- main function -----------------*/
void main()
{
 mcu_init();
//static text
 Lcd_Out(1, 1, "VA:      VB:");
 Lcd_Out(2, 1, "VC:      VD:");
 Lcd_Out(3, 1, "Total:");
 Lcd_Out(4, 1, "% of VD:");
 while(1)
 {
batA=Adc_Read(0); //read batA
batB=Adc_Read(1);//read batB
batC=Adc_Read(2);//read batC
batD=Adc_Read(3);//read batD
 display_values();

 //compare values to control relay
 if(batD<1100)//need charging
 {
 PORTD.F0=1;//relay on
 }
  if (batD>=1200)//enough charging
 {
 PORTD.F0=0;//relay off
 }
 }

}
/*------------------------------ End of main-------------------*/