Project in progress
ARDA A Rapid Deployment Automatic environment monitor system

ARDA A Rapid Deployment Automatic environment monitor system © MIT

The climate change is upon us! We badly need an environmental monitoring system deployable in seconds.

  • 697 views
  • 1 comment
  • 11 respects

Components and supplies

Necessary tools and machines

09507 01
Soldering iron (generic)

Apps and online services

About this project

ARDA is a simply deployable system to monitor our environment, collect the data and send back to the base. It will be really simple but it will be able to collect information from sensors, correlate with geographical position, and a timestamp... So we that we live the era of climate change will be hopefully able to monitor the monitor these changes more easily.

However both timestamp and geographical positions are managed by sigfox network. So we have only to collect data, wait a while and send a message!

Wonderful!

I made a test from a basement and it was amazing that the message coming from basement was correctly received.

Code

A simple example Arduino
Load it... Try it. Read the values from sigfox site. Then add hardware and try to modify the button positions. After you have to move the indicated code in the loop sections so that you can have a monitoring loop.
/*
  SigFox First Configuration 

Note: I (Giovambattista Vieri) have modified this code...

  This sketch demonstrates the usage of MKRFox1200 SigFox module.
  Since the board is designed with low power in mind, it depends directly on ArduinoLowPower library

  This example code is in the public domain.
*/

#include <SigFox.h>
#include <ArduinoLowPower.h>

void setup() {
  Serial.begin(9600);
  while (!Serial) {};

  
  if (!SigFox.begin()) {
    Serial.println("Shield error or not present!");
    return;
  }
  
  SigFox.debug();

  String version = SigFox.SigVersion();
  String ID = SigFox.ID();
  String PAC = SigFox.PAC();

  // Display module informations
  Serial.println("MKRFox1200 Sigfox configuration");
  Serial.println("SigFox FW version " + version);
  Serial.println("ID  = " + ID);
  Serial.println("PAC = " + PAC);

  Serial.println("");

  Serial.print("Module temperature: ");
  Serial.println(SigFox.internalTemperature());

  Serial.println("Register your board on https://backend.sigfox.com/activate with provided ID and PAC");
  Serial.println("(if you have already registered you can skip this step and you can delete these print lines)"); 

  delay(100);

  // Send the module to the deepest sleep
  SigFox.end();

 
//// the above part is coming from an example program of sigfox. 
//// the part below is mine and if you like you reuse without notice ... 
//// so the license is still "public domain" 

/* now start with pin setup! */
  Serial.println("\nhouse keeping procedures\n");  
  pinMode(0, INPUT);
  pinMode(1, INPUT);
  pinMode(2, INPUT);
  pinMode(3, INPUT);
  pinMode(4, INPUT);
  pinMode(5, INPUT);
  pinMode(6, INPUT);  
  pinMode(7, INPUT);
/* end of pin setup */

/* now read the bit */ 
  Serial.println("read values\n"); 
  uint8_t b0, b1, b2, b3, b4, b5, b6, b7; 

  
  b0= digitalRead(0); 
  b1= digitalRead(1); 
  b2= digitalRead(2); 
  b3= digitalRead(3); 
  b4= digitalRead(4); 
  b5= digitalRead(5); 
  b6= digitalRead(6); 
  b7= digitalRead(7); 
/*  now convert in a uchar */ 
  uint8_t res; 
  res=b0; 
  res+=b1 << 1;
  res+=b2 << 2;
  res+=b3 << 3;
  res+=b4 << 4;
  res+=b5 << 5;
  res+=b6 << 6;
  res+=b7 << 7;
// now res contains the value

    
  String message=String(res);
 

 Serial.println(message); 

 
  sendStringAndGetResponse(message);

//// end of part developed by me ... 
/* as you can see it is really simple if you ike you can move in loop */
/* if you do so, remember to add a delay ! */ 
 
}

void loop()
{
}

void sendString(String str) {
  // Start the module
  SigFox.begin();
  // Wait at least 30mS after first configuration (100mS before)
  delay(100);
  // Clears all pending interrupts
  SigFox.status();
  delay(1);

  SigFox.beginPacket();
  SigFox.print(str);

  int ret = SigFox.endPacket();  // send buffer to SIGFOX network
  if (ret > 0) {
    Serial.println("No transmission");
  } else {
    Serial.println("Transmission ok");
  }

  Serial.println(SigFox.status(SIGFOX));
  Serial.println(SigFox.status(ATMEL));
  SigFox.end();
}

void sendStringAndGetResponse(String str) {
  // Start the module
  SigFox.begin();
  // Wait at least 30mS after first configuration (100mS before)
  delay(100);
  // Clears all pending interrupts
  SigFox.status();
  delay(1);

  SigFox.beginPacket();
  SigFox.print(str);

  int ret = SigFox.endPacket(true);  // send buffer to SIGFOX network and wait for a response
  if (ret > 0) {
    Serial.println("No transmission");
  } else {
    Serial.println("Transmission ok");
  }

  Serial.println(SigFox.status(SIGFOX));
  Serial.println(SigFox.status(ATMEL));

  if (SigFox.parsePacket()) {
    Serial.println("Response from server:");
    while (SigFox.available()) {
      Serial.print("0x");
      Serial.println(SigFox.read(), HEX);
    }
  } else {
    Serial.println("Could not get any response from the server");
    Serial.println("Check the SigFox coverage in your area");
    Serial.println("If you are indoor, check the 20dB coverage or move near a window");
  }
  Serial.println();

  SigFox.end();
}

Schematics

circuit schema
look at it, it's simple. You can use on breadboard or to realize (remember this circuit is for only one input... you want two input you have to duplicate and so on) a lever switch box (I have done so)
Img 20171115 073112 plroxrs8jw

Comments

Similar projects you might like

Fox Advisor

Project tutorial by Celia Garrido Hidalgo

  • 3,966 views
  • 2 comments
  • 13 respects

Automatic Watering System

Project tutorial by Manson Hau

  • 12,693 views
  • 11 comments
  • 53 respects

Arduino 101 Home BLE System

Project tutorial by Alexis Santiago Allende

  • 3,352 views
  • 0 comments
  • 14 respects

Android App-Based Home Automation System Using IOT

Project tutorial by Autoshack

  • 43,158 views
  • 21 comments
  • 121 respects

Arduino and AC Devices - Automatic Lights

Project tutorial by Ahmed Hamdy

  • 26,797 views
  • 9 comments
  • 59 respects

Probability | Autonomous Rover

Project in progress by UniverseRobotics

  • 14,306 views
  • 19 comments
  • 70 respects
Add projectSign up / Login