Moheeb ZaraPrentice BjerkesethJustin Lassen
Published © MIT

BluSpike - Community Driven BLE Sensor Network

Easy to build w/ off the shelf parts, BLE solar powered sensor array. Connect and share its data to the cloud and be rewarded with ethereum

BeginnerFull instructions provided1 hour2,584

Things used in this project

Hardware components

Solar Yard Lamp
×1
PVC Pipe 2ft x 1.25 in
×2
Arduino 101
Arduino 101
×1
Grove starter kit plus for Intel Edison
Seeed Studio Grove starter kit plus for Intel Edison
×1
Metal Round Box for Wiring
×1
PVC Couple with Thread
×1
Threaded bolt for PVC coupler
×1
Friction Tape
×1
9V to Barrel Jack Connector
9V to Barrel Jack Connector
×1

Story

Read more

Custom parts and enclosures

Sensor Carriage

Brackets

Code

sensorRead

Arduino
#include <CurieBLE.h>

BLEPeripheral blePeripheral;
BLEService customService("19B10000-E8F2-537E-4F6C-D104768A1216");

BLEUnsignedCharCharacteristic tempCharacteristic("5667f3b1-d6a2-4fb2-a917-4bee580a9c84", BLERead | BLENotify);
BLEUnsignedCharCharacteristic dustCharacteristic("5667f3b1-d6a2-4fb2-a917-4bee580a9c85", BLERead | BLENotify);
BLEUnsignedCharCharacteristic humidityCharacteristic("5667f3b1-d6a2-4fb2-a917-4bee580a9c86", BLERead | BLENotify);
BLEUnsignedCharCharacteristic carbonCharacteristic("5667f3b1-d6a2-4fb2-a917-4bee580a9c87", BLERead | BLENotify);

const int B = 4275;               // B value of the thermistor
const int R0 = 100000;            // R0 = 100k

void setup() {
  Serial.begin(9600);

  blePeripheral.setLocalName("Curie");
  blePeripheral.setAdvertisedServiceUuid(customService.uuid());

  blePeripheral.addAttribute(customService);
  blePeripheral.addAttribute(tempCharacteristic);
  blePeripheral.addAttribute(dustCharacteristic);
  blePeripheral.addAttribute(humidityCharacteristic);
  blePeripheral.addAttribute(carbonCharacteristic);

  tempCharacteristic.setValue(0);
  dustCharacteristic.setValue(0);
  humidityCharacteristic.setValue(0);
  carbonCharacteristic.setValue(0);

  blePeripheral.begin();
}

void loop() {
  BLECentral central = blePeripheral.central();

  if (central) {
    Serial.print("Connected to central: ");
    Serial.println(central.address());

    while (central.connected()) {
      int dust = analogRead(1);
      int humidity = analogRead(2);
      int carbon = analogRead(3);
      int a = analogRead(0);

      float R = 1023.0/a-1.0;
      R = R0*R;
  
      float temperature = 1.0/(log(R/R0)/B+1/298.15)-273.15;
      tempCharacteristic.setValue(temperature);
      dustCharacteristic.setValue(dust);
      humidityCharacteristic.setValue(humidity);
      carbonCharacteristic.setValue(carbon);
    }
  }
}

Github

Credits

Moheeb Zara

Moheeb Zara

39 projects • 136 followers
Developer Advocate at EMQ Technologies - . Co-founder - South West Maker Festival. Hardware hacker, artist, robots, HeatSync Labs
Prentice Bjerkeseth

Prentice Bjerkeseth

0 projects • 2 followers
Web and Design Generalist
Justin Lassen

Justin Lassen

0 projects • 0 followers
Award winning VR developer, Intel Innovator

Comments