In the days of technology postman still comes to our house for delivering the letters, couriers and parcels. Because some things like courier, parcels can’t sends via email and by using any other electronic media. So for getting notification of our letter delivery in our mail box here we design an intelligent mail/letter box, which provides notification of delivery of letters in our mail box via message to our mobile phones.
Fig. 1: Prototype of Arduino and GSM GPRS Modem based Intelligent Letter Box
Fig. 2: Image of box used as letter box in the prototype model
In this system an IR pair is used for sensing incoming letter in mail box and a GSM module for sending message to our phone. And a 16×2 LCD display for displaying time and letter box status (empty or not), delivery time, date and a real time clock circuit also is used in this system. And a LED is also configured for indication for letter box empty or not. When post man or any other person insert any letter in mail box IR sensor sense the letter (obstacle) and then Arduino sends commands to GSM module for sending notification message to specified phone number. Now we can collect our letter at that time if possible. At the time we collect letters we have to press a reset button which clears all the entries of letters.And in this system an additional feature is also added in whichdata will not lose after electricity failure. Because in this system Arduino’s EEPROM is used for save/store the delivery time and dates. This system is designed to save only 6 delivery reports of letters. But it may be extend. You can try it yourself. And enjoy this at your home or college. It is assumed that the reader has gone through the project how to get started with the arduino and Interface LCD with arduino.
Fig. 3: Block Diagram of Arduino and GSM GPRS Modem based Intelligent Letter Box
Circuit Description
Circuit of this intelligent mail/letter box system is very common and easy. Here four major part in this system
1. Sensing circuit: sensing circuit is a comparator circuit build by using lm358 ic. Output of comparator is directly connected to the digital pin number 3.In this circuit both of IR transmitter and receiver places in letter box in same direction when any obstacle or letter inserted in to the mail box comparator detects the obstacle and send signal to Arduino.
Fig. 4: Image of IR Transmitter and Receiver Module used in Intelligent Letter Box
Fig. 5: Image of LM358 IC based Sensor Module used in Intelligent Letter Box
2. Controller Circuit. After getting signal from comparator Arduino sends command to GSM module for sending a notification message to specified number.
Fig. 6: Image of Arduino based Controller Circuit used in Intelligent Letter Box
Fig. 7: Image of SMS alert received from Intelligent Letter Box
3. GSM module: Rx and Tx pins of GSM module are directly connected with Tx and Rx pin of Arduino respectively. And ground pins of both modules should be connected with each other.
Fig. 8: Image of GSM GPRS Module used in Intelligent Letter Box
4. Real Time Clock: this RTC clock is used here for running the time and when delivery if letter occurred, letter delivery time of RTC is saved in EEPROM of Arduino.
Fig. 9: Image of RTC Module used in Intelligent Letter Box
Components & Programming
Program description: program of this intelligent mail box system is simple. In this we configured GSM module in text mode by using command below:
Fig. 10: Screenshot of Arduino Code used to send SMS alert by Intelligent Letter Box
And delivery time and dates are saved in arduino’s EEPROM by using EEPROM Function given below:
Fig. 11: Screenshot of Arduino Code used to store time of letter dropped on EEPROM
Components Used:
1. Arduino
2. GSM Module
3. IR pair
4. Lm358
5. DS1307 RTC
6. 16×2 LCD
7. 10 K pot
8. 10 K resistor
9. 220 ohm resister
10. Connecting wires
11. Power supply
12. SIM card
Project Source Code
###
#include<LiquidCrystal.h>#include <Wire.h>#include <RTClib.h>#include<EEPROM.h>LiquidCrystal lcd(7, 6, 5, 4, 9, 8);RTC_DS1307 RTC;#define sensor 2#define indication 13int HOUR, MINUTE, SECOND, DATE, MONTH, YEAR;int leter,year1,year2;int add[6][7]={{0,0,0,0,0,0,0},{10,11,12,13,14,15,16},{17,18,19,20,21,22,23},{24,25,26,27,28,29,30},{31,32,33,34,35,36,37},{38,39,40,41,42,43,44}};void setup(){lcd.begin(16,2);Serial.begin(9600);Wire.begin();RTC.begin();pinMode(sensor, INPUT);lcd.setCursor(0,0);lcd.print(" Intelligent ");lcd.setCursor(0,1);lcd.print(" Letter Box by ");delay(2000);lcd.clear();lcd.setCursor(0,0);lcd.print(" Saddam Khan ");lcd.setCursor(0,1);lcd.print("Engineers Garage");delay(2000);// attachInterrupt(0, sense, LOW);attachInterrupt(1, reset, LOW);if(!RTC.isrunning()){RTC.adjust(DateTime(__DATE__,__TIME__));}}void loop(){while(1){leter=EEPROM.read(9);for(int i=0;i<100;i++){time();if(digitalRead(sensor)==0){sense();delay(5000);}delay(10);}if(leter==0){digitalWrite(indication, LOW);lcd.setCursor(0,0);lcd.print("Your Letter Box ");lcd.setCursor(0,1);lcd.print(" is Empty ");check();}else{digitalWrite(indication, HIGH);inbox();}}}void send_sms(){Serial.println("AT+CMGF=1");delay(10);Serial.println("AT+CMGS="9610126059"");delay(10);Serial.println("You Have Letter in your Letter Box.");Serial.println("Please Check it Out. ");Serial.println("Have a Good Day ");Serial.write(26);}void reset(){leter=0;EEPROM.write(9, 0);digitalWrite(13,LOW);}void time(){DateTime now = RTC.now();lcd.clear();lcd.setCursor(0,0);lcd.print("Time:");lcd.setCursor(6,0);lcd.print(HOUR=now.hour(),DEC);lcd.print(":");lcd.print(MINUTE=now.minute(),DEC);lcd.print(":");lcd.print(SECOND=now.second(),DEC);lcd.setCursor(0,1);lcd.print("Date: ");lcd.print(DATE=now.day(),DEC);lcd.print("/");lcd.print(MONTH=now.month(),DEC);lcd.print("/");lcd.print(YEAR=now.year(),DEC);delay(10);}void sense(){digitalWrite(indication, HIGH);time();lcd.clear();lcd.setCursor(0,0);lcd.print(" New Letter ");lcd.setCursor(0,1);lcd.print(" Delivered ");send_sms();delay(2000);delay(10);leter=EEPROM.read(9);leter=leter+1;EEPROM.write(9, leter);EEPROM.write(add[leter][0], HOUR);EEPROM.write(add[leter][1], MINUTE);EEPROM.write(add[leter][2], SECOND);EEPROM.write(add[leter][3], DATE);EEPROM.write(add[leter][4], MONTH);year1=YEAR/100;year2=YEAR%100;EEPROM.write(add[leter][5], year1);EEPROM.write(add[leter][6], year2);}void check(){for(int i=0;i<100;i++){if(digitalRead(sensor)==0){sense();delay(5000);}delay(20);}}void inbox(){lcd.clear();lcd.setCursor(0,0);leter = EEPROM.read(9);lcd.print(leter);lcd.print(" Letters in Ur");lcd.setCursor(0,1);lcd.print(" Letter box");check();lcd.clear();lcd.setCursor(0,0);lcd.print("Please check it ");lcd.setCursor(0,1);lcd.print("It may be Urgent");check();lcd.setCursor(0,0);lcd.clear();for(int i=1;i<leter+1;i++){lcd.clear();lcd.print("Delivery Time ");lcd.print(i);lcd.setCursor(0,1);lcd.print(EEPROM.read(add[i][0]));lcd.print(":");lcd.print(EEPROM.read(add[i][1]));lcd.print(":");lcd.print(EEPROM.read(add[i][2]));check();lcd.setCursor(0,0);lcd.clear();lcd.print("Delivery Date ");lcd.print(i);lcd.setCursor(0,1);lcd.print(EEPROM.read(add[i][3]));lcd.print("/");lcd.print(EEPROM.read(add[i][4]));lcd.print("/");lcd.print(EEPROM.read(add[i][5]));lcd.print(EEPROM.read(add[i][6]));Serial.print(EEPROM.read(add[i][5]));Serial.print(YEAR);check();}}
###
Circuit Diagrams
Project Video
Filed Under: Electronic Projects
Filed Under: Electronic Projects
Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.
Tell Us What You Think!!
You must be logged in to post a comment.