GSM/GPRS Autonomous Weather Station (Tracking System)

Front    Back-soldered

Introduction:
Autonomous live tracking weather station. It takes (analog/digital) measurements and sends them to a web server over GPRS. Adding a battery and a solar station you can make it fully autonomous. It supports up to 3 Analog or Digital inputs. The main brain is the PIC 16F877A which also drives the SIM900/300 GSM module which is placed in the back of the PCB.
The main purpose of this project is to take wind flow measurements of different locations and store them in a database remotely. By this you know if the locations are appropriate for future installation of wind generators.

The data send from GSM to Web server with GET requests which isn't the safest and best way but its an easy way to make it work. The example code you can find at the github is a very simple example and has no security responsibility.

The GSM module:

For the GSM communication i've used the SIM900/300 which is a very good, easy to use and cheap gsm module. It offers UART communication and can be controlled with AT Commands. It works at 3.6Volt and uses an external gsm antenna. The module also includes a battery charger which is very useful if an external battery is used in combination with a solar panel or a wind generator for autonomous use. On the design there is also a LED indicator LED1 which indicates the gsm status (blinks). The module can be powered on/off by the button [S3]. As a hardware design guide i have used the Sim300 Hardware Design.

Note1.  I began designing the board for SIM300 which finally stopped to be manufactured and replaced with the SIM900. The hardware design manuals deference from each other so you may  find some useless components included in the connection between the simcard and the sim module which was included in the SIM300's manual but not in the SIM900's. The footprints of these two modules are the same.

Note2. The S3 which i used to power on/off the module but can be replaced with a transistor connected to the PIC to power on/off the module from the MCU.

Note3. The module works perfectly with the only disadvantage that it needs a voltage supply >4Volt to Vbat pin.

The main "brain" PIC 16F877A:

The main "brain" is the PIC 16F877A working at 16Mhz. The MCU is supplied by the Vbat as the gsm module. RA0,1,2 are used for analog inputs (analog measurements). The input voltages are converted to digital internally (ADC) with Vref=3.1V which is stabilized by a 3.1Zener diode. At the analog's inputs pinout is also included a Vbat and GND pin for possible external's measurement tool power supply. The Q3 (BC547) is used to Pulse (PWM) the LCD's backlight in order to reduce the power consumption and adjust the backlight's brightness. S4 switch is used to reset the mcu and R1 is there as a pull up resistor to keep the voltage high on running mode. D1 is there to stop the 12Volt to "charge" the battery and burn the SIM900 (Vbat). R2 limits the programming current flow to MCLR. In this design there is also included a PIC-ICSP header which lets the developer to program the pic in system without the need of unplugging anything.

The 16×2 Char LCD HD44780 :

A 16×2 LCD HD44780 has been used to display some status information and make the device user friendly. There is a backlight jumper (POWER-LCD) at the led's anode which gives the user the option to turn off the backlight for power consumption. There you can see that this net is connected to PIC's INT (LCD-INT) which is used to make the PIC know when the LCD is powered on to run the LCD initialization routines (The LCD at it's first power on needs to be sent some commands to initialize and make it ready to display the data that will receive). By this you can remove the LCD while the MCU is running, plug it back reset the jumper and the LCD will start working again.

More photos:

The pcb under light  Front

Back  Homemade PCB of GSM Back

Homemade PCB of GSM Front

Breadboard prototype:

GSM bread board testing    GSM bread board testing

Testing Video:

You can download the PCB design the Firmware the datasheets and the data storing web site from the github.

DOWNLOAD HERE

This was build as a project of Microprocessors lab for Technical Institute of Piraeus department of Electronic Computer Systems Engineering.

53 thoughts on “GSM/GPRS Autonomous Weather Station (Tracking System)

  1. Its just like you read my thoughts! You appear as though know a lot concerning this, enjoy a person wrote the book in it or something like that. I do think that you can do with a few pics they are driving your own message home somewhat, but on top of that, it is good weblog..

  2. Upright assignment! I wanted to thank you for this interesting I definitely loved every little bit of it. I have you bookmarked your web site to check out the latest stuff you post.

  3. Hi

    IS the PCB done by Eagle,
    If that So, then file is can not be open
    Could you advice me

    Thank you alot

  4. Download and unzip the archive file from the github. Then open with Eagle the files inside the ./pcb folder. Both scheme and board layout included.

  5. Two thumbs up from me 🙂

    Thank you for sharing sources, great job.
     

     

    1. No problem! This is the beauty of open Source / Hardware. Helping each other showing your projects.

  6. Hi,  i want to ask something, my microcontroller works at 5V and i want to send AT commands from uart. I use a logic converter http://www.sparkfun.com/products/8745 bu it does'nt send or recieve any data. If my mcu work on 4,1 (VBat voltage) can i communicate without logic converter

    1. What are you trying to communicate with?

      As i can imagine you may haven't used a common GND. Try connection gsm's GND with mcu's circuit GND.

  7. Hi Haris, thanks for reply
    I try to communucate SIM900D Modul with PIC16F877. I used common ground. I examine your project many times and i learnt a lot of thinks, thanks a lot. In your project PIC's VDD is equal to VBat(4.1V). So how MCU's logic high output/input can drive the SIM300? Did you use logic converter? Or connected RX-TX & TX-RX directly ?
    http://www.fleximatrix.fr/docs/sim300D_HD_V2.01.pdf
    Table 12 – (page 32)  Logic levels of serial ports pins 
    Ä° want'to ask this to,  did you use only TX & RX  ? Or DTR and the other pins(CTS,RTS…) must be connect with mcu ? 
     
    Thank u so much

    1. Hi Haris , my problem was in my firmware. I solved it thanks for help 🙂
       

  8. Hey nice project, is there a full list of components neaded for this somewhere.
    Also what kind of battery would i use on this and how strong of a solar plate would i use and would it need any programing to charge normaly or does it have a curcit to prevent lets say a lipo to overcharge or undercharge.
     
    Thx for your answers il try to make this i find it pretty cool.

    1. Hey thanks a lot. You can export easily the component list from Eagle's menu. File->Export->Part list

      For the battery from SIM900D datasheet:

      SIM900D has optimized the charging algorithm for the Lion-Ion battery that meets the following characteristics:

      Max Charging Volt: 4.2V

      Max Capacity: 1100mAh

      Protection circuit to avoid overcharging

      etc. 

      For more info check SIM900D Hardware design datasheet at page 29. (it is uploaded in github with the other files on pdf folder)

      1. The part list in Eagle is not that accurate, it only says some of the values, but when i search for the part i have diffrent types of a lets say 100uF Capacitator while in the part list it only says 100uF. Same thing with some other stuff. 
        Thank you for the idea but im still too much of a noob to know what may go on this curcit.
        Hope you can provide me with a full partlist, if not thx for the help anyway.
         

  9. Hi, 
    I have similar project of weather station, I use SIM300D, ATmega644, and wireless temp/humidity (SHT21)/pressure (BMP085) sensor with RFM22 transceiver (868MHz). Last version has SIM900D and CC1101. Additionally my station has Geiger tube (SI22G) for Gamma-ray measuring. I also use solar cell for charging and GET for uploading data to MySQL database. 🙂
    ok, this is one station nearby my home (near DME airport, Moscow, Russia): http://pripyachka.com/t.php?info&n=4 and http://pripyachka.com/g.php?info&n=4
    here another one, Domodedovo town: http://pripyachka.com/t.php?info&n=21 and http://pripyachka.com/g.php?info&n=4
    this one was located in Pripyat town (near Chernobyl NPP, Ukraine) but it was stolen http://pripyachka.com/t.php?info&n=6  and http://pripyachka.com/g.php?info&n=6  
    Thanks, and sorry for my poor English 🙂
    Yury.

    1. Very good job! It really looks similar to my station. Nice to meeting people with same interestings. No problem for your English it is normally understandable and it isn't my formal language too.

  10. hello Haris . ur project is very nice. i followed it . i use atmega32, sim900 and one simcard for the sim900. . but i have problem. did u use another simcard number for web , or didn't ??? . how did u build ur web station?. pls expalin about the ur web station and  teach me pls .   very much i want to do this . pls help me

  11. hi  my friend i'm sorry . i don' t understand . i'm beginner in web. my cellphone is connecting  internet,  so in cellphone , simcard is okey.  have u got  any ebook and any imformation about that how to building web server via get request and any example  ???

    1. It isn't that easy. First of all you have to learn how to setup a webserver for testing. Then you have to learn a web language like php and after all you can make a simple script in a way you think it is easier for you and start testing your application.

      Here you can find some information about php and GET requests 

      http://www.w3schools.com/php/php_get.asp

  12. Hey haris how would i go on making this PCB homemade. I have no idea on what layers to remove from the PCB file in eagle. Could you post up a simple image file with the board so i can make it using the toner method.

    1. There is no difficulty. Just select the following layers. Bottom, Pads and Vias and it is ready for printing

  13. I was wondering about the battery type that is supported and what kind of solar pannel is also supported?

    1. You can find the information you are looking for in the datasheet of the module. I don't remember the exact values so i can't help you now. Please check the manufacturer datasheet. This book knows everything 😉

  14. Hi Haris.Im soryy my english.Thanks for sharing.ı have a question.ı have sım900 gsm module,but your used sım900d modul.Can I use sım900?sım900 create a problem.thanks.

  15. Any chance of you making a arduino version of this? My pic programing is under standard.

  16. thanks for sharing haris. actually i've doing a project looks similar to you. then, may i know how to calculate the ppm value for carbon monoxide gas??? or you have any suggestion website for me to refer??

  17. Hey what do you think of this, i see that only the RXD, TXD and DTR pins on the schematic are conected to the pic, do you think i can use the sim 900 part of the scematic and and conect it to arduino with the same setup?

    1. Hello my friend. To tell the truth it has passed a lot of days since i designed this project. If what you say is correct of course you can replace the mcu with arduino. The only thing i remember is that the mcu just used to controll the SIM900.

  18. hi haris. is  device always connected  to server in gprs network ?.  or  when send data to server, will device connect to server in gprs network ?

    1. There is no connection start and stop with the server if this is what you mean. The server actually is a web server and the GSM module each time it needs to send data it makes a web request like when you enter a web site. 

  19. Hello Haris,

    I really appreciate your work, i frequentlly check it because i'm doing a similar work. i have a question : 

    – For ESD protection you used capacitors (1nF, 330pF, 2,2uF) instead of the TVS diode recommanded by the constractor. can you explain the choice of capacitors values because i'm going to use capacitors me too.

    1. Hello emaro,

      It has been awhile since i have designed this project so i don't remember exactly why i have used these capacitors with these values. But always you have to use manufacturer recommendations as a guide for you design. 

  20. Really nice project Haris. I am trying to make a similar poroject, but will be using arduino as a web server. Can you help me with it? What are the different ways that we can control arduino over gprs connection? Please help.

  21. Hi Harris, just one question, how much charge you vodafone for one times senting the info the the web server?I mean just for one connection

    1. Hi Stefanos. You can buy a a student Vodafone card or a contract which gives a specific amount of megabytes for a given price. A data transfer from the gsm station to the web is very small as a few bytes so the cost is small as well.

  22. Hi Haris!

    My PCW version is 4.114 and when I compile show this error message: 

    *** Error 128 "C:\Program Files\PICC\drivers\string.h" Line 34(1,2): A #DEVICE required before this line
          1 Errors,  0 Warnings.

     What is problem? Can u help me? 

     

Leave a Reply

Your email address will not be published. Required fields are marked *