Skip to content

ChristophBodenstein/sensorwatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Sensorwatch

A combination of arduino and web to log/view sensor data (i.e. temperature).

Basic usage

Several Sensors (DS18B20 temp sensors) are coupled via One-Wire to your arduino. It will read the sensor values frequently and upload them to your Webserver. Via http:... you can access this sensor values as (hopefully) neat graphs or simple as values.

Used hardware

  • Arduino DUE (former versions used an Arudino UNO)
  • ESP8266 Wifi-module (former Versions used a Wifly-shield)
  • Sensor-shield (not necessary but it makes some connections easier)
  • DS18B20 temperature sensors

Demo

To see if it fits your needs, have a look at this demo installation:

Desktop view

Simpe View, for mobile

Installation

  1. Solder/connect your sensors to arduino
  2. Install the necessary arduino libraries
  3. Make your changes in arduino-project (preferences.h)
  4. Copy php-css-js files to your webspace and make corresponding changes

Changes to be made for installation

There are few things to be changed before you can start.

Arduino side
  • All points to be changed are in preferences.h
  • Network config (I used no DHCP because the WiFly-shield had issues in combination with my router)
  • SEKRET You need to set a simple string to obfuscate the URL so that not everybody can add faulty sensor values. Sometimes this is called this API-Key. This is not secure, so don`t use this SW to control critical Systems!
Server side
  • VIEWSEKRET is needed to see the website incl. the sensor values
  • ADDSEKRET is needed to add new sensor values --> this is the same like in arduino project
  • Raw and readable names of your sensors are entered as an array at the beginning of index.php (Every unknown sensor will be displayed as such beside the graph.)
  • There are many things to be changed for your use case. They are marked with "TBC" in arduino and php source code.

Used third party software (Website)

This Project uses materialize design and Chart.js for graphs.

For materialize documentation, see the materialize website.

For complete Chart.js documentation, see the Chart.js home page.

Used Arduino libraries

Important HW-Issues to keep in mind

  • Some Arduio DUE don`t start after power-up until reset is pressed. You can use a capacitor to make a simple workaround, thanks to martinyim from arduino-forum
  • The Wifi-module will need high currents during data-transfer. So it`s a good idea to not power it through arduino but with a secondary power source. I used the lazy solution and added some big capacitors to overcome the short times of intense power consumption.
  • I use the watchdog to reset the whole system if any transmission problems occur. But in the last Arduino-IDE the watchdog for arduino DUE is disabled. You need to enable it. That´s easy once you found the relevant files on your system. See here

Known Issues and ideas for your fork

  • Authentication is not supported now because Arduino Wifly lib or Wifly-Shield does not support https and I'm not aware of another solution with similar security.
  • HTTPS is not available, looks like the used hardware does not suport this.
  • Gaps of sensor-values. When there is not sensor value/signal for some time, you will not notice this in the graph, because all available values are taken into account without checking the available frequency of sensor values
  • Instead of the built in watchdog you could use a hardware watchdog to completely reset arduino and WiFly in case of any error. My last version used this and it was a pretty good idea for a system you cannot touch for a long time.

About

Read temperature sensors and upload them to your webserver

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages