March 21, 2012 at 7:59 am #1556Ashish ChakoleParticipant
We have been carrying out our project work based on ‘GSM based household meter tampering detection’.(program is given below) . We have experienced some problems while executing the program. It would be very kind of you to go through the program and suggest the corrections.
The sensors form the input to the microcontroller and a message should be sent as soon as the pin goes high. Also relays have to be controlled using sms sent by the user.
We are also planning to interface a 16*2 LCD display (optional), which will display the same message as is to be sent through the GSM modem. If possible could you suggest the required changes in the current program.
We will be interfacing a SIM300 GSM modem.
It would be very kind of you to revert back. We have gone through all the programs in engineers garage, please mention any corrections wrt this program.
#define FREQ 12000000
#define baud 9600
#define spbrg_value (((FREQ/64)/baud)-1)
unsigned char *sms_service=”AT<enter>”;
unsigned char *sms_format=”AT+CMGF=1<enter>”;
unsigned char *sms_write=”AT+CMGS=”9999999999″<enter>”; // 10-Digit Mobile Number
unsigned char *sms=”seal broken”;
unsigned char *smss=”magnetic material detected”;
unsigned char *smsss=”current reversal”;
unsigned char *sms_report=”SMS Sent…”;
unsigned char sms_terminate=0x1A;
unsigned char enter=0x0D;
void delay(unsigned int msec) // Function for delay
for(j=0; j<1275; j++);
void init_serial() // Initialize serial port
TMOD=0x20; // Mode2
TH1=0xFD; //buad rate
SCON=0x50; // Serial mode=1 ,8-Bit data,1 Stop bit ,1 Start bit, Receiving on
TR1=1; // Start timer
void tx_data(unsigned char str) // Transmit data function
SBUF=str; //Store data in SBUF
while(TI==0); //Wait till data transmits
void gsm_cmd(unsigned char *string)
- This topic has 0 replies, 1 voice, and was last updated 11 years, 8 months ago by .
Viewing 1 post (of 1 total)