Dhairya Parikh
Published © LGPL

WiSor - The Wireless Sensor Hub

A new way to connect sensors! Connect up to five sensors to the particle powered WiSor and obtain real-time data on your mobile phone!

IntermediateFull instructions provided5 hours810
WiSor - The Wireless Sensor Hub

Things used in this project

Hardware components

Photon
Particle Photon
×1
4xAA battery holder
4xAA battery holder
To power the photon
×1
switch
To switch on/off the particle photon.
×1
Linear Regulator (7805)
Linear Regulator (7805)
To provide steady 5V to the photon
×1
Jumper wires (generic)
Jumper wires (generic)
for connections
×1
AA Batteries
AA Batteries
powering the WiSor
×1
LED (generic)
LED (generic)
Indicator that the device is ON
×1
DHT11 Temperature & Humidity Sensor (4 pins)
DHT11 Temperature & Humidity Sensor (4 pins)
For testing the Hub
×1
Grove - Air quality sensor v1.3
Seeed Grove - Air quality sensor v1.3
For testing the Hub
×1

Software apps and online services

Blynk
Blynk
Particle Build Web IDE
Particle Build Web IDE

Story

Read more

Schematics

WiSor schematic

The Schematic diagram for WiSor.

Code

The Particle Build code

C/C++
The Code for WiSor
#include <Adafruit_DHT.h>
#include "Adafruit_DHT/Adafruit_DHT.h"
#include "SPI.h"
#include "blynk.h"
#include "MQ135.h"

// DHT parameters
#define DHTPIN 1
#define DHTTYPE DHT11
#define BLYNK_PRINT Serial 

// Variables
int temperature;
int humidity;
int boardLed = D7;
int number = 0;
int state = 0;
MQ135 gasSensor = MQ135(2);
float rzero = gasSensor.getRZero();
int ppm = gasSensor.getPPM();
// DHT sensor
DHT dht(DHTPIN, DHTTYPE);
char auth[] = "your authentication code";
void setup()
{
    pinMode(boardLed,OUTPUT); // Our on-board LED is output as well
    Serial.begin(9600);
    Blynk.begin(auth);  
    // Start DHT sensor
    dht.begin();

}

void loop()
{
    Blynk.run();
    int co2_ppm = gasSensor.getPPM();
    int ppm = co2_ppm / 4;
    digitalWrite(boardLed,HIGH); //indicator LED on WiSor turns on
     // Humidity measurement
    temperature = dht.getTempCelcius();
    
    // Humidity measurement
    humidity = dht.getHumidity();
     //virtual pin 1 will be the temperature
  Blynk.virtualWrite(V1, temperature);
   //virtual pin 2 will be the Humidity
  Blynk.virtualWrite(V2, humidity);
    //virtual pin 3 will be the ppm value of CO2 gas
  Blynk.virtualWrite(V3, co2_ppm);
    //virtual pin 4 will be the final ppm value
  Blynk.virtualWrite(V4, ppm);
    //virtual pin 5 will be the temperature
  Blynk.virtualWrite(V5, int(rzero));

}

Credits

Dhairya Parikh

Dhairya Parikh

11 projects • 33 followers
An open source lover who loves to help and be helped from the community :). Machine Learning and IoT Enthusiast. Arduino lover.

Comments

Add projectSign up / Login