GithubHelp home page GithubHelp logo

akielaries / cin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nau-iot/cin

0.0 0.0 0.0 3.45 MB

Custom built hardware delivering climate data over MQTT to InfluxDB

License: GNU General Public License v3.0

Shell 0.95% C++ 81.38% Python 16.17% Dockerfile 1.51%

cin's Introduction

Repository for Climate Indicator Node done for the Northern Arizona University Internet of Things (IoT) team

โš ๏ธ Development is done in a private repository synced among a few different development environments. The private-facing repo is many commits ahead of this public facing one!

Authors Akiel Aries

Introduction

This repository contains code that transmits values read from various sensors and published them via MQTT to an Instance of InfluxDB hosted on an RPI 4 with additional peripherals to be added.

  • BME280 Temp, Hum., Press.
  • DS18B20 Liquid Sensor (can be used for measuring ground temp)
  • SHT30 Temp & Hum. (redundant but maybe good for veryfing other peripheral readings)
    • Using SHT30 (x2) for testing communication over I2C vs SCI

Additional peripherals will include :

  • CO2 & Air Quality Sensor (CCS811 CO2 & Air Qual)
  • Adafruit Anemometer
  • Host MCU & BME280 w/ STEMMA QT soil sensor

Repo Details

ATMEGA2560

Folder contains modularized code for reading values in from the BME280 and displaying them both to Serial and an LCD attached.

D1Mini

(MQTT publish code currently decoupled from main())

Folder contains a rough sketch on sending values read from the BME280 and publishing the data through the ESP module located on the D1 mini dev board via MQTT. The data is then sent into an instance of InfluxDB hosted on a Raspberry Pi 4.

MQTT

Folder contains rough sketch of how values will be transmitted from the host microcontroller(D1 Mini Pro) to the raspberry pi that will store these values.

Schematic

CIP_schematic_v0 with KiCad

End goal of this project

Idea is to use the D1 Mini Pro (potentially a more powerful wifi-capable device) as a host microcontroller connected to various peripherals to read and publishing values. The values will be published via MQTT and fed into an instance of InfluxDB hosted on a RPI 4. The data can be visualized in a number of way (will likely go with grafana at first). The mass amounts of readings sent into the DB are subject to statistical analysis in this case the implementation of the Python lib Pandas will be used, also for the visual implementation stage... Final result will contain necessary peripherals on a Printed Circuit Board (PCB).

Dependencies

Todo

For python dependencies:

# install pip (python pkg manager)
$ sudo apt install python3-pip
# verify install
$ pip --version
# install dependencies from requirements.txt
$ pip install -r requirements.txt

InfluxDB

# install InfluxDB dependencies
$ sudo apt install influxdb
$ sudo apt install influxdb-client
$ pip3 install influxdb

# start InfluxDB service
$ sudo service influxdb start
# check status
$ sudo service influxdb status

# edit configuration file and enable HTTP endpoint
$ sudo vim /etc/influxdb/influxdb.conf
# restart service
$ sudo service influxdb restart
# open InfluxDB
$ influxdb

Build

Explain how to build this project. Want this to be executed with running docker only

Clone the repository and build from the Dockerimage:

$ cd climate_indicator_proj
$ docker build --rm -t climate_indicator_proj .

Todo:

How to Contribute to this project...

Todo:

Potential & Forseeable complications with future implementations

  • Using the Arduino C/C++ code and lackluster IDE uses more memory than bare metal C alongside AVR-GCC compiler or ESP equivalent. This is a steep learning curve involving intermediate or advanced knowledge of bit-banging.
  • With recent discovery of Arduino Yun Rev 2 (ATMEGA32u4 chip alongside a Atheros AR9331 with ethernet & wireless capabilities) this could eliminate needing to use the underpowered D1 Mini Pro as a host device or needing to siphon off connections for wireless on more suitable device like the ATMEGA2560.
    • will use the D1 as a voltage reader of the project and publish those values as a seperate MQTT topic.
  • can use the beaglebone as a subscriber device to host values like the RPI

cin's People

Contributors

akielaries avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.