Modular Weather and Environment Monitoring Systems using Raspberry Pi

DOI : 10.17577/IJERTV3IS090619

Download Full-Text PDF Cite this Publication

Text Only Version

Modular Weather and Environment Monitoring Systems using Raspberry Pi

Kuruvadi Praveen

Department of Telecommunications BMS College of Engineering Bangalore, India

Rithesh M Nanda

Department of Telecommunications BMS College of Engineering Bangalore, India

Ankhit Bala Venkata

Department of Telecommunications BMS College of Engineering Bangalore, India

Harshini H Kadakol

Department of Telecommunications BMS College of Engineering Bangalore, India

AbstractThis project aims at building a system, which can be used universally at any scale to monitor parameters in a given environment, be it a small room to control your AC or maybe all across the City to map out the pollution rate or weather across the city. With just a small variation in the selected mode of data transmission and sensor set the system can be modified to users need. The modularity here is in the form of plug and play sensors which can be added and removed to system. This type of modularity in weather monitoring systems is very essential in applications such agriculture, temperature control of a huge building etc. The system is made such that it can be scaled up or down to the needs of the particular application, multiple base stations spread out act as sets of sensors, each sending data to the main station, from where everything can be monitored, controlled and data use as per the end users requirement.

KeywordsRaspberry pi, sensors, GPS, Modular, sensor networks


    Currently, as stated above there arent many cost effective systems which can be deployed in numbers across the city to relay instantaneous and localized weather from within the city. Also, such a system existent would not serve the consumer needs such as home monitoring and automation. The project here aims to blur the line between the two and give a single system which can be deployed on any scale as the user intends to.

    This project describes a weather observation system for the Raspberry Pi, utilizing a set of pi boards. There are two sets of boards- central processor and sensor boards. Each sensor board is in turn interfaced to the DHT-11 humidity sensor and also the DS18B20 temperature sensor. It is also linked to a Wi-Fi adapter (802.11 b/g/n) to be connected to the centralized processor through Internet. A single pi acts as a centralized

    weather station and all other sensor pi boards relay their data to this centralized board, which organizes the data and logs them into tables or graphs based on user requirements. This data is also connected to through Ethernet hence this data log can be accessed remotely and the entire weather system can be controlled from a remote server. The data logged is also uploaded to a cloud server so that it can be accessed anywhere at any time. The only flaw in this system is that the sensor boards and the central processor should be in the coverage area of a Wi-Fi router. However this problem can be overcome using a GSM module by setting up a SMS service- sending in data through text messages at a low sample period and then logging them centrally, making the entire system totally autonomous without dependency on any other systems such as Wi-Fi Networks.


    1. Modularity

      Recent developments in wireless and micro- sensortechnologies have provided foundation platforms forconsidering the development of effective modular systems. They offer the prospect of flexibility in use, and network scalability.

      Sensor networks, consisting of clusters of different combination of individual sensors per base station can be customized to the necessities of every base, depending on the location and the environmental factors that are required to be monitored. This modular approach to construction of bases leads to infinite combinations and expands the target audience of the monitoring system.

      Fig. 1 Circuit Diagram for a General Base Station with Sensors.

      Each monitoring base, constructed using a Raspberry Pi can be customized with necessary communication protocols to connect and transmit to the hub or the nearest Central Station where the data needs to be exported to.

      The approach not only gives a greater degree of freedom of choice for end users but also helps in reducing costs incurred in the overall system which may contain redundant sensors which may not be required.

    2. Distributed Architecture

      Usually, developers focused on a centralized architecture for the system where the central node acts as the master and the sensors/actuators as slaves.The master takes information from the slaves, processes it and acts consequently. Thisapproach presents several drawbacks like bottlenecks in the central node and highdependence on the reliability of the master.On the other hand, a distributed architecture arises as another approach, in which each node processes locally the signals from sensors, andcommunicates them to the network.

      Monitoring systems when used on a widely distributed area might require an elaborate networking for the data to reach a Central Station or its destination for any decision to be made which makes the complete system complicated. Distributed architecture of capable base stations can result in a much more efficient monitoring and control system in large- scale implementation.

      This methodology along with implementation of sensors clusters can result in a smart local control system for industrial applications and monitoring wherein control of other systems based on environmental parameters is handled locally rather than pushing the task to the central server.

      Data being collected in clusters can also save transmission efforts when single cluster member is used to channel the data to the destination, thereby giving a streamlined flow of data to the Central System. This not only simplifies data handling but also saves power to an extent.

      Figure 2: Comparison between Centralized and Distributed


    3. Protocols in Distributed Architecture

      The main aim of this project is to propose architecture for the modular system. The protocols for the communication between the base station and the Central System in an architecture might require various protocols wherein the data travels over from a wired serial communication between sensor and the board to Wi-Fi or GSM for long distance transfers from the Board to the Control Systems.

      A driverless adaptor, which connects the raspberry pi to the Internet and allows users to connect to networks via Wi-Fi. It is extremely simple to set up and is almost plug and play.

      Main Features:

      • 2.4 GHz, ISB Band

      • Low Power (<110mA) with Advanced Power Management

    GSM is a cellular network, which means that cell phones connect to it by searching for cells in the immediate vicinity. GSM networks operate in a number of different carrier frequency ranges (separated into GSM frequency ranges for 2G and UMTS frequency bands for 3G), with most 2G GSM networks operating in the 900 MHz or 1800 MHz bands.


    At the heart of the base station is a Raspberry Pi, specifically configured for the set of sensors that the base board is interfaced with.

    The Raspberry Pi is a low cost, credit-card sized computer that plugs into a computer monitor or TV, and uses a standard keyboard and mouse. It is a device that enables computing, and programming in languages like Scratch and Python.

    The Raspberry Pi has a Broadcom BCM2835 system on a chip (SoC), which include an ARM1176JZF-S 700 MHz processor, VideoCore IV GPU, and was originally shipped with 256 megabytes of RAM, later upgraded to 512 MB. It does not include a built-in hard disk or solid-state drive, but it uses an SD card for booting and persistent storage.

    1. Sensors

      1. LDR

        An LDR (Light dependent resistor), as its name suggests, offers resistance in response to the ambient light. The resistance decreases as the intensity of incident light increases, and vice versa. The most common type of LDR has a resistance that falls with an increase in the light intensity falling upon the device. The resistance of an LDR may typically have the following resistances:

        Daylight = 5000 ohms Dark = 20000000 ohms

        It can act as a sensor, since a varying voltage drop can be obtained in accordance with the varying light. It is made up of cadmium sulfide (CdS). It is a bilateral device, i.e., conducts in both directions in same fashion.

        In this Project, the function of the LDR is to detect brightness in a particular geographical region. The value of the resistance varies depending upon the intensity of light, which is incident on the Raspberry Pi.


        The DS18B20 digital thermometer provides 9-bit to 12-bit Celsius temperature measurements and has an alarm function with nonvolatile user programmable upper and lower trigger points. The DS18B20 communicates over a 1-Wire bus that by definition requires only one data line (and ground) for

        communication with the Raspberry Pi. It has an operating temperature range of -55°C to +125°C and is accurate to

        ±0.5°C, over the range of -10°C to +85°C.

        In addition, the DS18B20 can derive power directly from the data line, eliminating the need for an external power supply. Each DS18B20 has a unique 64-bit serial code, which allows multiple DS18B20s to function on the same 1-Wire bus. Thus, it is simple to use one microprocessor to control many DS18B20s distributed over a large area. Applications that can benefit from this feature include HVAC environmental controls, temperature monitoring systems inside buildings, equipment, or machinery, and process monitoring and control systems.

      3. DHT11 Humidity Sensor

        DHT11 Temperature & Humidity Sensor features a temperature & humidity sensor complex with a calibrated digital signal output. By using the exclusive digital-signal- acquisition technique and temperature & humidity sensing technology, it ensures high reliability and excellent long-term stability. This sensor includes a resistive-type humidity measurement component and an NTC temperature measurement component, and connects to a high performance microcontroller, offering excellent quality, fast response, anti- interference ability and cost-effectiveness.

        The single-wire serial interface makes system integration quick and easy. Its a small sized, low power consumption and up-to-20 meter signal transmission making it the best choice for various applications, including those most demanding ones. The component is 4-pin single row pin package.

      4. GPS Breakout Sensor

    The breakout is built around the MTK3339 chipset, a high- quality GPS module that can track up to 22 satellites on 66 channels, has an excellent high-sensitivity receiver (- 165 dB tracking), and a built in antenna. It can do up to 10 location updates a second for high speed, high sensitivity logging or tracking. The Power usage is incredibly low, only 20 mA during navigation. The time, date, longitude and latitude is logged every 15 seconds. The internal FLASH can store about 16 hours of data, and it will automatically append data.


    1. System Setup and Software Design

      All the sensors required for the particular base station are set up according to the circuit. A python script is written to initialize the GPIOs of the Raspberry Pi for each sensor. The GPS system is set up so as to obtain the coordinates of the system. The board is further programmed to log the data and store it locally in a file at low sample rate to avoid excessive usage of system memory. This file is transmitted at the end of each day to the central server. It should be noted that the central server still has complete access to the base station at any given time provided it is within the Wi-Fi network.

      Set up the Raspberry pi Base module with the Raspbian Os and set up the Python compiler

      Set up the required GPIOs for communicating with sensors. And attach the sensors as shown in circuit diagram

      Write a python script to get sensor data that is temperature etc from the sensors and data log it onto a file in the memory of the base module

      Set up the wifi module of the raspberry pi and write a python script to transmit the stored file to a global server through wifi.

      Set up the global server so as to access the data from anywhere through the internet.

      previously set up, or can be accessed through SSH client application such as PuTTY for large file transfers.


    Figure 3: Workflow for System Design

    1. Network Setup

      For communication between base station and the central station, SSH server client protocol is set up on the two Raspberry Pis. For an SSH connection to be initiated, 4 pieces of data are needed:

      • The address (IP address or domain name) of the target machine.

      • The port number of the target machine on which the SSH server is listening.

      • The user name of the user who is logging in.

    • The password of the user who is logging in.

    Logging into the super user mode, the hostname and password of the two Raspberry Pis can be set up by modifying the configuration file by the following command in terminal

    nano /etc/dhcp/dhclient.conf"

    Figure 4: PuTTY Configuration Window on PC

    The base station can be accessed by calling the Linux SSH client from command line using the 4 pieces of data

    1. Conclusion

      Thus, we can see that the Raspberry Pi is a small yet quite powerful device, which can effectively performing the function of a weather station for a small area. Hence a modular approach to environment monitoring and use of distributed architecture has proven to be more efficient and cost effective as reflected by the results in this project.

    2. Future Work

    The present system as a whole is dependent on Raspberry Pis which is a slightly expensive option for systems with fewer systems. Implementation of pico-systems which use of single sensors with wireless capabilities through NRF24L01 radio transmitters will yield in a highly economical system which may use lesser base stations in a given range.

    Dependencies on human intervention for changes in software for every given set of sensors can be eliminated with micro codes for every possible sensor being pre-installed on the base station which can truly make the base station a standalone working unit wherein sensors will be plug and play and interchangeable on the fly.


  1. G. V. Satyanarayana and SD Mazaruddin Wireless Sensor Based Remote Monitoring System for Agriculture Using ZigBee and GPS Conference on Advances in Communication and Control Systems, 2013 (CAC2S 2013).

  2. Iswanto1, Helman Muhammad Weather monitoring Station With Remote Radio Frequency Wireless Communications, International Journal of Embedded Systems and Applications (IJESA) Vol.2, No.3, September 2012.

  3. Rathod Rohankumar B Design and Implementation of Remote Terminal Unit for Monitoring Weather using Raspberry Pi and RS485 Standard Interface, IJSRD -International Journal for Scientific Research & Development| Vol. 2, Issue 03, 2014.

  4. John Barton, Kieran Delaney, Cian O Mathuna , Joseph A. Paradiso Miniaturised Modular Wireless Sensor Networks.

  5. Ömer Özcan1, Mesut Gündüz2 Investigation and Implementation of a PIC-Based Sensor Node for Wireless Sensor NetworksJournal of Computer and Communications, 2014, 2, 90-98.

  6. Jorge Portilla , Angel de Castro , Eduardo de la Torre , Teresa Riesgo A Modular Architecture for Nodes inWireless Sensor Networks,Journal of Universal Computer Science, vol. 12, no. 3 (2006), 328-339.

  7. Pranita Bhosale, V.V.Dixit Agricon Weather Monitoring System and Irrigation Controller, IOSR Journal of Electronics and Communication Engineering (IOSRJECE)ISSN : 2278-2834 Volume 1, Issue 6(July- Aug 2012).

  8. G.S. Nhivekar, R.R.Mudholker Data logger and remote monitoring system for multiple parameter measurement applications, e -Journal of Science & Technology (e-JST).

  9. Kamarul Arifn Noordin, Chow Chee Onn and Mohamad Faizal Ismail A Low-Cost Microcontroller-based Weather Monitoring System, CMU Journal 2006 Vol.5(1)

  10. Nagisetty Sasidhar , Monica P. Suresh ARM microcontroller based Wireless Industrial Automation System, IJAREEIE Vol. 3,SpecialIssue 4, April 2014

Leave a Reply