Thursday, 25 May 2017

FYP 2 PROGRESS - WEEK 12

Title

-The project development (hardware)

Purpose

- complete the hardware and testing with software

Description




The hardware are resemble into project's board and rewiring for better structure. We have to create one special part for vcc and gnd as there a lot of component need to use both vcc and gnd. thus, all gnd and vcc connected through pcb donut board and put it into a box



Wednesday, 17 May 2017

FYP 2 PROGRESS - WEEK 11

Title

-The working code for gsm sim900a

Purpose

- generate and testing the code

Description

#include<LiquidCrystal.h>
#include <SoftwareSerial.h>
SoftwareSerial mySerial(12, 13);
LiquidCrystal lcd(6,7,8,9,10,11);

//int LED = 13;
const int pulse = 7;
float watt = 0.0, price = 0, unit = 0;
int pinState = 0 ;
unsigned int i=0, j=0, p=0;
unsigned long interval = 180000; //1000 1 sec - 60000 1 minutes - 3600000 1 hour
unsigned long intervalx = 10000; //1000 1 sec - 60000 1 minutes - 3600000 1 hour
unsigned long previousMillis = 0;
int sensorValue = 0; // variable to store the value coming from the sensor
int sensorPin = A0; // select the input pin for the potentiometer
int ledPin = 4; // select the pin for the LED
int light_sensitivity = 700;

void setup()
{
//pinMode(LED, OUTPUT);
pinMode(pulse, INPUT);
pinMode (ledPin, OUTPUT);
mySerial.begin(9600);
Serial.begin (9600);
  lcd.begin(16,2);
  lcd.setCursor(0,0);
  lcd.print("WELCOME TO AUTO");
  lcd.setCursor(0,1);
  lcd.print("BILLING SYSTEM");
  delay(2000);
  lcd.clear();
  lcd.setCursor(0,0);
  lcd.print("GSM DINIE");
  lcd.setCursor(0,1);
  lcd.print("   START    ");
  delay(2000);
  lcd.clear();
  
}

void loop()
{
  

unsigned long currentMillis = millis();
pinState = digitalRead(pulse);

if (pinState==HIGH)
{
  //digitalWrite(LED, HIGH);
i++;
delay(200);
}

if(currentMillis-previousMillis >=interval)
{
j=1;
previousMillis=currentMillis;
}

if(j==1)
{
watt = (i*0.3125);
unit = watt/100;
price = unit*0.0218;

mySerial.begin(9600);
mySerial.print("\r");

delay(800);
mySerial.println("AT+CMGF=1/r");
delay(800);
mySerial.println("AT+CMGS=\"+60196907858\"\r");
delay(800);
mySerial.println("Unit");
delay(800);
mySerial.println(unit,6);
delay(800);
mySerial.println("Price");
delay(100);
mySerial.println(price,6);
delay(100);
mySerial.println("RM");
delay(10);
mySerial.write(0x1A);
delay(100);

j=0;
}

if(currentMillis-previousMillis >=intervalx)
{
p=1;
previousMillis=currentMillis;
}

if(p==1)
{
  sensorValue = analogRead (sensorPin);
  Serial.println (sensorValue, DEC); 
  
  if(sensorValue > light_sensitivity) 
  {
  sensorValue = analogRead (sensorPin);
  digitalWrite (ledPin, LOW); 
  Serial.println (sensorValue, DEC); 
  
  mySerial.begin(9600);
  mySerial.print("\r");

  delay(800);
  mySerial.println("AT+CMGF=1/r");
  delay(800);
  mySerial.println("AT+CMGS=\"+60196907858\"\r");
  delay(800);
  mySerial.println("LAMPU ON ");
  delay(800);
  mySerial.write(0x1A);
  delay(100);
  p=0;
  }
  
  else
  {
  sensorValue = analogRead (sensorPin);
  digitalWrite (ledPin, HIGH);
  Serial.println (sensorValue, DEC); 
  p=0;
  }
}

}


Thursday, 11 May 2017

FYP 2 PROGRESS - WEEK 10

Title

- To test the daylight detection system ( photoresistor )

Purpose

- To turned on two lamp when the photoresistor detect dark mode


Description

when the sensor detect no change in light/dark @ didnt meet the setup value of light intensity value.



when the sensor were close it using hand, the sensor detect value equal or above 700 light intensity and send signal to arduino to turned on the lamp ( night mode )


The lcd will display above result


Friday, 5 May 2017

FYP 2 PROGRESS - WEEK 9

Title

-Testing the load consuming power with gsm function

Purpose

- To get output from the gsm to telephone ( real power consuming ) in unit and total price


Description




two lamp turned on and its usage are being monitor and measure through energy meter ( pulse ) 



The pulse were send to arduino and arduino process and calculated and send to gsm to deliver the processed data to another simcard or telephone number for output result



Thursday, 27 April 2017

FYP 2 PROGRESS - WEEK 8

Title

- Calculation of energy meter's power

Purpose

- To get intended calculation consumed power from energy meter based on pulse from meter energy 3200 pulse for 1 kWh which using tnb calculation (for single phase's tariff)


Description



Calculation of Pulses and Units:
Before proceeding for the calculations, firstly  keep in mind the pulse rate of energy meter. There are two pulse rates of energy meter first is 1600 imp/kwh and second is 3200 imp/kwh. So here I am using 3200 imp/kwh pulse rate energy meter.
So first I need to calculate the Pulses for 100watt, means how many times Pulse LED will blink in a minute, for the load of 100 watts.

Pulse= (Pluse_rate*watt*time)/ (1000*3600)

So pulses for 100 watt bulb in 60 seconds, with energy meter of 3200 imp/kwh pulse rate can be calculated as below:

Pulses=3200*100*60/1000*3600
Pulses = ~5.33 pulse per minute

Now I need to calculate Power factor of a single pulse, means how much electricity will be consumed in one pulse:

PF= watt/(hour*Pulse)
PF=100/60*5.33
PF=0.3125 watt in a single pulse
Units= PF*Total pulse/1000
Total pulses in an hour is around 5.33*60=320
Units = 0.3125*320/100
Units = 1 per hour

If a 100 watt bulb is lighting for a day then it will consume

Units =1*0.3125
Units = 0.3125 Units

And suppose unit rate is at the region is rm0.0218 per unit then
So have to pay for 0.3125 Units for:
Price= 0.3125*0.0218 = RM0.0068125

This is simplified equation :-
watt = (i*0.3125);
unit = watt/100;
price = unit*0.0218


Friday, 14 April 2017

FYP 2 PROGRESS - WEEK 7

Title

- Change the flow of the project


Purpose

- To remove unnecessary function and component

- Use the suitable feature supported using sim900a


Description


Thursday, 6 April 2017

FYP 2 PROGRESS - WEEK 6

Title

- Finding the suitable energy meter



Purpose

- To learn how to get input from energy meter

Description

there are two type of energy meter which is analog meter and digital meter. But the most important is how to get the pulse or signal that indicate how much energy/electricity has been used.

digital

analog


there one that i use in the project.


after research, i found one way to calculate the signal from energy meter, which is from its diode pulse which blinking each time it reach certain consume of power. 3200 pulse for 1 kWh.