ha4KSG

[Verified] ESP8266 Desktop Weather Station

 
Overview

The program and instructions can be found at the original URL: Project, or you can follow the instructions in this article to make it.
The finished product after welding (it is recommended to glue the USB interface and battery welding points to prevent them from falling off):
 
This is an adapter board for connecting ESP8266 NodeMCU and ILI9341 2.8-inch touch screen. It comes with AMS1117 LDO and optional lithium battery and charge and discharge management, four-grid power indicator, and a physical switch. The 3D model is attached and available in three formats: OBJ, STEP and STL.
 
 
Required materials:
1. Connector
        1*14 female header (for connecting the screen)*1
        1*15 female header (for connecting NodeMCU, the two female headers close to Schottky diode D2 are soldered according to the NodeMCU model, compatible with NodeMCU with serial port chips CP2102, CH9102X and CH340)*2
 
2. Direct plug-in components
        SS12D10G5 switch (PWR)*1
        MicroUSB socket (USB)*1
 
3. SMD components
        0805 package SMD LED (25%, 50%, 75%, 100%)*4
        1206 package SMD 10kΩ resistor (R1, R2)*2
        1206 package SMD 82kΩ resistor (R3)*1
        0630 package SMD 2.2uH inductor (L0630)*1
        0805 package SMD 100nF capacitor (C1, C2, C3, C4)*4
        1210 package SMD 22uF capacitor (C5, C6) * 2
        1210 package SMD 10uF capacitor (C7, C8) * 2
        1206 package SMD 4.7uF capacitor (C9) * 1
        SMA package SMD SS34 Schottky diode (D1, D2) * 2
        SOT-223 package AMS1117 voltage regulator chip (U1, U2) * 2
        ESOP-8 package ETA9740 charge and discharge management chip (ETA9740) * 1
 
4.Battery
        lithium polymer battery (I use model 582535, capacity 420mAh, with protection board, but you can replace it with a slightly larger battery. The space for the battery is up to 40mm long × 25mm wide × 7mm thick) * 1
 
 
The rest of the instructions and program parameters are borrowed from the original text:
1. Install the ESP8266 environment in Arduino;
 
2. Download the code and library (also in the attachment):
Arduino Code: https://github.com/ThingPulse/esp8266-weather-station-color
Libraries: 1. Mini Grafx by Daniel Eichhorn: https://github.com/ThingPulse/minigrafx 2.
ESP8266 WeatherStation by Daniel Eichhorn: https://github.com/ThingPulse/esp8266-weather-station
3. Json Streaming Parser by Daniel Eichhorn: https://github.com/squix78/json-streaming-parser
4. ThingPulse XPT2046 Touch by ThingPulse: https://github.com/ThingPulse/XPT2046_Touchscreen#xpt2046-touchscreen-arduino-library
If you have already installed the original XPT2046_Touchscreen, you need to uninstall it first.
 
3. Get the OpenWeatherMap API Key
Weather data comes from the https://openweathermap.org/price website, so you must get the OpenWeatherMap API key.
1. Select the free column in the first column, which is limited to 60cpm per minute.
2. Click Get API key, then fill in the credentials and create a new account.
3. Write down the API key and use it in the next step.
4. Visit https://api.openweathermap.org/data/2.5/weather?q={City}&appid={API key} (replace "{City}" with your own city name (such as "Beijing"), and replace "{API key}" with the key obtained in the previous step). You should get a result similar to the following (the picture comes from the official website description document https://openweathermap.org/weather-data):
5. Write down the string of numbers after "id" in the second line. This is the OPEN_WEATHER_MAP_LOCATION_ID city code that will be used in the next step.
 
4. Modify program parameters:
1. Open the folder and click "esp8266-weather-station-color.ino".
2. Open settings.h in the tab, browse the file and adjust several configuration parameters. Fill in the WiFi name and key in the first red box, fill in the API key obtained in the previous step in the second red box, fill in the city code in the OPEN_WEATHER_MAP_LOCATION_ID of the third red box, fill in the city name in DISPLAYED_LOCATION_NAME, and ignore the last red box.
3. Connect NodeMCU to the computer, select the correct port number and upload the program.
 
5. Upload the program to ESP8266.
 
 
Assembly:
1. Slowly place the LCD screen module into the casing:
2. If everything goes well, the screen should be embedded in the groove of the upper shell (when turning it over to check, you must support the screen module from behind, otherwise the screen may sink):
3. After confirming that the screen is flush with the casing, squeeze a little hot melt glue on the four corners of the screen module:
4. Install the NodeMCU on the soldered PCB (pay attention to the direction, the USB port faces down, this is a wide version of the NodeMCU with the serial port chip CH340, so solder the outer pins):
5. Gently place the PCB with the installed NodeMCU into the casing (align the pins):
6. Press slightly on the solder joints of the screen header until the pins are embedded in the header (the upper end of the PCB will sink at this time because there is no support):
7. Turn on the switch to check. If the screen lights up, the circuit connection is normal. Gently lift the NodeMCU upwards, make sure that the PCB is parallel to the desktop, and then use hot melt glue to fix the four corners of the PCB:
8. After the hot melt glue cools down, cover the back cover (the old version of the shell has two slots, one for the switch and the other for the location of the WiFi module. Later, it was found that it was more convenient to open the back cover and then toggle the switch, so the two slots were cancelled (the actual shell has little effect on the WiFi signal of the NodeMCU)):
9. The battery indicator light on the side:
10. The finished product (the old version of the shell has a problem with the size, and there is a gap between the upper and lower shells. The compressed package in the attachment is the new version of the shell, and the problem has been fixed):
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-06-19 16:53:00
  • Studio 764, please give me a free ticket
  • Vxworks implements ping command
  • RF Agile Transceivers
  • [Silicon Labs BG22-EK4108A Bluetooth Development Review] Four Programs Plus Button Development Steps
  • A very useful program for finding a job
  • STM32F207

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号