YAWS, Yet Another Weather Station

Yes! Is the another IoT Project of a Weather station.... But HEY IT'S MY PROJECT OF MY WEATHER STATION!!
21
141
1
1003
updated February 4, 2024

Description

PDF

Update 04/02/24

  • Thanks to @ScruffyOrc_217627 we found that can be an issue with the anemometer bowl connection with the holder, it can be a fitting issue.
    Nothing difficult! Just refile it a bit with a cutter!

Update 31/01/24

  • I started the electronic part with some late.
    The main issue is my board (NodeMCU esp32 or esp8266 d1mini)
    Both have some high deep sleep current, almost 20mAh, so running it on battery is pretty impossible (I can't go on the roof every week for battery change).
    So ATM for economy issue i'll write down the code using this boards and thinking with direct power in mind for working on the sensors, after the main test i'll start with the deep sleep protocol for cutting the power as much as i can and use one or two 18650 Li-ion and a small solar panel.
    But time by time I'll do everything
  • I found a bug with The Esp8266, the anemometer readings are awful and i couldn't find a solution (Obv, AFTER i made the pcb… so i had to remake it with the Esp32 NodeMCU).
    So if you find the fix for this PLEASE comment it so i can add the feature and the two different codes!

    Here you have the BETA of the sensor reading YAML, the rain gauge part is under development.
esphome:
  name: esp32-yaws
  friendly_name: esp32-YAWS
      
  includes:
    - "as5600_sensor.h"
  libraries:
    - Wire
    - "AS5600"

esp32:
  board: nodemcu-32s
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "XXXXXXXXXXXXXXXXX"

ota:
  password: "XXXXXXXXXXXXXXXX"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "XXXXXXX"
    password: "XXXX"
    
captive_portal:
    
i2c:
  sda: GPIO21
  scl: GPIO22

bme680_bsec:
      address: 0x77 #I specified it because mine wasn't 0x76

sensor:
  - platform: custom
    lambda: |-
      auto my_as5600_sensor = new AS5600Sensor();
      App.register_component(my_as5600_sensor);
      return {my_as5600_sensor};
    sensors:
      name: "AS5600"
      accuracy_decimals: 2

  - platform: pulse_counter # this part is for the anemometer.
    pin: 19
    unit_of_measurement: 'm/s'
    name: 'Wind speed'
    filters:
      - multiply: 0.0173833333
    update_interval: 60s   

  - platform: bme680_bsec
    temperature:
      name: "BME680 Temperature"
    pressure:
      name: "BME680 Pressure"
    humidity:
      name: "BME680 Humidity"
    iaq:
      name: "BME680 IAQ"
      id: iaq
    co2_equivalent:
      name: "BME680 CO2 Equivalent"
    breath_voc_equivalent:
      name: "BME680 Breath VOC Equivalent"

text_sensor: // BME sensor output, I left them all for checking.
  - platform: bme680_bsec
    iaq_accuracy:
      name: "BME680 IAQ Accuracy"

  - platform: template
    name: "BME680 IAQ Classification"
    icon: "mdi:checkbox-marked-circle-outline"
    lambda: |-
      if ( int(id(iaq).state) <= 50) {
        return {"Excellent"};
      }
      else if (int(id(iaq).state) >= 51 && int(id(iaq).state) <= 100) {
        return {"Good"};
      }
      else if (int(id(iaq).state) >= 101 && int(id(iaq).state) <= 150) {
        return {"Lightly polluted"};
      }
      else if (int(id(iaq).state) >= 151 && int(id(iaq).state) <= 200) {
        return {"Moderately polluted"};
      }
      else if (int(id(iaq).state) >= 201 && int(id(iaq).state) <= 250) {
        return {"Heavily polluted"};
      }
      else if (int(id(iaq).state) >= 251 && int(id(iaq).state) <= 350) {
        return {"Severely polluted"};
      }
      else if (int(id(iaq).state) >= 351) {
        return {"Extremely polluted"};
      }
      else {
        return {"error"};
      }
  • The custom sensor config.
#include "esphome.h"
#include <Wire.h>
#include "AS5600.h"

#define TAG "AS5600"

AS5600 as5600; // Default i2c address 0x36

class AS5600Sensor: public PollingComponent, public Sensor {
  public: AS5600 as5600;
  AS5600Sensor(): PollingComponent(5000) {}

  void setup() override {
    as5600.begin();
    as5600.setDirection(AS5600_CLOCK_WISE); // Or AS5600_COUNTERCLOCK_WISE
  }

  void update() override {
    if (!as5600.isConnected()) {
      ESP_LOGE(TAG, "Not connected");
      return;
    }
    if (!as5600.detectMagnet()) {
      ESP_LOGE(TAG, "No magnet detected");
      return;
    }
    if (as5600.magnetTooStrong()) {
      ESP_LOGE(TAG, "Magnet too strong");
      return;
    }
    if (as5600.magnetTooWeak()) {
      ESP_LOGE(TAG, "Magnet too weak");
      return;
    }
    float angle = as5600.rawAngle() * AS5600_RAW_TO_DEGREES;
    publish_state(angle);
  }
};

For the library use the AS5600 from RobTillaart, https://github.com/RobTillaart/AS5600
For the sensor implementation i referred at the EspHome repository for each sensor (BME680 BSEC, DHT22 ecc).

The anemo is just a RPM counter (Pulse counter in EspHome, it gives you back the pulses in one minute), the maths are based on my anemometer design but you can adjust based on yours.

  1. Measure the distance between the center of the bearing and the cup center (Radius). (0,166m)
  2. Multiply it by 2 and find the Diameter. (0,322m)
  3. Multiply it by 3,1416 and find the Circumference. (1,0430112m)
  4. Now you know how much travel does a cup with one spin.
  5. After that you multiply the circumference by the RPM and you know how many distance the anemometer has done in one minute. (meter per minute) and divide it by 60 for finding the meter per second.
  6. For simplifying the calc, we can divide the circumference by the update interval (60) and find the constant for this anemometer that will be multiplied for RPM giving us the m/s. (0,0173833m). (AND IF U HAVE BIG PP U'R GONNA USE METRIC SISTEM AND NOT EAGLES PER BURGER) (DAD JOKE FLAG)
    At leastyou can multiply the m/s by 3,6 for Km/h and by 1,94 for Knots.

More update will follow in this days!!
Stay tuned!!

Update 23/01/24

  • Update the Pluvio-Base with a less strong one (Rated about 10N of max force with a deformation of 0,9mm and 100 infill) for better filament economy.
  • Updated the base for the Sensor hub and made the DHT22 adaptor. (More sensor coming soon on request)
  • I started this evening the programming and wiring part. I'll upload the schematics in 4 days and the code will follow.
    Stay tuned!!

Update 21/01/24

HEY!

  1. I finished printing all parts and i found out i MAY have exaggerated with the max weight of the pluvio holder (It can hold at least 3kg with a sensor of 100g… so yes is a bit overkill).
    I'll redesing it this night so for the early morning should be RTP (Ready to print).
  2. The Endscrew parts have been completely redesigned because i found a tiny bug during design, now they are fixed and better designed.
    Let me know what you think. (REMEMBER THEY ARE NOT THREADED).
    The other pieces fits quite well and i updated some FIXED files with tollerances and better made design.
  3. Thanks to a comment's tip, I'll update the sensor hub base with a modular fit for different type of temp sensors.
    This can give you the possibility to test, work and thinker with whatever sensor you like!

Disclaimer:
This is a beta, Not yet finished, working progress, i'mpoorafsoihavetowaitforbuycomponents {DAD JOKE FLAG} project,

So: THE PROJECT FILES ARE NOT COMPLETE AND MAY HAVE SOME ISSUES.

If you find something wrong, not working or “Maybe i think this is better because” comment out so i can fix my disaster and make this project grow with a community! (Utopic? yes but why don't try!)

See you in the next few days for more updates!


NOTE: As today I am still designing the main box and electronic components so this and other parts are not yet available.

Update 19/01/24  Release 0.1.1

I should have fixed all the main issues i found while printing it  and updated the Part List.

So, look out just for the anemometer spoons, the fitting are a bit too much snug (Sorry it's not my design, i'll try to fix it).

In this days I'll begin with the Electronic parts, so stay tuned for more updates!

18/01/2024 Release 0.1

Hey!

Are you looking for another project on a weather station?
Do you like IoT projects?
Do you like well made projects?
Well... we'll see if I made a good work!

This is the Y.A.W.S.!!!

Made because i had a bit too much free time during the winter break in Uni... AND because i love to collect weather data, like any other data a sensor can output...

So

The project is based on the ESP32 chip and Home Assistant integrations like EspHome.

I am not the best as projecting from zero all the sensors so i assembled the station with existing parts and boards suitable for the project.

This is a WORKING PROGRESS project, I am printing it right now so I'll update everything day by day.

The station is fully modular, so you can print only what you need or want to use.

The main components are:

  • Sensor Hub
    This provide the housing under a Stevenson screen for the main sensor, i used a BME680.
  • Wind Hub
    This module contains the Anemometer and Wind direction sensor.
  • Pluviometer.
    Yes it's raining, but how much? well, this will tell us!
    Note: this piece is a remix of a pluviometer made for ZigBee door sensor (Aqara) so is some way this is ZigBee capable.
    Original project from https://smartsolutions4home.com/ss4h-zrg-zigbee-rain-gauge/
  • Control Box
    We need somewhere to put all our electronics.
     

For everything else, ASK ME on Ig at https://www.instagram.com/bennys_prop/ or here in the comments.

Print Settings

Print at whatever layer height you want.
Maybe just the holder parts should be printed at at least 30% infill and 3 wall.

Print everything faced down or the best orientation for you.
I only used supports for the Anemo-BottomBase and the Anemo-TopBase.

Use Brim if your prints are prone to warping (or if you use ASA/ABS banana materials {DAD JOKE FLAG} )

I didn't need to print anything on SLA so FDM should do the job quite well, but i hadn't put it outside at the moment so I'll test also the durability of the PETG.

Maybe the Endscrew parts can be made out of resin for a better thread finiture (Note: both endscrew HAVE to be threaded with a screw and don't came pre-threaded by desing, if you prefer to have it thread ASK and i'll upload the threaded files)

 

You'll Need:

 

Electronics : 

  • An ESP32 based board, the one you prefer, i first used an old ESP 8266 d1mini. 
  • A working Home assistant system for interfacing everything. (pretty important) 
  • BME680 temperature, humidity, pressure “and coffee maker sensor {DAD JOKE FLAG}”. 
  • AS5600 magnetic encoder for wind direction. 
  • Hall effect sensor OR reed switch, for the anemometer and the pluviometer. 
  • Cables, many cables
  • A watertight box for electronics 

Screws and nuts (Must all be Inox Steel) :

  • 3 x M6 75mm Roundhead
  • 3 x M6 Locknut
  • 3 x M3 10mm Roundhead 
  • 3 x M3 Locknut 
  • 1  x M5 v head 45mm 
  • 1  x M5 30mm Roundhead   
  • 4 x M3 10mm V head 
  • 4 x M5 15mm V head 
  • 12 x M5 Locknut 
  • 9 x M5 40mm Roundhead 
Misc:
  • 2 x 608 steel/ceramic bearings (Do not use the rubber sealed one as i did, they won't spin…) 
  • 2 x 10mm dia x 6mm neod. magnets.
  • Main Pole, can be from 30mm to 40mm better if alluminium for weight, but you can use whatever you want.

 

Tags



Model origin

The author remixed this model. Imported from Thingiverse.

Differences of the remix compared to the original

The main changes are made for compatibility of the parts with more affordable components like Ball bearings and electronics.

  • Remixed for 608 (Skateboard) ball bearings fitting.
  • AS5600 ready for wind direction sensor.
  • Refitted the anemometer sensor housing from a reed switch or Hall sensor.
  • Remixed the base for fitting the BME 680 into Sensor Hub case.
  • Redesigned the holders and pole adapters.
  • Electronic setup and HA integration with EspHome (Coming Soon)

License


Highlighted models from creator

View more