Project tutorial
BluSpike - Community Driven BLE Sensor Network

BluSpike - Community Driven BLE Sensor Network © MIT

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

  • 1,612 views
  • 1 comment
  • 6 respects

Components and supplies

Solar Yard Lamp
×1
PVC Pipe 2ft x 1.25 in
×2
Ardgen 101
Arduino 101 & Genuino 101
×1
Grove 20starter 20kit 20plus 20  20intel c2 ae 20iot2 01
Seeed 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
Adafruit industries ada80 image 75px
9V to Barrel Jack Connector
×1

About this project

Note: This tutorial is mostly in video form

Web bluetooth to me is the future. I even wrote a guide about it here https://www.hackster.io/virgilvox/intel-curie-ble-nodejs-990766 Using just a browser to connect to bluetooth devices. I also believe heavily in decentralized sensor networks. In an effort to motivate communities to participate in producing meaningful data about the environment, this project aims to create a simple yet durable outdoor sensor spike with a sensor array.

Any person can walk up to the device, scan its QR code from web app, collect sensor data, take a picture of the environment, and send the bundle to a machine learning platform where in turn they recieve a small yet enticing amount of crypto-currency.

Since I decided to do this in a day - Everything works up to the part of rewarding crypto-currency - which I will add on.

Create Arduino Mount:

Glue the pvc bolt (its thread should fit into the pvc coupler) to the back of the round metal enclosure (you can find these in the Electrical aisle at Home Depot) using whatever glue feels right. I was in a hurry so I used industrial hot glue.

Once dried, screw it into the thread for the pvc coupler.

Attach the Solar Panel

The solar flood lamp I found is great because it comes with a spike and solar panel with a battery and charge circuit built in. Just cut the cable from the lamp, strip the wires and splice it to a barrel jack connector.

Mount the solar panel to a tube of PVC by wrapping its mounting point with friction tape. Run the barrel jack to the Arduino mount.

Attach the spike in the same fashion to the end of the second tube of PVC

Flash the Arduino

Use the firmware included here. Modify as needed :) This guide should be helpful for understanding the code a bit better https://www.hackster.io/virgilvox/intel-curie-ble-nodejs-990766

Add Sensors and an Arduino

Throw that grove shield on your Arduino 101 and shove that thing in the mounting box. Be sure to run your wires through the holes around the box and protect them with plastic wire sleeving.

You can 3D print the sensor carriage (files attached) to better arrange your sensors if you dont want them dangling out. Maybe you like dangly sensors. I don't. But thats just me, really I wont judge you.

Code

sensorReadArduino
#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);
    }
  }
}

Custom parts and enclosures

Sensor Carriage
Brackets

Comments

Similar projects you might like

BLE Sharp Dust Sensor - ARTIK IoT Cloud

Project tutorial by Elijah Scheele

  • 4,322 views
  • 1 comment
  • 21 respects

A Community Data Driven Air Quality Monitoring System

Project in progress by Wai Yung

  • 434 views
  • 0 comments
  • 5 respects

BLE Larson Scanner (Hackster Box Project)

Project showcase by Gustavo Reynaga

  • 3,564 views
  • 2 comments
  • 11 respects

SMS alerts for arduino 101 BLE

Project tutorial by Alexis Santiago Allende

  • 1,904 views
  • 0 comments
  • 7 respects

Arduino 101 BLE RGB Lamp

Project tutorial by Gustavo Reynaga

  • 2,379 views
  • 2 comments
  • 10 respects
Add projectSign up / Login