Coder Social home page Coder Social logo

citizen-scientist's Introduction

citizen-scientist

Monitor air quality and automatically share the collected data using inexpensive hardware.

OpenWest slides show how to build the project, including slide 24 with wiring explanation.

Setup

Install arduino 1.8.2 or newer

Install serial driver from vendor drivers

Set up esp8266 runtime for arduino

Open geothunk.ino in arduino and select board. Tools->Board->NodeMCU 1.0 (ESP-12E Module)

Libraries: sketch->include library->manage libraries

Plug in board and choose the port. On mac: Tools->Port->/dev/cu.SLAB_USBtoUART (Reboot and check your USB cable is a full power+data cable if the port isn't available.)

Hit the upload button.

Reboot the board and use your phone to connect to the Geothunk-XXX access point. In the captive portal screen, set the password for your access point. Hit save. There is a youtube video to show this in practice.

If you're on the same access point as the sensor, you should be able to see graphs for your measurements by clicking its geothunk.local mdns link. If mdns isn't working or you have multiple sensors, point a browser at the IP address displayed on the device instead.

Register and agree to share your data with our agreement

Contributors

  • Brad Midgley wrote the firmware and built the sensor
  • Tim Harper updated the firmware with refactors, overflow protection, improved sensor listener
  • Dorian Tolman designed the case

Parts:

citizen-scientist's People

Contributors

bmidgley avatar timcharper avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

timcharper

citizen-scientist's Issues

WeMos DHT sensor regression with 7a0b17b

After upgrading my WeMos geothunk sensor (the one with the built-in display) to the latest master, I noted that the DHT temperature readings would fail frequently. I traced it down to commit 7a0b17b, specifically the following change:

diff --git a/geothunk/geothunk.ino b/geothunk/geothunk.ino
index d2b9a7e..99801b4 100644
--- a/geothunk/geothunk.ino
+++ b/geothunk/geothunk.ino
@@ -296,9 +296,27 @@ void paint_display(long now) {
   }
   display.setTextAlignment(TEXT_ALIGN_RIGHT);
   display.setFont(ArialMT_Plain_10);
-  display.drawString(display.getWidth(), 34, String("1/2/10=") + String(pm1) + String("/") + String(pm2_5) + String("/") + String(pm10));
-  display.drawString(display.getWidth(), 44, String(humidity) + String("%h"));
-  display.drawString(display.getWidth(), 54, String(temperature) + String("°C"));
+
+  String pmValues = String("1/2/10=");
+  String humidityString;
+  String temperatureString;
+
+  if (pmOverdue(now))
+    pmValues = pmValues + String("E/E/E");
+  else
+    pmValues = pmValues + String(pm1) + String("/") + String(pm2_5) + String("/") + String(pm10);
+
+  if (dhtOverdue(now)) {
+    humidityString = String("E");
+    temperatureString = String("E");
+  } else {
+    humidityString = String(humidity);
+    temperatureString = String(temperature);
+  }
+  display.drawString(display.getWidth(), 34, pmValues);
+  display.drawString(display.getWidth(), 44, humidityString + String("%h"));
+  display.drawString(display.getWidth(), 54, temperatureString + String("°C"));
+
   display.setTextAlignment(TEXT_ALIGN_LEFT);
   if (hours < 24)
     uptime = String(hours) + String("h");

Slow wifi connections time out and go into AP mode

If the wifi connection takes a long time or is unreliable, the device goes into AP mode. Combined with reset cycles causes the device to be unreliable.

There should be a way to lock the wifi or make a long timeout.

I think I'd prefer a configuration option to lock the wifi and never enter AP mode.

If the wifi is locked in via flash memory options, then the program button would be required to reset the wifi and get back into AP mode. This will have to work either when associated or when trying to get associated.

I'm not sure we can get into the wifimanager loop, but we could execute this using a connect timeout combined with a test for the button press if you don't mind holding the button for a while to reset it.

Program button can't be pressed using the current 3d printed case

This is a hardware bug! I'll get exact measurements so we can print a pinhole in the right spot and use a pin to hit this button.

I've tried this out and found I broke the microusb connection to the board. So we will need to be sure the board is both connected solidly to the faceplate and also add a little loop in the usb cable so if it does wiggle, it won't put pressure on the connector.

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.