Home > PIC > PIC-based wateralarm with SMS function

PIC-based wateralarm with SMS function

Some of you fellow readers and subscribers may have noticed the video on Youtube of our PIC-based SMS Wateralarm. I went on vacation and forgot everything about it, especially I forgot to write about it in here – so I think it’s time.

PIC-based SMS Wateralarm

The project is a school project about Water, in the class called “Technology”. We discovered the growing problem about flooding of houses near rivers and lakes, and thought it would be a brilliant idea to invent a system that could alarm the owners by an SMS, if flooding should occour.

So we decided to try to make a such system using a PIC, a chineese GSM evaluation board (SIM300) and our electronics knowledge. This ended up in a working system as you can see in the video below.

The system consist of the following parts

  • Microprocessor unit – PIC16F690
  • GSM Module – SIM300
  • Alarm – Buzzer
  • Numeric keypad – Matrix keypad
  • Water detector – Darlington pair

As this is a school project, actually an exam project, we also made a report. Though this report is in danish, exept for the first page, so you would have to translate it or just look at the images. The report can be downloaded here: PIC-based wateralarm report

Though in this PDF-version of the report the schematics isn’t included, though they are listed as some of the annexes.
Instead, the schematics of the system can be seen in the following images.

PIC16F690 Microcontroller board

Interface Board

SIM300 GSM Module evaluation board

The source code for the PIC16F690, made in MikroC, can be downloaded here: Wateralarm, GSM (MikroC) or found on our Github: https://github.com/TKJElectronics/GSMWaterAlarm.

Categories: PIC Tags:
  1. Tim
    August 23rd, 2011 at 02:54 | #1

    If you do not mind me asking: how many hours (about) did it take in total to complete this project? The reason I ask is I am kind of interested in your work flow. When I try to accomplish a project (always smaller than this) I always struggle knowing how I am actually going to accomplish the end goal…I usually spend a lot of time ‘wandering’ around road blocks, methods, ect. When working on this project, how much of it did you have planned out before you actually started to program, configure, etc. anything? Even, how did you plan? Also, do you simulate the system, the individual components….?

    I am just curious, I really like your work!!! Thanks 🙂

  2. August 29th, 2011 at 10:31 | #2

    Dear Tim.
    Thank you for your interest in our project.
    The project took us many weeks to complete, but this includes the analyze of the problem, brainstorming, product design, prototyping, programming and product development.
    Before starting on the electronics development we designed the product diagram and described the functions in great details. We also made a time schedule which made it easier for us to know what to do at which time.

    I recommend making a time schedule, as this will keep you on track. I know a time schedule might be inappropriate for hobby-projects, but if you are struggling with being on track, and how to accomplish the goal, a time schedule is a great piece of help.

    Best Regards
    Thomas Jespersen

  3. Jake Cortez Verdad
    September 25th, 2011 at 07:50 | #3

    Hi sir, I am romano verdad from the philippines, I am a student and it so happend that my project in my thesis is somewhat the same as your but we have different applications, mine is an alarm SMS based alarm system. I will be using SMS as my notification medium, sir can you help me in my project? I don’t know what to do, I have no problem with my hardware, my problem is in my firmware, sir can I ask for the program you used in this project? and what language did you used on this project? I just don’t know how to embed thi program into my PIC. I was inspired with your project it was amazing. Thank you very much. I am an avid fan of yours.

  4. September 27th, 2011 at 20:28 | #4

    @Jake Cortez Verdad
    Dear Jake.
    Thank you for the kind words.
    I have no problem sharing the code with you, so I have now uploaded it with a link in the bottom of this post.

    Regarding your project it our code would actually fit without changes, as the SMS-sending function is just triggered by an input (RA2). When this input goes low, it starts to send the SMS.

    Please keep me updated about your project and if possible, please upload a video and post it as a video response.

    Best Regards
    Thomas Jespersen

  5. vignesh waran
    November 8th, 2011 at 14:17 | #5

    Respect to all
    I am vignesh 1 year school of engineering, I am going to do project presentation,i need help from GSM MODEM READ AND SEND SMS TO MOBILE WITH PIC16F690 in hi-tech compiler,anyone who well talent in embedded system please help me to send c code(sample).
    thanking you,
    (sorry for bad english)

  6. Lauszus
    November 13th, 2011 at 21:47 | #6

    You can find the source code at the bottom of the post, or just click at the following link: http://blog.tkjelectronics.dk/wp-content/uploads/Wateralarm_GSM_MikroC.zip

  7. November 13th, 2011 at 21:54 | #7

    @vignesh waran
    The source code can be downloaded at the link as stated by Lauszus. Though please be aware that we made our project using MicroC, so the code won’t be fully compatible with Hi-Tech C!

  8. Mandin Vicpatrick
    June 30th, 2012 at 17:49 | #8

    Very impressive! I like it very much Sir! If you mind me asking. where could i buy the said components/ modules? i am very much interested in making this project and somehow finding ways to improving it more, with due respect. But somehow im uncertain of finding the right materials for implementation. Will you be kind enough to help me in my concern sir?

  9. July 1st, 2012 at 16:35 | #9

    @Mandin Vicpatrick
    The main module of this project is the GSM module which is controlled thru a serial (UART) bus.
    There is many different GSM modules on the market where some is more expensive than others.

    In this project we used a SIM300 based GSM module which can be found on eBay etc. at around $50.
    Another option would be the commonly used Telit GM862 module which you can get in GSM+GPRS+GPS versions too. The Telit module is much more expensive though but gives you a better performance.

    Regards Thomas

  10. rollson
    April 24th, 2016 at 01:58 | #10

    hello sir, please can u help me with mikroc code to send and receive sms with pic18f45k22. thanks

    • April 24th, 2016 at 15:37 | #11

      Which SMS module do you have?
      We Can help you with the programming of the PIC device you have as a consultancy project. The cost of doing such depends on the features you would like us to develop and test.

  1. No trackbacks yet.