Lately, in the field of electronics use of GSM modules has been incorporated in almost 50% of the circuits for the wide range of benefits it offers. The project “GSM-based notice board Using AT89c52” also takes an advantage of the GSM module to design an electronics notice board. Being wireless, it avoids the requirement of messy wires for circuit design with LCD interfacing. It consumes less power and is easy to operate. And the main point is that it is portable. Who would deny such a circuit over a maze of wired circuitry?
Circuit Description of GSM based notice board Using AT89c52
The project is applicable almost everywhere. It can be used in bus stations, railway stations, parks, etc to display messages wirelessly. Even in colleges and organizations, the benefits of the circuit can be fully enjoyed.
GSM module stands out as the heart of the project. It is accompanied by a 20×4 LCD to display information on the notice board. Â GSM modem is used for receiving and sending SMS. When a certified user wants to display a notice/message on the notice board, the user will send SMS from a verified mobile number and then the SMS thus received is displayed on LCD as a piece of useful information.
This project also includes some security features as it allows only verified users to access the LCD to supply the desired message. For this, the project compares the SMS sender’s number with a pre-configured number (hardcoded in source code). If the comparison gives positive output, then the message is directly displayed on the LCD. However, if the message is received from an unknown sender, a notification SMS is sent to a pre-configured number notifying invalid access to the board and taking necessary actions.
The circuit is much simpler as it involves just reading and sending SMS using a GSM modem. For those people who have had problems regarding text reading in GSM-based projects, this might be a single step to achieve the expected outcome. It can hence be taken as basic learning GSM-based project.
Other projects designed using GSM Module, posted in bestengineeringprojects.com
- Car Lock System using Arduino and GSM
- GPS and GSM based Vehicle Tracking System
- Arduino Based Automatic Call Answering Machine
- Accident Detection and Alert SystemÂ
PARTS LIST OF GSM BASED NOTICE BOARD USING AT89C52
Resistors (all ¼-watt, ± 5% Carbon, Unless Mentioned Otherwise) |
R1, R2 = 10 KΩ
VR1 = 1 KΩ |
Capacitors |
C1 = 10 µF/16V (Electrolytic Capacitor)
C2, C3 = 33 pF (Ceramic Disc) |
Semiconductor |
IC1 = AT89C52 (Microcontroller) |
Miscellaneous |
GSM Modem
LCD1 = LM044L (40*4) LCD XTAL1 = SW1 = Push-to-On Switch |
Source Code of the project “GSM based notice board Using AT89c52”
1 2 3 4 5 6 7 8 9 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 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 |
C51 COMPILER V8.05a   GSMNB_LCD                                                            01/16/2016 16:06:19 PAGE 1 C51 COMPILER V8.05a, COMPILATION OF MODULE GSMNB_LCD OBJECT MODULE PLACED IN GSMNB_LCD.OBJ COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE GSMNB_LCD.c BROWSE DEBUG OBJECTEXTEND line level    source 1          #include<reg51.h> 2          #include<string.h> 3          #include<absacc.h> 4          #include<stdlib.h> 5          #include<ctype.h> 6          #define buffer 110 7 8          sbit rs = P3^5; 9          sbit e = P3^4; 10 11          void display_msg(); 12          void delay(unsigned int i); 13          void lcdstr(unsigned char *s); 14          void lcdcmd(unsigned char val); 15          void lcddata(unsigned char val); 16          void lcdinit(); 17          void tx0(unsigned char); 18          void SMSString(unsigned char*text) ; 19          void init(); 20          void clear(void); 21          void read_notification(); 22          void clear_mybuff(); 23          void delete_msg(void); 24          void read_no(unsigned char msg_array[]); 25          void store_msg(unsigned char msg_array[]); 26          void password(); 27          void read_nd_check_password(unsigned char msg_array[]); 28          unsigned char abc,apt=0,count=0; 29          unsigned char idata msg1[buffer]; 30          unsigned char rec_no[10]; 31          unsigned char time_date[10]; 32          unsigned char code Response[] = "+CMTI"; 33          // Moblie no.of Owner 34          unsigned char code Mob_no[]= "98xxxxxxxx"; 35          unsigned char code Pass_array[]="1234"; 36          unsigned char MyBuff[20], k = 0; 37          bit flag1=0; 38          unsigned char store[10]; 39          bit NewMessage = 0; 40          bit TI_flag = 0; 41          bit flag=0; 42          bit No_correct=0; 43 44          void lcdstr(unsigned char *s) 45          { 46   1       unsigned int l,i; 47   1       l = strlen(s);               // get the length of string 48   1       for(i=1;i<=l;i++) 49   1       { 50   2        lcddata(*s);              // write every char one by one 51   2        s++; 52   2       } 53   1      } 54          void lcdcmd(unsigned char val) 55          { C51 COMPILER V8.05a   GSMNB_LCD                                                            01/16/2016 16:06:19 PAGE 2 56   1 57   1              P1=val; 58   1              rs=0; 59   1              e=1; 60   1              delay(1); 61   1              e=0; 62   1              return; 63   1      } 64 65          void delay(unsigned int i) 66          { 67   1              unsigned int k, l; 68   1              for(k=0;k<i;k++) 69   1                      for(l=0;l<1000;l++); 70   1      } 71          void lcddata(unsigned char val) 72          { 73   1 74   1                      P1=val; 75   1                      rs=1; 76   1                      e=1; 77   1                      delay(1); 78   1                      e=0; 79   1                    return; 80   1      } 81 82 83          void lcdinit() 84          { 85   1          lcdcmd(0x38); // 2 lines 5x7 matrix. 86   1          delay(5); 87   1          lcdcmd(0x0c); // Display ON Cursor Blinking. 88   1          delay(5); 89   1          lcdcmd(0x01); // Clear Display Screen. 90   1          delay(5); 91   1          lcdcmd(0x06); // Increment Cursor. 92   1          delay(5); 93   1 94   1      } 95 96          void main () 97          { 98   1 99   1      //if u do not want to check "OK" response after each AT command then 100   1      //enable interrupt IE=0X90 ; after last AT command of 101   1      //SMSString( "AT+CMGR=1\r"); // AT command to read sms 102   1      //so after that u recieve a no of bytes from modile if u disable it then u do not reieve 103   1      //it even data comes 104   1      //      unsigned char t; 105   1 106   1              clear(); 107   1              lcdinit(); 108   1              lcdcmd(0x80); 109   1              lcdstr("Welcome to GSM"); 110   1              lcdcmd(0xc0); 111   1              lcdstr("based Noticeboard"); 112   1 113   1              delay(10); 114   1              init(); 115   1      IT0 = 1;   // Configure interrupt 0 for falling edge on /INT0 (P3.2) 116   1      SMSString("AT\r"); // AT commands to initialize gsm modem 117   1      delay(50); C51 COMPILER V8.05a   GSMNB_LCD                                                            01/16/2016 16:06:19 PAGE 3 118   1 119   1      SMSString( "ATe0\r"); // turn off echo 120   1      delay(50); 121   1 122   1      SMSString( "AT&W\r"); // save settings 123   1      delay(50); 124   1 125   1      SMSString( "AT+CMGF=1\r"); // select text mode for sms 126   1      delay(50); 127   1 128   1      SMSString( "AT+CNMI=2,1,0,0,0\r"); // notification of new sms 129   1      while(1) 130   1      { 131   2 132   2      IE=0x91; 133   2      k=0; 134   2      delay(10); 135   2      flag=0; 136   2      while(!NewMessage); 137   2      { 138   3              IE=0X00; 139   3              delay(10); 140   3              NewMessage = 0; 141   3              read_notification(); 142   3      } 143   2      //New msg indication. 144   2      // +CMTI: "SM",3 145   2      } 146   1 147   1      } 148          void read_notification() 149          { 150   1              lcdcmd(0x01); //Clear LCD display. 151   1              clear(); 152   1              SMSString("AT+CMGR="); 153   1          tx0(MyBuff[12]); 154   1          SMSString("\r"); 155   1          IE=0x90; 156   1          delay(200); 157   1              read_no(msg1); 158   1              IE=0x00; 159   1              if(No_correct==1) 160   1              { 161   2 162   2                      lcdcmd(0x80); 163   2                      lcdstr("Message Received"); 164   2                      if(!isalpha(msg1[59]))  // checks for received msg is password or a actual msg(data). 165   2                      { 166   3                              read_nd_check_password(msg1); 167   3 168   3                      } 169   2                      else 170   2                              { 171   3                              store_msg(msg1); 172   3                                      password(); 173   3                                      flag1=1; 174   3                              } 175   2              } 176   1              else 177   1              { 178   2                      lcdcmd(0x01); 179   2                      lcdcmd(0x80); C51 COMPILER V8.05a   GSMNB_LCD                                                            01/16/2016 16:06:19 PAGE 4 180   2                      lcdstr("Msg frm Unknown"); 181   2                      delay(1); 182   2              } 183   1              clear(); 184   1 185   1      if(MyBuff[12]>='9')     //After 9 msgs recieved it clears the Msg index from SIM 186   1      { 187   2              delete_msg(); 188   2      } 189   1 190   1      clear_mybuff(); 191   1 192   1      return; 193   1      } 194 195          void read_nd_check_password(unsigned char msg_array[]) 196          { 197   1      if(Pass_array[0]==msg_array[59]&& 198   1              Pass_array[1]== msg_array[60]&& 199   1              Pass_array[2]==msg_array[61]&& 200   1              Pass_array[3]== msg_array[62]) 201   1              { 202   2                      display_msg(); 203   2              } 204   1              else 205   1              { 206   2              SMSString("AT+CMGS=\"98xxxxxxxx\"\r"); 207   2              delay(1); 208   2              SMSString("Password Incorrect!!"); 209   2              tx0(0x1A); // Ctrl+z 210   2              delay(10); 211   2              } 212   1      return; 213   1      } 214          void password() 215          { 216   1              SMSString("AT+CMGS=\"98xxxxxxxx\"\r"); 217   1              delay(1); 218   1              SMSString("Send Your 4 Digit Password"); 219   1              tx0(0x1A); // Ctrl+z 220   1              delay(10); 221   1      return; 222   1              } 223 224          void store_msg(unsigned char msg_array[]) 225          { 226   1      unsigned char i,j; 227   1      i=59; 228   1      j=0; 229   1              while(msg_array[i]!='\r') 230   1              { 231   2                      store[j]= msg_array[i]; 232   2                      i++; 233   2                      j++; 234   2              } 235   1              //store[j]='!'; 236   1 237   1      return; 238   1      } 239 240          void display_msg() 241          { C51 COMPILER V8.05a   GSMNB_LCD                                                            01/16/2016 16:06:19 PAGE 5 242   1              lcdcmd(0x01); 243   1              lcdcmd(0x80); 244   1              lcdstr("Received Msg"); 245   1              delay(1); 246   1              lcdcmd(0xc0); 247   1              lcdstr(store); 248   1      return; 249   1      } 250          void delete_msg(void) 251          { 252   1              SMSString("AT+CMGD=8\r"); 253   1              delay(1); 254   1              SMSString("AT+CMGD=7\r"); 255   1              delay(1); 256   1              SMSString("AT+CMGD=6\r"); 257   1              delay(1); 258   1              SMSString("AT+CMGD=5\r"); 259   1              delay(1); 260   1              SMSString("AT+CMGD=4\r"); 261   1              delay(1); 262   1              SMSString("AT+CMGD=3\r"); 263   1              delay(1); 264   1              SMSString("AT+CMGD=2\r"); 265   1              delay(1); 266   1              SMSString("AT+CMGD=1\r"); 267   1              delay(1); 268   1      return; 269   1      } 270 271          void init() 272          { 273   1      P0=0x00; 274   1              abc=0; 275   1              TL1=0XFD; //9600 @ 11.0592 276   1              TH1=0xFD; 277   1              TMOD=0x20; 278   1              SCON=0x50; 279   1              TR1=1; 280   1      } 281          void SMSString(unsigned char* text) //function to send SMS using GSM modem 282          { 283   1              while (*text) 284   1              { 285   2                      tx0(*text++); 286   2              } 287   1      } 288          void tx0(unsigned char x) //send data to serial port 0 289          { 290   1              EA=0; 291   1              SBUF=x; 292   1              while(TI==0); 293   1              TI=0; 294   1              EA=1; 295   1      } 296          void serial () interrupt 4 { 297   1      unsigned char ch; 298   1              if(RI){ 299   2            ch = SBUF; //character is read 300   2            RI = 0; //clear flag 301   2            if((ch == Response[k]) || (k > 4)) 302   2                { 303   3                 if(ch != 0x0D) // 0x0D means data received.. C51 COMPILER V8.05a   GSMNB_LCD                                                            01/16/2016 16:06:19 PAGE 6 304   3                         { 305   4                        MyBuff[k++] = ch; 306   4                 } 307   3                         else 308   3                         { 309   4                              MyBuff[k] = '\0'; 310   4                      NewMessage = 1; 311   4                      k = 0; 312   4                  } 313   3             } 314   2                      else 315   2                      { 316   3                              msg1[abc]=ch;//received msg is stored. 317   3                              abc++; 318   3                      k = 0; 319   3              } 320   2             } 321   1      } 322 323          void clear_mybuff() 324          { 325   1              unsigned int a; 326   1              for(a=0;a<25;a++) 327   1                      MyBuff[a]=0x00; 328   1      } 329          void clear(void) 330          { 331   1              unsigned int a; 332   1              for(a=0;a<buffer;a++) 333   1                      msg1[a]=0x00; 334   1                      abc=0; 335   1      } 336 337          void read_no(unsigned char msg_array[])   // reads the no from received msg and compares it with stored ms -g, If found wrong then send a msg to owner. 338          { 339   1      unsigned char i; 340   1              if(Mob_no[0]==msg_array[23]&& 341   1              Mob_no[1]== msg_array[24]&& 342   1              Mob_no[2]==msg_array[25]&& 343   1              Mob_no[3]== msg_array[26]&& 344   1              Mob_no[4]==msg_array[27]&& 345   1              Mob_no[5]== msg_array[28]&& 346   1              Mob_no[6]==msg_array[29]&& 347   1              Mob_no[7]== msg_array[30]&& 348   1              Mob_no[8]==msg_array[31]&& 349   1              Mob_no[9]== msg_array[32]) 350   1              { 351   2                      No_correct=1; 352   2              } 353   1              else    // Sends a msg to stored no if some unauthoriesd tries to send a msg. 354   1              { 355   2                              No_correct=0; 356   2                              SMSString("AT+CMGS=\"98xxxxxxxx\"\r");//authorise number 357   2                              delay(1); 358   2                              SMSString("Msg from Unknown number:( "); 359   2                              for(i=23;i<=32;i++) 360   2                              { 361   3                              tx0(msg_array[i]); 362   3                              delay(0); 363   3                              } 364   2                              SMSString(") is received."); C51 COMPILER V8.05a   GSMNB_LCD                                                            01/16/2016 16:06:19 PAGE 7 365   2                                      tx0(0x1A); // Ctrl+z 366   2                              delay(100); 367   2              } 368   1      return; 369   1      } MODULE INFORMATION:   STATIC OVERLAYABLE CODE SIZE        =   1189    ---- CONSTANT SIZE    =    358    ---- XDATA SIZE       =   ----    ---- PDATA SIZE       =   ----    ---- DATA SIZE        =     54      17 IDATA SIZE       =    110    ---- BIT SIZE         =      5    ---- END OF MODULE INFORMATION. Click here to download source code C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S) |
Myself Prateek…I m studying electronics engineering 2nd year…I want some topics or ideas regarding a mini project based on electronics…help me plzzz