WEATHER STATION WITH GSM BASED NOTICE BOARD

CHAPTER 1

INTRODUCTION

A Weather station is a facility,equipment for measuring atmospheric condition to provide information for weather forecastes and to study the weather and climate.The measurement taken include temperature,humidity,rain alert ,carbon dioxide (Co2) level pollution. While temperature and humidity from DTH22. A personal weather station is a set of weather measuring instruments operated by a private individual, club , association business where obtaining and distributing weather data is not a part of the entity’s business operation. Personal weather station have becomes more advanced and can include many different sensor to measure weather stations.

This weather stations also include many more features like date, time, and notice via GSM. Wireless communication has announced its arrival on big stage and the world is going mobile. We want to control everything and without moving and inch. This remote control appliances is possible through embedded systems. The use of embedded system in communication system has given rise to many interesting application that ensures comfort and safety to human life. The main aim of this project will be to design a SMS driven automatic display board which can be replace currently programmable display.

The message to be displayed is sent through a SMS from an authorized person. The microcontroller receives the SMS, validity the sender and displays the desired information. Staretd off as an instantaneous nes display unit, we have improved upon it and tired to take advantage of computing capabilities of micro controller. Looking in to current trend to information transfer in the  campus, it is seen that important notice take time to be displayed in the notice board. It is proposed to implement this project at the institute level. The GSM based display board can be used as an add-on to these display boards and make it truly wireless the display board programs itself with the help of the incoming SMS with proper validation. Such a system proves to be helpful for immediate information transfer. The main components of the kit includes GSM moderm. This components are integrated with the display board and thus incorporate the wireless feature.

 CHAPTER 2

HARDWEARE DESCRIPTION

2.1.ARDUINO

Arduino is an open-source electronic platform based on easy to use hardware and  software. Arduino boards are able to red inputs-light on sensor, a finger on button, or a Twitter message and turn it into an output activating a motor, turning on an LED, Publishing something online. You can tell your board what to do by sending a set of instructions to the microcontroller onthe board. To do so you use the Arduino programming language(based on writing), and the arduino software(IDE), based on processing.

Over the years Arduino has been the brain of the thousands of projects, from everday objects to cpomplex scientific instruments. A worldwide community of makers students, hobbyists, artists, programmers, and professionals has gathered around this open source plateform, their contributions have added uo to an incredible amount of accessible knowlwdge that can be of great help to novices and experts alike.

Arduino was born at the vireo interaction design institute as an easy tool for fast prototypinh, aimed at students without a background in electronics and programming. As soon as it reached a wider community, the Arduino board started changing to adapt to new needs and challenges, differentiating its offer from simple 8-bit boards to products for IOT applications, wearable, 3D printing, and embedded environments. All Arduino boards are completely open-source, empowering users to build them independently and eventually adapt them to their particular needs.  It is growing through the contributions   of users worldwide.

Arduino MEGA 2560 Microcontroller Rev 3
     2.2. Arduino Mega(2560)  

2.2.1.OVERVIEW

The Arduino Mega 2056 is a microcontroller board on the ATmega2056. It has 54 digital inputs/outpins (of which 14 can be used as PPM outputs), 16 analog inputs, 4 UARTs (hardware serial ports), a 16MHz crystal oscillator, a USB  connection, a power jack, an ICSP HEADER, AND ARESET BUTTION. It contains everything nedded to support the microcontroller,simply connect it to a computer with USB cable or power it with most shields designed for the Arduino Duemilanover or Diecimili.

Characteristics

Microcontroller                                              ATmega2560

Operating Voltage                                         5V

Input Voltage(recommended)                    7-12v

Input Voltage (limits)                                    6-20v

Digital I/O pins                                               54(of which 14 provides PWM O/P)

Analog Inputs Pins                                          16

DC Current per I/Pin                                      40m

DC Current for 3.3 V pin                         50mA

Flash Memory                                          256 KB of which 8 KB used by boot loader

SRAM                                                           8 KB

EEPROM                                                       4 KB

Clock Speed                                             16 MHz

2.2.2.POWER supply.

The power source is selected automatically.External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or battery. The can be connected by plugging a 2.1mm center- positive plug into the board’s power jack. Leads from a battery can be inserted in the Gnd The Arduino Mega can be powered via the USB connection or an external and Vin pin headers of the POWER connector.

The board can be operate on an external supply of 6 to 20 volts. If suppliedwith

less than 7v , however, the 5v pin may supply less than five volts and the board

may be unstable. If using more than 12v, the voltage regulator may owerheat

may be damage the board. The recommended range is 7 to 12 volts.The mega2560 differs from all preceding boards in that does not use the FTDI-USB-to serial converter.

The Power Pins are:

+Vin:-The input voltage to the Arduino board when it’s using an external power

Sourc e(as opposed to  volt from the USB connector or regulated power

Source). You can supply voltage through this pin, or, if supplying voltage via the

Power jack, access through this pin.

+5V:-The regulated power supply used to power the microcontroller and other components on the board. This can either from Vin an on-board regulator, or be supplied bt USB or another 5 v supply.

+3.3V:-A 3.3 volts supply generated by the on-board.Maximum current draw is 50mA.

GND:-Ground pins.

2.2.3.MEMORY

The Atmega2560 has 256KB of Flash memory for storing( of which 8 KB is used for the boot loader), 8KB of SRAM and 4KB of EEPROM(which can be read and written with the EEPROM library).

2.2.4. INPUT AND OUTPUT

Each of the 54 digital pins onthe Mega can be used as an input or output, using pin Model(), digital Write and digital Read functions. They operate at 5volts. Each pin can provide or receive maximum of 40 mA & has an internal pull-up resistor(disconnected by default) of 20-50k Ohms,some pins have specialized functions.

Serial:-0(RX)and(TX);Serial1:1(RX)and18(TX);Serial2:17(RX)and16(TX);Serial3:15(RX) and14(TX).Used to receive(RX)andtransmit(TX) TTL serial data. Pins0and1are also connected to the corresponding pins of the ATmega8U2 USB-to-TTL Serial chip.

External Interrupits:2 (interrupt 1), 18 (interrupt 5), 19(interrupt 4), 20(interrupt 3), and 21(interrupt 2). These pins can be configured to trigger an interrupt on a low value, a rising or falling edge, or a change in value. See attach interrupt() function for details.

SPI:- 50(MISO), 51 (MOSI), 52 (SCK), 53 (SS). These pins support SPI PWM: 0 to 13. Provide 8-bit PWM output with the analog Write() function.

communication using the SPS library. The SPI pins also broken out on the ICSP header, which is physically compatible with the Uno, Duemilanove and Diecimili.

LED:-13. There is abuilt- in LED Connected to digital pin 13. When the oin is HIGH value, the LED is on, when the pin is LOW,it’s off.

 I2C: 20(SDA) and 21 (SCL). Support I2C (TWI) communication using the wire library(documentationon the wiring website).Note that these pins are not in the location as the I2C pins on the Duemilanove or Diecimili.

The mega 2560 has 16 analog inputs, each of which provide 10 bits of resolution (i.e1024 different values).By default they measure from ground to 5 volts, through is it possible to change the upper end of their range the AREF pin and analog Refrence() function. There are a couple of other pins on the board.

AREF. Reference voltage for the analog inputs. Used with analog Reference().

RESET.Bring this line LOW to reset the microcontroller. Typically used to add a reset bottom to shields which block the one on the board.

Communication the Arduino Mega2560 has anumber of facilities for communicating with a computer another Arduino, or other microcontrollers. The ATmega2560 provides for hardware UARTs for TTL(5V) serial communication. An ATmega8U2 on the board channels oneo of these over USB and provides a virtual con port to software on the computer(windows) machines will need a int file, but OSX and Linux machines will recognized the board as a COM port automatically. The Arduino software includes a serial monitor which allows simple textual data to be sent to and from the board. The RX and TX LEDs on the board will flash when data is being transmitted via the ATmega8U2 chip and USB connection to the computer(but not for serial communication on pins 0 and 1).

2.3. GSM(GLOBAL SYSTEM FOR MOBILE COMMUNICATION)

GSM is an open, digital celluar technology used for mobile voice and data services. GSM differs from first generation wireless system in that it uses digital technology and time division multiple access(TDMA) transmission method. GSM is a circuit-switched system that divides each 200KHz channel in to eight 25KHz time slots. GSM operates in the 900MHz and 1.8 GHz bands in Europe and the 1.9GHz and 850MHz in USA. The 850MHz is also used for GSM and 3GSM in Australia,Canada and many South America Countries. GSM supports data transfer speeds up to 9.6Kbit/s, allowing transmission of basic data service as SMS(short Message Service). Another major benefits is its international roaming capability, allowing users to access the same service when travelling abroad as at home. This gives consumers seamless and

Same number connectivity in more than 210 countries. GSM satellite roaming has also extended service access to areas where terrestrial coverage is not available.

Global system for mobile communication. The first European digital standard, develop[ed to established ceullar compatibility throughout Europe. Its success has spread to all part of the world and over 80GSM networks are now operational.It operates at 900MHz.

In-Depth: Send Receive SMS & Call with SIM900 GSM Shield & Arduino
     Fig:2 GSM SIM 900A

2.4. DOT MATRIX DISPLAY

A dot matrix display is an electronic digital display device that displays on  machines, clocks and wtches, public transport departure indicators and many other devices requiring a simple alphanumeric(and or graphic display device of limited resolution.

The  display consists of a dot matrix of ligits or mechanical indicators arranged in a rectangular configuration( other shapes are also possible, although not common) such controller converts instructions from a processor into signals which turns on or off indicator elements in the matrixs so that the required display is produced.

LED Dot-Matrix Display - Light Emitting Diode Dot-Matrix Display Latest  Price, Manufacturers & Suppliers
                                      Fig: 3 DOT MATRIX DISPLAY P10

2.5.REAL TIME CLOCK (RTC)

A real  time clock (RTC)  is a computer clock usually in the from of integrated circuit that is soley built for keeping time. Naturally, it count hours, minutes, seconds, months, days, and even years. RTCs can be found running in personal embedded systems and servers, and are present in any electronic device that may require accurate time keeping. Being able to still function even when the computer is powered down through a battery or independently from the system’s main power is fundamental.

Modul RTC DS3231, I2C and 32kb flash | GM electronic COM
                                            Fig: 4 REAL TIME CLOCK (RTC)

2.6. TEMPERATURE SENSOR (DTH 22)

A temperature sensor is the instrumentation equipment which is used to measure temperature or heat onthe operation machin part. Temperature sensing is perform by equipment called thermocouple. A thermocouple is a temperature-measuring device consisting of two dissimilar conductors that conduct each other at one more points. It produces a voltage when the temperature of one of the points differs from the reference temperature at other parts of the circuit.

DHT22 Temperature-Humidity Sensor - Invent Electronics
Fig: 5 TEMPERATURE SENSOR

2.7. CARBON DIOXIDE SENSOR (MQ-9)

MQ-9 gas sensor has high sensitivity to carbon Monoxide, Methane and LPG. The MQ-9 gas sensors are used in gas deteching equipment for gas for carbon, monoxide, methane analog voltage equivalent to the conteration of the gases. The modile also has  a on-board comparator or comparing against a adjustable present value and giving out a digital high or low.

MQ-9 carbon monoxide, combustible gas sensor detection alarm module
                                       Fig: 6 CARBON DIOXIDE SENSOR

2.8. RAIN SENSOR

Rain sensor module is used for the purpose of rain detection. It comes under the classification of weather sensors. Also, it can detect water beyond what a humidity sensor can detect. The rain sensor module consists of rain board (PCB) , control board (SENSOR MODULE), LED, Potentiometer.

HALJIA Rain Sensor Rainwater Raindrops Module Rain Detection Module Weather  Module Humidity Compatible with Arduino: Amazon.co.uk: Computers &  Accessories
Fig: 7 RAIN SENSOR

  CHAPTER:-3

SOFTWARE DESCRIPTION                                                                 

3.1. ARDUINO IDE (R3):-

The open-source Arduino software (IDE) makes is an easy to write code and upload it to the board. It runs on windows, MAX OX, and Linux. The environment is written in java and based on processing and other open and other open-source software. The Arduino integrate Development Environment or Arduino software (IDE) contains a text editor for writing code, a message area, a text console, a toolbar with buttoms for common function and a series of menus. It connects to the Arduino and Genuine hardware to upload the program and communication with them.

Fig:1 ARDUINO IDE USER INTERFACE

CHAPTER 4

BLOCK DIAGRAM

Fig: SYSTEMATIC BLOCK DIAGRAM

5.1 CIRCUIT DIAGRAM

Fig: CIRCUIT DIAGRAM

5.2. CIRCUIT DIAGRAM 

Fig:2 Circuit Diagram For Notice Display

5.3. OPERATION

The circuit of weather station with GSM notice board is complex which contain Arduino mega2560 and Dot matrix display which controls whole process of the project, Gas sensor, RTC module, Rain sensor, DHT sensor and GSM module.

RTC module SDA pin is connected to SDA pin 20, SLC is connected to Vin and ground pin with respect to ground. Respected pin of DMD P10 is connected to Arduino mega.

DHT22 sensor pin D0 is connected to pin Ao, Vcc is connected to Vin and ground pin with respect to ground pin. Respective pin DMD P10 is connected to Arduino mega2560.

Raian Sensor pin Do is connected to pin Ao, Vcc to Vin and ground pin with respect to ground pin. All respective pin of DMD P10 is connected to Arduino mega2560.

GSM module of pin Tx ix connected Arduino mega pin Rx and Rx pin is connected to Tx of Arduino mega pin. The Vcc pin is connected to Vin and ground pin with respect to ground and respected pin of DMD P10 is connected to Arduino mega2560.

CHAPTER :-6

 SOURCE CODE   

#include <SPI.h>        //SPI.h must be included as DMD is written by SPI (the IDE complains otherwise)
#include <DMD.h>        //
#include <TimerOne.h>   //
#include <OneWire.h>
//#include <DallasTemperature.h>
#include "SystemFont5x7.h"
#include "Arial_black_16.h"
#include "Arial14.h"

//Fire up the DMD library as dmd
#define DISPLAYS_ACROSS 1
#define DISPLAYS_DOWN 1
DMD dmd(DISPLAYS_ACROSS, DISPLAYS_DOWN);
#define ONE_WIRE_BUS 9

// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
//OneWire oneWire(ONE_WIRE_BUS);
char c,e,n;
// Pass our oneWire reference to Dallas Temperature. 
//DallasTemperature sensors(&oneWire);
/*--------------------------------------------------------------------------------------
  Interrupt handler for Timer1 (TimerOne) driven DMD refresh scanning, this gets
  called at the period set in Timer1.initialize();
--------------------------------------------------------------------------------------*/
void ScanDMD()
{ 
  dmd.scanDisplayBySPI();
}

/*--------------------------------------------------------------------------------------
  setup
  Called by the Arduino architecture before the main loop begins
--------------------------------------------------------------------------------------*/
void setup(void)
{
 Serial.begin(9600);
 // Serial.println("Dallas Temperature IC Control Library Demo");

  // Start up the library
 // sensors.begin();
   //initialize TimerOne's interrupt/CPU usage used to scan and refresh the display
   Timer1.initialize( 5000 );           //period in microseconds to call ScanDMD. Anything longer than 5000 (5ms) and you can see flicker.
   Timer1.attachInterrupt( ScanDMD );   //attach the Timer1 interrupt to ScanDMD which goes to dmd.scanDisplayBySPI()

   //clear/init the DMD pixels held in RAM
   dmd.clearScreen( true );   //true is normal (all pixels off), false is negative (all pixels on)

}

/*--------------------------------------------------------------------------------------
  loop
  Arduino architecture main loop
--------------------------------------------------------------------------------------*/
void loop(void)
{
 // Serial.print("Requesting temperatures...");
 // sensors.requestTemperatures(); // Send the command to get temperatures
 // Serial.println("DONE");
  // After we got the temperatures, we can print them here.
  // We use the function ByIndex, and as an example get the temperature from the first sensor only.
 // Serial.print("Temperature for the device 1 (index 0) is: ");
  
 // int y=(sensors.getTempCByIndex(0));  
 //  Serial.println(y);
 //  byte b;
   int sensorValue = analogRead(A0);
   // 10 x 14 font clock, including demo of OR and NOR modes for pixels so that the flashing colon can be overlayed
   Serial.print(sensorValue);
   Serial.print("\n");
   // draw a border rectangle around the outside of the display
   int a=sensorValue/100;
   int d=sensorValue%100;
   int k=d/10;
   int m=d%10;
   
   
   
   c=48+a ;
   e=48+k;
   n=48+m;
   dmd.selectFont( Arial_Black_16 );
   //dmd.drawString( 0,1, "T", 1, GRAPHICS_NORMAL );
   dmd.drawChar( 2,1, c, GRAPHICS_NORMAL );
   dmd.drawChar( 12,1, e, GRAPHICS_NORMAL );
     dmd.drawChar( 21,1, n, GRAPHICS_NORMAL );
     delay(1200);
     dmd.clearScreen( true );
    // dmd.drawChar( 2,1, "P", GRAPHICS_NORMAL );
   dmd.drawString( 0,1, "P", 2, GRAPHICS_NORMAL );
   dmd.drawString( 10,1, "P", 2, GRAPHICS_NORMAL );
   dmd.drawString( 20,1, "M", 2, GRAPHICS_NORMAL );
   delay(1200);
     dmd.clearScreen( true );
     dmd.selectFont(System5x7);
     if(sensorValue<=300)
     {
        
      for (byte x=0;x<DISPLAYS_ACROSS;x++) {
     for (byte y=0;y<DISPLAYS_DOWN;y++) {
       dmd.drawString(  2+(32*x),  1+(16*y), "Fresh", 8, GRAPHICS_NORMAL );
       dmd.drawString(  7+(32*x),  9+(16*y), "Air", 3, GRAPHICS_NORMAL );
       delay(2000);
       dmd.clearScreen( true );
     }
   }
     }
     if(sensorValue>300 &&  sensorValue<350)
     {
        
      for (byte x=0;x<DISPLAYS_ACROSS;x++) {
     for (byte y=0;y<DISPLAYS_DOWN;y++) {
       dmd.drawString(  2+(32*x),  1+(16*y), "Polluted", 8, GRAPHICS_NORMAL );
       dmd.drawString(  7+(32*x),  9+(16*y), "Air", 3, GRAPHICS_NORMAL );
       delay(2000);
       dmd.clearScreen( true );
     }
   }
     }
      if(sensorValue>=350)
     {
        
      for (byte x=0;x<DISPLAYS_ACROSS;x++) {
     for (byte y=0;y<DISPLAYS_DOWN;y++) {
       dmd.drawString(  0+(32*x),  1+(16*y), "Highly", 6, GRAPHICS_NORMAL );
       dmd.drawString(  0+(32*x),  9+(16*y), "Polluted", 8, GRAPHICS_NORMAL );
       delay(2000);
       dmd.clearScreen( true );
     }
   }
     }
     }
   //dmd.drawBox(  0,  0, (32*DISPLAYS_ACROSS)-1, (16*DISPLAYS_DOWN)-1, GRAPHICS_NORMAL );
  // delay( 100 );
  // end 
#include <SoftwareSerial.h>
SoftwareSerial SIM900(2, 3);
//Variable to save incoming SMS characters
#include "TimerOne.h"
#include "SPI.h"
#include "DMD.h"
#include "Arial_black_16.h"
String incoming_char= " ";
/* you can remove the fonts if unused */
#define DISPLAYS_ACROSS 1
#define DISPLAYS_DOWN 1
DMD dmd( DISPLAYS_ACROSS,DISPLAYS_DOWN );
void ScanDMD()
{
dmd.scanDisplayBySPI();
}


void setup() {
  Timer1.initialize( 3000 );
Timer1.attachInterrupt( ScanDMD );
dmd.clearScreen( true );
  // Arduino communicates with SIM900 GSM shield at a baud rate of 19200
  // Make sure that corresponds to the baud rate of your module
  SIM900.begin(9600);
  // For serial monitor
  Serial.begin(9600); 
  // Give time to your GSM shield log on to network
  delay(20000);

  // AT command to set SIM900 to SMS mode
  SIM900.print("AT+CMGF=1\r"); 
  delay(100);
  // Set module to send SMS data to serial out upon receipt 
  SIM900.print("AT+CNMI=2,2,0,0,0\r");
}
void drawText( String dispString )
{
dmd.clearScreen( true );
dmd.selectFont( Arial_Black_16 );
char newString[256];
int sLength = dispString.length();
dispString.toCharArray( newString, sLength+1 );
dmd.drawMarquee( newString , sLength , ( 32*DISPLAYS_ACROSS )-1 ,0);
long start=millis();
long timer=start;
long timer2=start;
boolean ret=false;
while( !ret ){
if ( ( timer+20 ) < millis() ) {
ret=dmd.stepMarquee( -1 , 0 );
timer=millis();
}
}
}

void loop() {
  // Display any text that the GSM shield sends out on the serial monitor
  if(SIM900.available() >0) {
    //Get the character from the cellular serial port
    incoming_char=SIM900.readString(); 
    //Print the incoming character to the terminal
    Serial.println(incoming_char); 
    drawText(incoming_char);
    delay(1000);
    
  }
}
// end

#include <SPI.h>        //SPI.h must be included as DMD is written by SPI (the IDE complains otherwise)
#include <DMD.h>        //
#include <TimerOne.h>   //
#include <OneWire.h>
//#include <DallasTemperature.h>
#include "SystemFont5x7.h"
#include "Arial_black_16.h"
#include "Arial14.h"
#include "dht.h"
#define dht_apin A0 // Analog Pin sensor is connected to
 
dht DHT;
 

//Fire up the DMD library as dmd
#define DISPLAYS_ACROSS 2
#define DISPLAYS_DOWN 1
DMD dmd(DISPLAYS_ACROSS, DISPLAYS_DOWN);
//#define ONE_WIRE_BUS 9

// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
//OneWire oneWire(ONE_WIRE_BUS);
char c,e,m,n;
// Pass our oneWire reference to Dallas Temperature. 
//DallasTemperature sensors(&oneWire);
/*--------------------------------------------------------------------------------------
  Interrupt handler for Timer1 (TimerOne) driven DMD refresh scanning, this gets
  called at the period set in Timer1.initialize();
--------------------------------------------------------------------------------------*/
void ScanDMD()
{ 
  dmd.scanDisplayBySPI();
}

/*--------------------------------------------------------------------------------------
  setup
  Called by the Arduino architecture before the main loop begins
--------------------------------------------------------------------------------------*/
void setup(void)
{
 Serial.begin(9600);
 // Serial.println("Dallas Temperature IC Control Library Demo");

  // Start up the library
 // sensors.begin();
   //initialize TimerOne's interrupt/CPU usage used to scan and refresh the display
   Timer1.initialize( 5000 );           //period in microseconds to call ScanDMD. Anything longer than 5000 (5ms) and you can see flicker.
   Timer1.attachInterrupt( ScanDMD );   //attach the Timer1 interrupt to ScanDMD which goes to dmd.scanDisplayBySPI()

   //clear/init the DMD pixels held in RAM
   dmd.clearScreen( true );   //true is normal (all pixels off), false is negative (all pixels on)

}

/*--------------------------------------------------------------------------------------
  loop
  Arduino architecture main loop
--------------------------------------------------------------------------------------*/
void loop(void)
{
 // Serial.print("Requesting temperatures...");
 // sensors.requestTemperatures(); // Send the command to get temperatures
 // Serial.println("DONE");
  // After we got the temperatures, we can print them here.
  // We use the function ByIndex, and as an example get the temperature from the first sensor only.
 // Serial.print("Temperature for the device 1 (index 0) is: ");
  
 // int y=(sensors.getTempCByIndex(0));  
 //  Serial.println(y);
 //  byte b;
   DHT.read11(dht_apin);
   Serial.print("Current humidity = ");
   int humidity= DHT.humidity;
    Serial.print(humidity);
    Serial.print("%  ");
    Serial.print("temperature = ");
    int temperature= DHT.temperature;
    Serial.print(temperature); 
    Serial.println("C  ");
    
    //delay(5000);
   Serial.print("\n");
   // draw a border rectangle around the outside of the display
   int ha=humidity/10;
   int hd=humidity%10;
   int ta=temperature/10;
   int td=temperature%10;
   c=48+ha ;
   e=48+hd;
   m=48+ta ;
   n=48+td;
     dmd.clearScreen( true ); 
   dmd.selectFont( Arial_Black_16 );
   //dmd.drawString( 0,1, "T", 1, GRAPHICS_NORMAL );
      dmd.drawChar( 0,1, m, GRAPHICS_NORMAL );
     dmd.drawChar( 9,1, n, GRAPHICS_NORMAL );
     dmd.drawString( 18,1, "'C", 2, GRAPHICS_NORMAL );
      dmd.drawChar( 32,1, c, GRAPHICS_NORMAL );
     dmd.drawChar( 41,1, e, GRAPHICS_NORMAL );
     dmd.drawString( 50,1, "%", 2, GRAPHICS_NORMAL );
      delay(1200);
     }
// end
const int sensorMin = 0; 
const int sensorMax = 1024; 
String textToScroll=" ";
#include "TimerOne.h"
#include "SPI.h"        
#include "DMD.h"        
#include "Arial_black_16.h" 
/* you can remove the fonts if unused */
#define DISPLAYS_ACROSS 2
#define DISPLAYS_DOWN 1
DMD dmd( DISPLAYS_ACROSS,DISPLAYS_DOWN );
        
void ScanDMD()
{ 
  dmd.scanDisplayBySPI();
}
void setup() 
{
   Timer1.initialize( 3000 );           
   Timer1.attachInterrupt( ScanDMD );  
   dmd.clearScreen( true ); 
  Serial.begin(9600);
}
void drawText( String dispString ) 
{
  dmd.clearScreen( true );
  dmd.selectFont( Arial_Black_16 );
  char newString[256];
  int sLength = dispString.length();
  dispString.toCharArray( newString, sLength+1 );
  dmd.drawMarquee( newString , sLength , ( 32*DISPLAYS_ACROSS )-1 ,0);
  long start=millis();
  long timer=start;
  long timer2=start;
  boolean ret=false;
  while( !ret ){
    if ( ( timer+20 ) < millis() ) {
      ret=dmd.stepMarquee( -1 , 0 );
      timer=millis();
    }
  }
}

void loop()
{
  int sensorReading = analogRead(A0);
  int range = map(sensorReading, sensorMin, sensorMax, 0, 3);

  switch (range)
    {
      case 0:
        textToScroll= "RAINING";
        break;

      case 1:
        textToScroll= "HEAVY RAINFALL";
        break;

      case 2:
        textToScroll= "NOT RAINING";
        break;
      default:
        Serial.println(" ");
    }
  drawText(textToScroll);
  delay(1000); 
}

// end
#include <SPI.h>        //SPI.h must be included as DMD is written by SPI (the IDE complains otherwise)
#include <DMD.h>        //
#include <TimerOne.h>   //
#include "Arial_black_16.h"

//Fire up the DMD library as dmd
DMD dmd(1,1);

/*--------------------------------------------------------------------------------------
  Interrupt handler for Timer1 (TimerOne) driven DMD refresh scanning, this gets
  called at the period set in Timer1.initialize();
--------------------------------------------------------------------------------------*/
void ScanDMD()
{ 
  dmd.scanDisplayBySPI();
}

/*--------------------------------------------------------------------------------------
  Show clock numerals on the screen from a 4 digit time value, and select whether the
  flashing colon is on or off
--------------------------------------------------------------------------------------*/
void ShowClockNumbers( unsigned int uiTime, byte bColonOn )
{
   dmd.clearScreen(true);
   dmd.drawChar(  1,  3,'0'+((uiTime%10000)/1000), GRAPHICS_NORMAL );   // thousands
   dmd.drawChar(  8,  3, '0'+((uiTime%1000) /100),  GRAPHICS_NORMAL );   // hundreds
   dmd.drawChar( 17,  3, '0'+((uiTime%100)  /10),   GRAPHICS_NORMAL );   // tens
   dmd.drawChar( 25,  3, '0'+ (uiTime%10),          GRAPHICS_NORMAL );   // units
   if( bColonOn )
      dmd.drawChar( 15,  3, ':', GRAPHICS_OR     );   // clock colon overlay on
   else
      dmd.drawChar( 15,  3, ':', GRAPHICS_NOR    );   // clock colon overlay off
}

/*--------------------------------------------------------------------------------------
  setup
  Called by the Arduino architecture before the main loop begins
--------------------------------------------------------------------------------------*/
void setup(void)
{
   
   //initialize TimerOne's interrupt/CPU usage used to scan and refresh the display
   Timer1.initialize( 5000 );           //period in microseconds to call ScanDMD. Anything longer than 5000 (5ms) and you can see flicker.
   Timer1.attachInterrupt( ScanDMD );   //attach the Timer1 interrupt to ScanDMD which goes to dmd.scanDisplayBySPI()

   //clear/init the DMD pixels held in RAM
   dmd.clearScreen( true );   //true is normal (all pixels off), false is negative (all pixels on)
   dmd.selectFont(Arial_Black_16);

}

/*--------------------------------------------------------------------------------------
  loop
  Arduino architecture main loop
--------------------------------------------------------------------------------------*/
void loop(void)
{
   unsigned int ui;
   
   // 10 x 14 font clock, including demo of OR and NOR modes for pixels so that the flashing colon can be overlayed
   ui = 1234;
   ShowClockNumbers( ui, true );
   delay( 1000 );
   ShowClockNumbers( ui, false );
   delay( 1000 );
   ShowClockNumbers( ui, true );
   delay( 1000 );
   ShowClockNumbers( ui, false );
   delay( 1000 );

   ui = 2345;
   ShowClockNumbers( ui, true );
   delay( 1000 );
   ShowClockNumbers( ui, false );
   delay( 1000 );
   ShowClockNumbers( ui, true );
   delay( 1000 );
   ShowClockNumbers( ui, false );
   delay( 1000 );
}
// end 


                                                          

CHAPTER 7

ADVANTAGE & LIMITATION

  • ADVANTAGES
  • It is durable.
  • Easy to understand & operate.
  • Efficiency is high.
  • Notice can be displayed just by sending a SMS.
  • Display temperature, humidity, rainfall, time, date, day & months accurately.
  • It has commercially high scope.
  • It removes the paper based notice board system.
  • LIMITATIONS
  • Bulky in size.
  • Can only be used in area with GSM Network coverage.
  • Not suitable for large system so system advancement is needed.

CHAPTER 8

APPLICATIONS

  1. It can be used in public places like Bus Park, railway station, airport to display message for commuters.
  2. It can be used in academic like schools, colleges to convey important notices.
  3. It can be used in industries, offices, shopping malls as well as in recreation parks.

CHAPTER 9

FUTURE IMPORTANT & PROBLEM FORMULATION

9.1 FUTURE IMPROVEMENT

In developed countries they have been already started using this kind of project day to day life. Now a days, they have started using RGB P2.5mm matrix display to display images and videos and hoarding boards are digital boards in their environment. But developing countries like ours have started only before couple of the years ago. Most of the places like hospital, corporate houses, bus park, railway station, airport, public place they are using this kind of project. We can predict this project have a great scope in future and data can be store. This project contains multi features which provide information like time, date, day, months, temperature, humidity, rain detect, pollutions level and GSM based notice.

PROBLEM FORMULATION       

  1. Initiate auxiliary functions involving environmental, utility and process controls.
  2. Systems may incorporate industries or many more functions.
  3. Common organized assistance to initiate or assist information control activities.

CHAPTER:-10

CONCLUSION

Weather plays a major role in our daily life and without broadcasting we would have difficulty planning our daily activites. As we can see weather is not a simple subject like we may have been thinking. It makes human life more easy to understand about weather. This project help us to design electronic circuit, connecting, programming. Also a GSM based notice useful to display urgent notice from any corner of the world. So it is more useful in real time and in future. So we want to make this project.

YOUTUBE LINK

NOTE

THIS PROJECT IS DONE BY:

DHARMENDRA Kr. MANDAL,


GOPAL MANDAL

KAILASH Kr. MANDAL,

MUKESH SAH,

NABIN Kr. YADAV

Recommended For You

About the Author: admin

3 Comments

  1. Hello!

    I hope that I’m not bothering you. I’m a business development manager at Duck.Design (https://www.duck.design/hire-designer) . I thought that your company is probably looking for a designer to join your team, and I want to offer you our trial of graphic or web designer for $1 per 1 day. You can outsource any type of tasks for our design team.

    Our designer will work for you only, perform any design-related work, including logos, banners, packaging and web design (websites, app design) and even motion design (explainer, promo videos) etc.

    If you are interested, book a call here https://calendly.com/duck-design/15min?back=1&month=2021-02

    Thank you for your time!

    Email: duck.design.artem@gmail.com

Leave a Reply

Your email address will not be published.