Home
Aaron Fischer edited this page 11 months ago

øko weatherstatiøn

Building your own weatherstatiøn is the essential part of this project. We build this project around the vision to provide a solid manual for creating a weatherstation from scratch with common materials for your own. We evaluated several materials and electronic components to make it as efficient and easy to build as possible. The weatherstatiøn can survive on its own without the need for an external power supply or other maintenance work. You build it, put it somewhere outside and let it do its job.

Features

  • No external power source needed (solar powered)
  • Very low cost (~20 EUR)
  • Data will be pushed into InfluxDB over WiFi
  • Energy saving features and deep sleep
  • Easy to build with of the shelf hardware and a 3D printer
  • Firmware is very versatile, you do not need all sensors
  • Automatic “Over the Air” firmware update (coming soon)

Sensor specifications

Device information

  • Battery voltage (V)
  • Battery state (charging, charged/full, draining, error)
  • Energy consumption from the solar cell
  • Energy saving state
  • Health state of all sensors

Building

The weatherstatiøn consists of several components, you can order on AliExpress and a custom made PCB which are housing all these components. Here are the links to the components you need to order:

You also need

  • Some pin headers (if you like the straight one, you can use the ones shipped with the breakout boards)
  • 100k resistor (1/4W)
  • 100n transistor
  • Jumper (salvage from an old Mainboard?)
  • 18650 battery cell (salvage from an old laptop battery?)
  • 2x Cable tie (~20cm long)
  • HT fitting DN40 (the gray ones)
  • HT end plug DN40
  • Metal pipe 20mm x ~30cm (can be ordered on eBay or you find something else to mount it on)

You need to 3D print the following parts

Soldering the PCB

TBD

Construct the case

TBD

Flashing the firmware

First, you need a recent version of the Arduino IDE and the firmware sourcecode. So, checkout this repository (or download it here) and download the Arduino IDE. Next, you need to adjust some settings in order to use the Arduino framework for the ESP8266. Open the preferences (File -> Preferences) and change two important settings: The “Sketchbook location” need to be the path to the firmware folder and under “Additional Boards Mananger URLs” you need to add “http://arduino.esp8266.com/stable/package_esp8266com_index.json”. This enables us to install the ESP8266 board framework. For that, navigate to the Board Manager (Tools -> Board -> Board Manager ...), search for esp8266 and install it (version 2.4.2 is working fine). Now you can change the board to “LOLIN(WEMOS) D1 R2 & mini” in Tools -> Board.

settings

Next, you need to create a file config_user.h and set the variables accordingly. You can use the config_user.h.example as a starting point (just rename the file to config_user.h). With that file in place, you should be able to compile the firmware. Connect your weatherstatiøn (ESP8266) with an USB cable to your PC, choose the richt serial port under Tools -> Port and hit the arrow in the toolbar. The firmware should now compile. After the compilation process is done, the firmware will be flashed to the device. Make sure you remove the jumper before you start the process. This enables the Arduino IDE to reboot the ESP8266 and force it into the bootloader. If everything went fine, your ESP8266 should reboot and start collecting data.

If you are using OSX, you may need to install some 3rd party drivers for the ESP8266 so your Mac recognizes the WeMos D1 board. (the linked site looks sketchy, but I can confirm the driver is legit)

Setup datastore and visualization

We use InfluxDB to store the datapoints from our weatherstatiøn and visualize it with Grafana. To setup both, you can use the docker-compose file to quickly spin up influxdb and grafana. Make sure you adjust at least GF_SERVER_ROOT_URL, GF_SECURITY_ADMIN_PASSWORD and INFLUXDB_ADMIN_PASSWORD before running docker-compose up. For a more permanent setup, you can use the service file for Systemd.

TODO: Create database

TODO: Create user + permissions

Using

Setup WiFi

TODO: AP-Mode, setup wifi sid/password

Accessing data

TODO: Grafana login

TODO: DEscribe the graphs

Hacking

TODO: Firmware walktrough

TODO: Creating a pull request

TODO: Add more sensors to i2c

TODO: Add more stuff to GPIOs

TODO: Accessing 3v3 and 5v

TODO: Notes about energy consumtion and energy saving

FAQ

How can I reset the WiFi credentials?