Update 04/02/24
Update 31/01/24
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"};
}
#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.
More update will follow in this days!!
Stay tuned!!
Update 23/01/24
Update 21/01/24
HEY!
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:
For everything else, ASK ME on Ig at https://www.instagram.com/bennys_prop/ or here in the comments.
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)
The author remixed this model. Imported from Thingiverse.
The main changes are made for compatibility of the parts with more affordable components like Ball bearings and electronics.