yet another weather station (y.a.w.s.)

by:LCD Mall     2020-08-17
This project is my opinion on this popular weather station.
Mine is based on ESP8266,.
OLED display and BME280 environment sensor array.
The weather station seems to be a very popular project.
Mine distinguishes itself from other sensors by using a BME280 sensor array instead of a popular DHT22 temperature and humidity sensor.
The BME280 has temperature, humidity and air pressure sensors.
It also uses the I2C interface. The .
The OLED display screen used is also I2C.
It can be purchased as I2C or SPI or both.
I used the I2C version to simplify wiring.
OLED display and BME280 using I2C and 3.
3V it is very easy to make a \"y\" cable to connect two devices to the esp8266.
When developing this project, I encountered multiple weather station projects using ESP8266, same OLED display and bme802 on the Internet.
So this is not an original idea, but an original realization.
The BME280 provides data on the internal environment.
Get external weather information from OpenWeatherMap. org.
You need to register with OpenWeatherMap.
Get the key for weather data.
I used the free service they provided.
For instructions on how to get the key, see the steps on how to get the OpenWeatherMap key.
NTP time server is used to get the time of day-of-the-week.
Weather, time, and environmental data are displayed on the OLED display.
Each message has its own formatting screen.
The screen will display for five seconds before switching to another screen. OpenWeatherMap.
Visit org every 15 minutes to refresh the weather information.
BME280 reads about every fifty minutes. five seconds.
Automatically adjust the font used on each screen to display all the information in the largest possible font.
The ESP8266 is also set as a web server.
All weather information is accessible via a browser on your phone, tablet.
One of the screens shown shows the IP address of the web server.
ESP8266 has a wide range of shapes and sizes.
I chose a GEEKCREIT DoIt ESP12E development kit v2.
This is fully compatible with the NodeMCU \"standard\" of the ESP8266 independent module.
It has an integrated 3.
3V regulator, methanol 40-as USB-to-
Serial Bridge and NodeMCU automaticreset circuit.
You are free to use any ESP8266-
You have 12 modules.
Please note that you may have to add 3.
3V regulator or other circuit to program.
I also built one with smart cloud esp8266.
It allows me to pack everything into a 1. 5 inch cube.
Disconnect the USB bridge board after programming.
I added a right angle head pin on 3.
There are 3v holes on the witty board.
The harness consists of two four pin shells, one two pin shells and two pin shells.
In the above photo, the plate inserted by the ESP8266 module is a board I developed for ESP8266 and esp32.
It will accept the narrow body ESP8266 board compatible with NodeMCU, the witty cloud ESP8266 board or ESP32 board of GEEKCREIT.
For ease of access, all available GPIO pins are broken down to the head.
I found that most boards do not have enough power and ground pins.
Every time you want to connect something, you need at least one ground pin and most of the time a pin is needed to power the device.
Each line of the GPIO pin is accompanied by 3.
3v supply pin and ground pin.
The layout I use is the same as the one used by the first robot, with power in the middle.
I love this layout because if you insert something back, you don\'t release the magic smoke.
The board has a few extra things, an infrared sensor, a button switch and a threecolor LED.
Jumpers can be used to connect to any of these features.
If you are interested in one of the ESPxx breakout boards, please contact me.
1-BME280 I2C Temperature, humidity and pressure sensor boardI purchased my product on Ebay for about $1 from China.
Free shipping 25.
Adafruit or Sparkfun1 is also available-.
96 \", 128x64, using SSD1306 driverI\'s I2C OLED display, purchased My from China for around $4 on Ebay. 00. Mine is white.
You can find the blue and white color of the yellow area on it.
Some are sold in the form of SPI and I2C.
You may need to move some resistors in order to select the I2C operation.
It is important that it uses the sd6306 driver chip.
Adafruit is also available.
1-NodeMCU ESP8266-
12 with methanol 40, you can use any ESP8266-
12 modules you want.
I prefer the one with methanol 40 USB-to-Serial bridge.
There was a bunch of fake FTDI and SI bridge chips a few years ago, so I no longer trust anything but methanol 40.
2-DuPont 4 needles, 0. 1inch (2. 54mm)
Asphalt shell 2-DuPont 2 pin, 0. 1inch (2. 54mm)
22-DuPont female crimps
I bought mine on Ebay.
You can also use Molex or any brand you like.
You can choose the curl pin or IDC.
Be careful you bought the right pin for your shell.
They are not mashups.
You can also weld the wires to the board and eliminate the connectors.
You need a curl pin if you use a curl pin.
Don\'t try to curl with pliers.
It does not work.
1-5 V, 1A minimum wall power supply group.
These are cheap on Ebay.
Get one with any teammate using a micro USB connector or ESP8266 board.
You need eight more.
Connect everything together.
Or you can attach everything to a perf board.
It depends on you.
I have included a photo of building a weather station with a witty cloud esp8266.
A picture details where the right-angle head pin can be added to pick 3. 3V.
One of the two pin shells is replaced by two pin shells. Ground and 3.
A 3v wire is stuffed in a pin shell.
Follow this link to get the source code file from GitHub repository; ESP8266-Weather-Station.
The Zip folder or clone folder will have the WeatherStation folder containing the WeatherStation. ino and BME280. h.
These are source code files.
There are also several PDF files.
The information of the PDF file is basically the same as this structure.
Tried a lot of brand curlers and found Japanese engineer PA-21 or PA-
09 Best for DuPont male and female crimps.
On Ebay or Amazon.
Both methods are suitable for DuPont pins. The PA-
09 will also make pins for JST connectors commonly used on LiPo batteries.
Here is a link to the video of how to use the engineer crimpers of DuPont crimps; How to use PA-
21 tutorial tool SN recently used by weeerli crimpersinconstructors-
28B curlers with DuPont pins and housing.
You can watch it here.
Make a good DuPont sale
Curl every time!
Wiring harness is the key to this project.
It is a basic four wire cable.
Above is the picture of the harness I made.
The OLED display and the BME280 sensor array have the same pin output.
This means that the two four pin shells are the same after inserting the curled wire.
I made my harness with double curly wires in two pin shells attached to the ESP8266 board.
Instead, you can choose to fill the double-curled wire into one of the four pin shells to make it a daisy chain connection.
Either work.
I have found that when I use 28 ad hoc workgroup wires with a pinch pin, they tend to fall off.
To prevent this, what I did was to peel the end of the wire twice the normal length.
Twist the exposed wires together.
Then fold the twisted wire to double the thickness.
Now when I curl it, the wire is thick enough to hold it tightly.
Check your connection carefully.
If everything looks good then you can power on the ESP8266 board.
You need an API key to access OpenWeatherMap.
A website for getting current weather information.
The next few steps detail how to register using OpenWeatherMap.
Get the API key.
Please click on the link to OpenWeatherMap. org.
Click on the API near the top of the web page.
On the left, under current weather data, click the Subscribe button.
Click get API key and start in the free column.
Click the registration button under how to get the API key (APPID).
Fill in all the fields.
Upon completion, check the \"I agree to the terms of service and privacy policy\" checkbox.
Then click the Create Account button.
Check your email for messages from openweatermap. org.
The email will have your API key.
In order to get the current weather, you need to copy the API key to the source code of the weather station.
This OpenWeatherMap.
There are some restrictions on Org\'s free service.
Most importantly, you can\'t visit every ten minutes.
This should not be a problem because the weather will not change very quickly.
Other restrictions are related to the information available.
More detailed weather information will be provided for any paid subscription.
Program development is done using Arduino IDE Version 1. 8. 0.
You can download the latest Arduino IDE here; Arduino IDE.
The Arduino website has great guidance on how to install and use the IDE.
You can follow the instructions given in this link to install support for ESP8266 in the Arduino IDE: ESP8266 Addon to Arduino.
On the web page, click the clone or download button and select download Zip \". The ReadMe.
Md file has instructions on how to add ESP8266 support to the Arduino IDE.
This is a plain text file that you can open with any text editor.
The ESP8266 board has a variety of sizes, shapes and uses different USB-to-
Serial bridge chip.
I prefer the board using the methanol 40 bridge chip.
A few years ago, FTDI, SI and others were tired of cheap clones claiming to be part of them.
Chip makers have changed their driver code to use only their own real parts.
This caused a lot of frustration because people found USB-to-
The serial bridge no longer works.
Now, one day, I only stick to the USB based on methanol 40-to-
Avoid buying serial bridges for boards that may or may not work.
In any case, you need to find and install the correct driver for the bridge chip used on the motherboard.
This is a link to the official website of the methanol 40 driver; CH341SER_EXE.
The ESP8266 does not have dedicated I2C hardware.
All I2C drivers for ESP8266 are bit-basedbanging.
One of the better ESP8266 I2C libraries is the brzo _ I2C Library.
It was written in assembly language for ESP8266 to make it as fast as possible.
The OLED display library I use uses the brzo _ i2c Library.
I added the code to access the BME280 sensor array using the brzo_i2c Library.
You can get the OLED library here: ESP8288-OLED-Library.
You can get the brzo_I2C library here: Brzo_I2C Library.
Both libraries need to be installed in the Arduino IDE.
Arduino website has instructions on how to install zip Library in IDE: how to install Zip Library.
Tip: after installing the ESP8266 motherboard package and library, turn off the Arduino IDE and re-open it.
This will ensure that ESP8266 boards and libraries are displayed in the IDE.
Open the Arduino IDE.
If you have not installed the ESP8266 plug-in, brzo _ i2c library, and OLED driver Library, install it now.
Click Tools on the menu bar at the top \".
Scroll down the drop-down menu to the location of Board.
Slide to the board manager drop-down menu and scroll down; \"NodeMCU 1. 0 (ESP-12E Module)\".
Click on it to select it.
Leave all other settings as default.
Click Tools on the menu bar at the top \".
Scroll down the drop-down menu to the location where the \"port\" is displayed.
Select the port that suits your computer.
If your port doesn\'t show up, either your motherboard isn\'t plugged in, or you don\'t have the driver to load the bridge chip, or the motherboard isn\'t plugged in when you open the Arduino IDE.
The easy fix is to turn off the Arduino IDE, plug in the motherboard, load any missing drivers and reinstall
Open the Arduino IDE.
You can use the download button above, or you can get the source code according to the link of GitHub; ESP8266-Weather-Station.
Document weather forecast. ino and BME280.
H needs to be in the same folder.
The folder name must match the name. ino file (without the . ino extension).
This is the requirement of Arduino.
Click \"file\" on the menu bar at the top \".
Click open \".
In the file open dialog box, find the weather station folder and select it.
You should see two labels, one for the weather station and one for the bme80. h.
If these two tabs are not available, the wrong folder is opened, or the two files are not downloaded, or they are not saved in the correct folder. Try again.
You need to edit the weather forecast station.
The Ino file adds the SSID and password for the WiFi network.
Look at the 62 lines below;
Replace \"your SSID\" with the SSID of the WiFi network \".
Replace \"password\" with the key of the WiFi network \".
You will also need to add your OpenWeatherMap key and the zip code of the place where you live.
Look at the following contents of line 66;
Replace \"your key\" with the key obtained from OpenWeatherMap \". org.
Replace \"your zip code, country\" with your zip code and country \".
The comma and your country should be behind your zip code (\"10001, us\").
Next, you must set the time zone and enable/disable daylight (DST).
Look at the 85 lines below;
There is a set of definition statements that define the time offset for various time zones.
If your time zone is there, replace \"tz_east\" in the \"time zone\" definition \".
If your time zone is not listed, a time zone needs to be created.
The NTP server gives the time at Greenwich Mean Time.
You have to increase or decrease the number of hours (in seconds)
Arrive at local time.
Just copy one of the \"define TZ_XXX\" statements and change the name and number of seconds.
Then change \"tz_east\" to the new time zone.
You also have to decide whether to use Daylight or not.
To disable DST, replace \"1\" with \"0\" in the following line \";
When enabled, DST will automatically advance or delay the time by one hour when appropriate.
Click on the circular right arrow icon below \"edit\" in the menu bar at the top.
This will compile the code and upload it to your motherboard.
If everything is compiled correctly and uploaded, the OLED display should light up after a few seconds and a connection message will appear.
The picture above is a web page provided by the weather station.
You can access it using a PC, mobile phone or tablet.
Just open the browser and enter the IP address of the weather station as the URL.
The IP address of the weather station is displayed on a screen of the weather station.
Click refresh page to update information. That is it.
You should have a working weather station now.
Your next step may be to design and make a case to accommodate your weather station.
Or you want to add a few more screens to show the cold, dew point, sunrise or sunset time, or a chart of the change in air pressure, or predict the weather with air pressure.
Enjoy yourself.
Custom message
Chat Online 编辑模式下无法使用
Chat Online inputting...