Tuesday 15 May 2012

project development & presentation day



Programming Development

The circuit had been draw and simulated by using PCB Wizard software. While the coding used in the PIC16F877A is in C Programming which had been compile and run by using C-Compiler software. Then, the programs are loaded into the PIC microchip. After that, the PIC is attached to the circuit to run the project.  The circuit connections for Smart Mailbox are as shown in Figure below.

The Circuit Connection

The sensor detects incoming mail and number of mail based on the calculation in the methodology. The data from the sensor are send to the PIC and converted from analog to digital signal. According to the data signal from the circuit that had been build, the data are send to the receiver.
After each program file was loaded into each microcontroller using PIC KIT programmer, IR Sensor and GSM Module was installed into the mailbox. Then all circuit board was switched on as Figure below.
The Circuit installed into the Mailbox

Before the letter inserted into the mailbox, the LED is turn GREEN to show the empty of mailbox. After the letter has been inserted into the mailbox, the LED turned on to the RED to inform the letter is inside the mailbox. The buzzer produces sound after few moments or GSM will send message to the user to inform the incoming mail.

 Overall Result Analysis of The Project

List of Connected Sensor/Actuator to the PIC

PIC I/O Pin
Connected To
Sensor / Actuator
Function
RA0
IR sensor
To detect mail
RB0
Pin E LCD
Display message on LCD
RB1
Pin RS LCD
Display message on LCD
RB2
Pin R/W LCD
Display message on LCD
RB4
Pin DB4 LCD
Display message on LCD
RB5
Pin DB5 LCD
Display message on LCD
RB6
Pin DB6 LCD
Display message on LCD
RB7
Pin DB7 LCD
Display message on LCD
RC0
Red LED
Turn on red LED
RC1
Green LED
Turn on green LED
RC4
Push button 1

RC6
Pin 11 max232
Send data to GSM
RC7
Pin 12 max232
Receive data from GSM
RD2
Push button 2

RD3
Push button 3

RE0
Buzzer
Turn on buzzer



Result And Analysis - Part 3 -




4.2.4        PIC16F877A Microcontroller Programming

This project use PIC 16F877A as a controller. A 5V voltage supplied to the circuit. Figure 4.7 shows the circuit with normal condition when tested from oscilloscope. Voltage peak-peak is 5.20V. Figure below shows the voltage of the supply 12VDC.


Normal Condition of Power Supply

The wave of the supply is taking it from oscilloscope as shown as below.


Voltage for Supply

Result And Analysis - Part 2-




Buzzer as Output (First Method)


Buzzer 5V is the output for the input IR sensor. The toggle switch pressed and LCD display will be turn to SMS = 0, the buzzer mode will active. When the IR Sensor detects the mail, the buzzer will be sound according to the set point that had been set. The display of the buzzer mode shows in Figure 4.2.




Display mode for Buzzer active

SMS as Output (Second Method)


GSM technology 7.5V is using to send Short Messaging System (SMS) to the user. GSM frequency range is 900-1800 MHz’s. When the mode is active for notification of SMS (SMS=1) the GSM module will be active. Once the input IR Sensor detects the mail, GSM will send the SMS to the user. Message setting coding are loaded into the PIC microchip. This coding are designed to simplify the user and they are easily can set the message character and phone number. The Figure below shows the SMS receiving from the GSM for the first notification when the project ON. 
GSM active for sending SMS

The Figure below has shown the display in LCD of the GSM mode. GSM mode is SMS=1.


Display for GSM active mode

The Figure below is shown the wave of the GSM frequency and the result is 904.8MHz. This frequency is in the range of the GSM frequency (900-1800MHZ).



The Frequency of GSM

This Figure below shows the receiving of SMS which is sending via GSM to inform the number of the mail when the mail inserted in to the mailbox.



SMS receive to notice the mail


Result And Analysis - Part 1-
















GP2D12 Sensor (IR Sensor) as input for PIC Microcontroller

One I/O pin is needed for one IR Sensor as input for PIC microcontroller. The connection of the IR Sensor to the I/O pin is 5V. This sensor can measure object in the range 10cm-80cm. Figure 4.1 shows Input IR sensor interface with PIC microcontroller and Table 2 approximately voltage for distance object (letter).


                                       Voltage Calculation for distance object



DISTANCE OBJECT (LETTER)
APPROXIMATELY VOLTAGE
10cm
2.4V
20cm
1.93V
30cm
1.66V
40cm
1.47V
50cm
1V
60cm
0.52V
70cm
0.3V
80cm
0.16V