DIY

Solar powered weather station

Solar powered weather station In this article, the master will share with us his experience in making a weather station. The weather station has a built-in energy efficient E-ink screen. It is powered by a solar panel. Has a number of sensors and, based on their readings, is able to calculate the weather forecast.
Previously, the master has already assembled a weather station to monitor the temperature in the garden where he keeps the turtles, and in the greenhouse. All this was combined into one network, in which lighting and heating were controlled.
Over two years of use, he revealed several shortcomings in weather stations:
– DHT sensors are good for teaching/education, but not for real use – humidity measurement is very poor, values ​​in most cases 99% or sensors freeze.
-If Wi-Fi connection is not possible, the device tries to reconnect to the network while the battery will not be discharged.
-No need to use a Wi-Fi repeater.
In the new device, the wizard tried to take into account all the shortcomings.
The device performs the following functions:
– measuring temperature, humidity and pressure using 2 sensors BME280
– calculating a forecast based on the measured data
– monitoring the battery charge
– temperature display on a 1.54-inch black-and-white display E-ink
– powered by a solar panel
Tools and materials: -Wemos D1 mini; -Charger TP 4056; -BME280 sensors – 2 pcs; – Pin connectors; -Screw clamp; -Resistor 100 kOhm; -1.54-inch b/w display with electronic ink; -18650 battery; -Solar panel 120×60 mm; -3D-printer;
-4-wire cable;
-Sensors DHT11 or DHT22; -2 resistors of 10 kOhm; Step one: sensors
The master used 2 bme280 sensors. This tiny sensor is very interesting. The actual sensor size is only 2x2mm with breakout board. It can be easily connected via I2C to a port on the PCB.
BME sensors are configured with a default address of 0x76, so by default 2 sensors will not work together. You need to change the address on one of them.
By default, on the board, pins 1 and 2 are connected. To change the address, you need to break the connection (just scratching the track with a knife) between pads 1 and 2 and solder pads 2 and 3.
Such actions will reassign the address on the sensor to 0x77.
External sensor wiring
To connect the sensor master used a 3m 4-wire cable. I soldered the sensor on one side, I installed it in the case and installed it in the greenhouse. He soldered the other end directly to the 4 headers on the board.
The connection is as follows:
Board (I2C port) – & gt; sensor
3v3 – & gt; VCC
GND – & gt; GND
D1 – & gt; SCL
D2 – & gt; SDA
The following sensors can be added to this board:
– air quality sensor
– wind speed sensor, wind and rain direction sensor
– DHT series sensors (S_INT and S_EXT ports are already on the PCB)
– light sensor (analogue LDR)
All additional sensors can be connected to ports P1, P2, P3, P4.
Solar powered weather station Solar powered weather station Solar powered weather station Solar powered weather station Solar powered weather station Solar powered weather station Solar powered weather station Step two : display
The wizard has added an E-Ink display so that you can check the temperature locally at the station itself.
E ink displays are ultra-low power consumption. They only need power to refresh the display. In this case, it is only every 10 minutes. The rest of the time it does not consume power from the battery.
The master used a 1.54 “black and white display with a resolution of 200×200 pixels.
To protect the display, he covered it with transparent acrylic.
Solar powered weather station  Solar powered weather station Solar powered weather station  Solar powered weather station Step Three: Control Board
This project uses a D1 mini pro, an ESP-8266EX based microcontroller with 16MB flash memory and an external antenna connector.
These boards are equipped with a ceramic antenna and an external antenna connector. There are three triangular contact pads next to the ceramic antenna. By default, a resistor is soldered to two of them. You need to unsolder the resistor and turn it 45 degrees to solder it to another contact pad. Those. the resistor must “face” the antenna connector.
Solar powered weather station  Solar powered weather station Step four: power supply The solar panel, battery, and charging module are used to power the device.
The battery voltage is measured with a mains voltage divider. If the battery is below 3.3V, esp goes into sleep mode. The ESP has a built-in 220k ohm resistor, so you need to add a 100k ohm resistor on the “R3” PCB.
Since esp goes into deep sleep between measurements (every 15 minutes), the battery will last more than 50 days without the solar panel connected, and with the battery until the battery fails.
The wizard added a screw clamp to the PCB to connect solar panel.
Step Five: PCB
The PCB contains the following parts:
Screw terminals
TP4056 module
18650 battery holder
Wemos D1 mini
JP2 jumper – to enable/disable deep sleep
Jumper JP1 – not used
E-INK port
S_INT and S_EXT port + resistors (R1 + R2) for additional DHT sensors.
U4 Port for integrated BME280
I2C port for external BME280 and P1 ports; P2; P3; P6 for additional sensors
Switch for on/off esp.
Weather station powered by solar battery Solar powered weather station Solar powered weather station Step six: the body
For the weather station, the master printed the body on a 3D printer. The case parameters are as follows:
– Suitable for solar panel 120x60mm with screw terminals.
– Thick wall between solar panel and PCB absorbs heat.
– Additional plate with PCB guides.
– Side, front and bottom vents .
– Output for external sensor.
– 2-leaf front door with display mount and quick access to electronics.
– printed with PLA filament
Print settings are as follows:
Filament: PLA 1.75
Print speed: 90 mm/s
Extruder temperature: 200 ° C
Bed temperature: 60 ° C
Infill: 15%
Print time: 10 hours for the drawer and 1.5 hours for the front door
Print files can be downloaded below.
case.stl – main body
front.stl – front door 2 pieces
pcb_mount.stl separate plate for PCB fixing.
pcb_pins.stl 3 pins for PCB and sensor mounting
bme sensor_housing.stl – sensor housing
Solar powered weather station  Solar powered weather station Solar powered weather station  Solar powered weather station Solar powered weather station  Solar powered weather station Solar powered weather station Step seven : code
The code can be downloaded from this link.
The basic functions of the code are as follows (simplified version):
Every 15 minutes esp wakes up from a deep sleep
checks the battery – & gt; if higher than 3.3 V – connects to Wi-Fi – & gt; MQTT – initialization of sensors – measurement of temperature, humidity, pressure from an internal sensor – calculates dew point, trend, forecast – measures temperature, humidity from an external sensor – calculates dew point for greater accuracy (external sensor)
Then displays the values ​​on the display.
You can change the settings in the sketch file settings.h There you will find all the settings necessary for the operation.
Wi-Fi name and password
IP-address and password of the MQTT broker
Language (for forecasting) and NTP settings -servers
if you want to change MQTT themes, you can do so in the sketch itself.
The wizard used the following services:
– & gt; Mosquitto mqtt (processes all messages)
– & gt; telegraf (collects data)
– & gt; Influx DB (stores all data)
– & gt; Grafana (visualizes)
How it works.
backend – the station publishes topics (temp1, humi1, …) to the broker (mosquitto)
– telegraf connects (subscribes) to certain broker topics and sends them to database
– the database stores all the values ​​and is the data source for Grafana to create dashboards and data visualizations.
Installing all these services on a computer that works 24/7 takes a long time, can cause errors and lead to high energy costs … Instead of a computer, the wizard installs programs on
Raspberry.
Solar powered weather station Solar powered weather station  Solar powered weather station Everything is ready, all that remains is to fix the device in the right place, next to the greenhouse, and install a sensor in the greenhouse.
The display will show data from two sensors, from the garden and from the greenhouse. The data can also be viewed on the Internet service.
Solar powered weather station  Solar powered weather station  Solar powered weather station

Source:

usamodelkina.ru

Show More

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button