Title
- Industrial day
Wednesday, 14 June 2017
Thursday, 8 June 2017
Thursday, 1 June 2017
FYP 2 PROGRESS - WEEK 13
Title
- Final year project poster and submission of draft chapter 1,2 and 3
- Final year project poster and submission of draft chapter 1,2 and 3
Thursday, 25 May 2017
FYP 2 PROGRESS - WEEK 12
Title
-The project development (hardware)
-The project development (hardware)
Purpose
- complete the hardware and testing with software
Wednesday, 17 May 2017
FYP 2 PROGRESS - WEEK 11
Title
-The working code for gsm sim900a
#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;
}
}
}
-The working code for gsm sim900a
Purpose
- generate and testing the code
Description
#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 )
- 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
-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
Thursday, 27 April 2017
FYP 2 PROGRESS - WEEK 8
Title
- Calculation of energy meter's power
- 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
Thursday, 6 April 2017
FYP 2 PROGRESS - WEEK 6
Title
- Finding the suitable energy meter
- 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.
Thursday, 30 March 2017
FYP 2 PROGRESS - WEEK 5
Title
- Testing the gsm module
- Testing the gsm module
Purpose
- To try gsm sim900a feature, such as call, send sms, receive sms and other
Description
l
Thursday, 23 March 2017
FYP 2 PROGRESS - WEEK 4
Title
- Learn and research more about gsm and arduino
- Learn and research more about gsm and arduino
Purpose
- To find suitable method to calculate and get input from meter energy
Description
Booting the GSM Module
1.
The SIM card is inserted to GSM module and lock it.
2.
The adapter is connected to GSM module and turn it ON.
3.
Waited for some time (say 1 minute) and
start to see the blinking rate of ‘status LED' or ‘network LED'(GSM
module will take the time to establish connection with mobile network.
4.
After the connection is set up and initiated is made successfully, the
status/network LED is blink continuously every 3 seconds. The user try making a
call to the mobile {number of|quantity of|amount of} the sim card inside GSM
module. After hear a ring back, the gsm module has successfully established
network connection.
Connecting GSM Module
to Arduino
There
are two methods for connecting GSM module to arduino. Regardless, the
communication between GSM and Arduino module is serial. So it supposed to use
serial pins of Arduino (Tx and Rx). So if choosing this technique, Tx pin of
GSM module is connected to Rx pin of Arduino and Rx pin of GSM module to Tx pin
of Arduino. GSM Tx –> Arduino Rx and GSM Rx –> Arduino Tx. The ground pin
of arduino is connected to ground pin of gsm module. Lastly, load different
programs to communicate with gsm module and
ensure it is work.
To
prevent the difficulty, in this project, it can using alternate method in which two digital pins of
arduino are used for communication. It must select two PWM enabled pins of
arduino for this method. So in this
project, I choose pins 12 and 13 (which are PWM enabled pins).
So
given below is the circuit diagram to connect gsm module to arduino – and hence
use the circuit to send sms and receive sms using arduino and gsm modem.
The connections
as shown are made in the project. The program (coding) has two objectives as
described below:-
1)
Send SMS using Arduino and GSM Module – to a specified mobile number inside the
program.
2)
Receive SMS using Arduino and GSM Module – to the SIM card loaded in the GSM
Module.
Tuesday, 14 March 2017
FYP 2 PROGRESS - WEEK 3
Title
- Arduino Uno's Software Programming learning
-
Purpose
- To learn the arduino coding and interface it with the hardware ( debugging )
Description
Thursday, 9 March 2017
FYP 2 PROGRESS - WEEK 2
Title of activity
- FYP 2 Briefing and Hardware Survey
- FYP 2 Briefing and Hardware Survey
Objective
- To understand the FYP 2 subject's flow
- Dateline of progress and submission
- Survey and compare some component market price
Content
Other activity, i survey the component price that will be used in my FYP 2.
Friday, 24 February 2017
FYP 2 PROGRESS - WEEK 1
Title of activity
- Final Year Project 2
- Final Year Project 2
Objective
- To finalize and identify the suitable software and hardware to be used for Final Year Project 2.
Content
Subscribe to:
Posts (Atom)