Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

GSM BASED AUTOMATIC FIRE DETECTOR SAFETY SYSTEM

Status
Not open for further replies.

shiliba

Newbie level 6
Joined
Apr 2, 2010
Messages
12
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
africa
Activity points
1,354
Dear all technologists.

I feel happy to express my ideas to this forum even though they are not new, i am doing my project on the title above i invite assistence and suggestions on the circuit diagram,codes etc, i plan to use thermistor as a temperature sensor, 16f877 as a PIC, max 232 for interfacing with a GSM modem HT-W2101.
 

Hello

Its good to see that you have selected the devices so now all you new is the code and the compilers ...

Now the question is that which compiler you are using to develop the program and do you have the idea about the interfacing part?

Replay back with the details and i can help you from there..

Joydeep
 
  • Like
Reactions: surendra_srs

    surendra_srs

    Points: 2
    Helpful Answer Positive Rating
    V

    Points: 2
    Helpful Answer Positive Rating
Thanks a lot for the reply brother, the compiler which i wish to use is MikroC, also i have a little idea about the interfacing,
 

I am done with my project and everything went good despite of no support from the online technologiest but if any one wish to advance my idea Iam ready toshare what I have and I know
 

Dear Santoshaxl, i am getting a problem on attaching the diagrams,circuits and other descriptions,tell me what should i do so that i post the full circuit of my project which used the technology of PIC.
 

to remove the requirement for a level shifter such as the MAX232 I find it is simpler to use modems such as the WISMO228, you can attach it directly to the UART of a PIC (similar with GSM modems)
**broken link removed**
 
Thanks a lot Hrace1 for the strong suggestion,i will work on it as soon as possible.
 

Dear Santoshaxl, i am getting a problem on attaching the diagrams,circuits and other descriptions,tell me what should i do so that i post the full circuit of my project which used the technology of PIC.

you should ask help from edaboard admin
 

Thanks for your reply Santoshaxl, i will ask the edaboard admin.
 

ma project is fire detection alarm system based on GSM so plz help me on the interfacing part including signal conitioning.
 

Can any body tell me which type of sensor i should use to detect fire ?
 

I am done with my project and everything went good despite of no support from the online technologiest but if any one wish to advance my idea Iam ready toshare what I have and I know


Below you will find the code
Part 1 of my code is the temperature monitoring system
Part 2 is the code to send SMS using sony erricson T230 as GSM module
my problem now is to harmonise the 2 sub codes to be able to send pre defined text message when temperature is too high. Message like FIRE!


PART 1: TEMPERATURE MONITORING CODE


Code:
// initialisation afficheur LCD
  // Lcd pinout settings
sbit LCD_RS at RC4_bit;
sbit LCD_EN at RC5_bit;
sbit LCD_D7 at RC3_bit;
sbit LCD_D6 at RC2_bit;
sbit LCD_D5 at RC1_bit;
sbit LCD_D4 at RC0_bit;

// Pin direction
sbit LCD_RS_Direction at TRISC4_bit;
sbit LCD_EN_Direction at TRISC5_bit;
sbit LCD_D7_Direction at TRISC3_bit;
sbit LCD_D6_Direction at TRISC2_bit;
sbit LCD_D5_Direction at TRISC1_bit;
sbit LCD_D4_Direction at TRISC0_bit;
   unsigned char acqui ;
   // variables enables to store temperature and humidity digital values
   unsigned temp;
   float long temp_o; // originals values of temperature and humidity
   unsigned char i,j, valueT[7],testT[14];
   char *hu;
   void Move_Delay() {                  // Function used for text moving
  Delay_ms(200);                     // You can change the moving speed here
}
void main() {
TRISA=0xFF;
Lcd_Init();
 // displaying information of LCD screen
    Lcd_Cmd(_LCD_CLEAR);  LCD_cmd(_LCD_CURSOR_OFF);
    Lcd_Out(0, 6, "TEMP:");
 //######-- started sensor temperature
   temp = ADC_Read(0); // digital value ie InputValue/q  where q=5/1023
   temp_o = temp*(5.0/1023.0); //conversion for obtain the original input in volatge
   temp_o = temp_o * 100; // three ruler enable to obtain the corresponding degree
   temp = (int)temp_o ;
   temp = (temp> 5) ? (temp):(temp+1); // exact value of sensor
    LongToStr(temp,testT);
    j = 0;
  for(i = 0;i<=11;i++)
  {
   if(testT[i]!=' ')
   {
   valueT[j] = testT[i];
   j++;
   }
  }
  Lcd_Out(2,1,"   ");
  Lcd_Out(1,12,valueT);Lcd_Out(1,15,"C");
  /* the protocole that enable to send information between pic and Pc as follows:
    - when we send the temperature, we send firstly letter "T" like temperature
    - if a percent humidity, we send firstly letter "H"  */
    UART1_Write_Text("T");
  UART1_Write_Text(valueT);
  // UART1_Write_Text("°C");
   /*##########Interval testing started###########*/
   if( (temp >=0) && (temp < 36) ) {
             //enclosure is cool
       Lcd_Out(2,6, "         ") ;
        Lcd_Out(2,6, "Cool")  ;
   }

   else if((temp >=36) && (temp < 38)){
        // temperature is normal
        Lcd_Out(2,6, "         ") ;
        Lcd_Out(2,3, "Normal Temp")  ;

   }
   else {
        // temperature is too hot
        Lcd_Out(2,6, "         ") ;
        Lcd_Out(2,6, "Too Hot")  ;
        // Moving text
  while(1) {                         // Endless loop


    for(i=0; i<5; i++) {             // Move text to the right 7 times
      Lcd_Cmd(_LCD_SHIFT_RIGHT);
      Move_Delay();
    }
      for(i=0; i<5; i++) {             // Move text to the right 7 times
      Lcd_Cmd(_LCD_SHIFT_LEFT);
      Move_Delay();
    }


   }
     //###########---end sensor temperature----###########
     }
     while(1);


}


PART 2: CODE TO SEND SMS



Code:
unsigned char* GSM_MSG1 = "AT\n";   //"ATQ0V1E1S0=0\r\n";
unsigned char* GSM_MSG16 = "\r";   //"ATQ0V1E1S0=0\r\n";
unsigned char* GSM_MSG6 = "0x0D\n";               //13   for enter
unsigned char* GSM_MSG20 = "ATD09098725653\n";
unsigned char* GSM_MSG8 = "AT+CFUN=0\n";
unsigned char* GSM_MSG9 = "AT+CFUN=1\n";
unsigned char* GSM_MSG10 = "AT+CMGF=1\n";
unsigned char* GSM_MSG11 = "AT+CMGS=\"09098725653\"\n";
unsigned char* GSM_MSG12 = "0x1a\n";
unsigned char* GSM_MSG13 = "ok 0X1a\n";
unsigned char* GSM_MSG14 = "AT+CMGS=1\n";
unsigned char* GSM_MSG15 = "AT+CMGS=1\n";

void main() {
int ctr;
TRISA= 0xff;      // Configuring PORTA as Input
TRISC=0x0;        // Configuring PORTC as Output
PORTC=0;
PORTA=0;

 while(1)
 {
if(PORTA==0x01)        // For the call command using AT commands.  The codes here are working...
{

      PORTC = 0X01;             // Test to see if programme started running.
      Delay_ms(1000);


      UART1_Init(9600);            // Initialize UART module at 9600 bps
      Delay_ms(1000);

      UART1_Write_Text(GSM_MSG1);
      Delay_ms(3000);

      UART1_Write_Text(GSM_MSG16);
      Delay_ms(2000);

      UART1_Write_Text(GSM_MSG20);
      Delay_ms(5000);

      UART1_Write_Text(GSM_MSG16);
      Delay_ms(15000);

      UART1_Write_Text(GSM_MSG6);
      Delay_ms(10000);

      UART1_Write_Text(GSM_MSG16);
      Delay_ms(5000);

      PORTC=0x00;
      Delay_ms(5000);
}
else if(PORTA==0x02)    //For the message sending using AT commands via UART... The codes here are not working...
{
      PORTC=0x02;

      UART1_Init(9600);                         // Initialize UART module at 9600 bps
      Delay_ms(1000);

     UART1_Write_Text(GSM_MSG1);
      Delay_ms(2000);

      UART1_Write_Text(GSM_MSG16);
      Delay_ms(3000);

      UART1_Write_Text(GSM_MSG10);
      Delay_ms(3000);

      UART1_Write_Text(GSM_MSG16);
      Delay_ms(3000);

      UART1_Write_Text(GSM_MSG11);
      Delay_ms(3000);

      UART1_Write_Text(GSM_MSG16);
      Delay_ms(4000);

      UART1_Write_Text(GSM_MSG13);
      Delay_ms(6000);


      PORTC=0x00;
      Delay_ms(5000);
}


else
{
PORTC=0;
}
 }

}
 

To Send a data from cellular module to server

you should ask help from edaboard admin

Hi, currently i am working on the cdma module.
I am very new to this module.
I need to send a data from cdma module to server using TCP.

For eg:
I have to use the below procedure for that particular command
(I have to Check what software revision is being used:
1. Send command AT+GMR<cr>
2. Wait for response OK
3. Ensure you have a value of “2” in the bold location 18.XX.0XX)

I have stored the AT commands to be used in a pointer. Eg: unsigned char *sftrev_cmd="AT+GMR";
After that i wrote some UART-Write(sftrev_cmd); function to send the command.
Now i have to wait for response ok and then i have to check the value 2 in that location.
Do i need to write the codes for the step 2 and 3 also?


Please help me with some suggestions.
I am very new to this cellular module.


Thank you.
 

Re: To Send a data from cellular module to server

what I do is
1. send a command, e.g. AT+GMR<cr>
2. read response from modem putting characters in a buffer until <CR>
I also have a timeout in case there is no response (error condition)
3. compare the string in the buffer to the expected response
if as expected, e.g. OK continue to next command
else take some action e.g. was an error returned

the response may be more complex, e.g. checking the signal quality in response to at+csq
 

Re: To Send a data from cellular module to server

what I do is
1. send a command, e.g. AT+GMR<cr>
2. read response from modem putting characters in a buffer until <CR>
I also have a timeout in case there is no response (error condition)
3. compare the string in the buffer to the expected response
if as expected, e.g. OK continue to next command
else take some action e.g. was an error returned

the response may be more complex, e.g. checking the signal quality in response to at+csq

Hi,
Thank you for the information.
 

Re: To Send a data from cellular module to server

Hi,
Thank you for the information.

For example:
If i send AT+CREG? , It should response like

(+CREG: <mode>,<stat>[,<SID>]
where:
<mode> is enable/disable network registration unsolicited result code
0 – Disable network registration unsolicited result code (factory default)
1 – Enable network registration unsolicited result code
2 – Enable network registration unsolicited result code with network system identification data
<stat> is the network registration status
0 – Not registered, not currently searching for a new network operator.
1 – Registered, home network
2 – Reserved
3 – Registration denied
4 – Reserved)

I can see all these in console only, as i hope.
Then how i can store the expected value in buffer and compare.
Please give me some solution for this.

Thank you
 

Re: To Send a data from cellular module to server

as characters arrive from the modem I store them in a buffer until I get \n
I then scan the buffer for the expected reply e.g. OK
anything more complex I would use sscanf to read information from the buffer and check it
e.g. if I have send AT+CSQ to the modem to check signal quality
Code:
        if(strncmp(GSMdataRead, "+CSQ:",5)==0)	// is it CSQ reply
          { 
            sscanf(GSMdataRead,"+CSQ:%d,", &GSMsignalLevel);
            printf("   >>>> CSQ value !!!! %s  signal level %d", GSMdataRead, GSMsignalLevel);
GSMreaddataRead is a buffer which holds the characters received
I use sscanf to look for the string +CSQ:value which extracts the signal level into variable GSMsignalLevel
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top