JFET

Smart Dynamic Weather Colorful Desktop Clock

 
Overview

Video demonstration address: https://www.bilibili.com/video/BV1k64y1q7ei?share_source=copy_web

Download the firmware information (including multi-angle pictures of the finished product, 3D printing model files, and everything in it) by yourself

 

/************************************/

9-6 Log
bug fixes:
1) Fixed the problem that the pcf may not be able to correctly synchronize the date and time when starting up
2) Fixed the problem that the location cannot be obtained correctly after configuring the longitude and latitude and then restarting the computer
3) Fixed the problem that configuring the precise location will cause the wifi to need to be reconfigured
4) Fixed The problem of being unable to save new wifi information after connecting to wifi and then configuring to a new wifi
has been added:
a new position oled power display has been added, and the wifi signal strength icon can be switched once in 3s

 

9-3 log
fixes the bug that there may be a failure to obtain the network location in some areas.
The data package adds the Arduino IDE configuration link and JSON library, and adds the stc-isp tool.


8-23 log

Known program bugs and fixes:

1. Forgot to add automatic update date display every day

2. During the data update period, there will be RSSI display refresh, causing screen display problems.

3. After pressing the return key in wifi configuration mode, no data changes occurred, but the last connected wifi information has been cleared by default, resulting in the inability to reconnect after rebooting after canceling the configuration.

 

New:

1. Add an input box for the superior city or province of the current region when configuring the region to prevent the district and county names from having the same name as other cities, causing incorrect weather conditions.

2. Determine whether the program is burned for the first time. If so, it will automatically restore factory parameters.

 

/************************************************/

 

Equipment hardware overview:

1) The ESP12F of the ESP8266 family is used as the main processor to implement functions such as networking and data acquisition, and an STC8G1K08 is used as the sub-processor to drive the lattice.

2) The dot matrix uses LEDs of two colors, totaling 23*2 columns and 8 rows, to achieve multiple color changes and color gradients. The LEDs are half ice blue and half violet, and each pixel has one color (see the actual picture for details), please be sure to pay attention!

3) Integrated ambient light sensor to automatically adjust the brightness of OLED and dot matrix screens.

4) Integrated RTC, it can still operate normally for several years even if the power is cut off.

5) Integrated CH340 serial communication circuit and ESP automatic download circuit, which can facilitate firmware burning.

6) Integrated single-cell 3.7V lithium battery charging management circuit, the device can be powered by USB or battery. Recommended USB + lithium battery two-in-one.

7) The TYPE-C port is sinker plate 1.6, don’t buy the wrong one

Power consumption:

The average power consumption is about 0.3864W without turning on the power saving mode.

After turning on the power saving mode, the average power consumption is about 0.1512W

Average power consumption in night display mode is <=0.0798W

The above data are all measured when the lithium battery is fully charged at 4.2V. As the voltage drops, the power consumption will decrease slightly.

 

 

Device software overview:

1) Dot matrix screen) 256 levels of automatic brightness adjustment. Gradient or fixed colors at both ends of the color (11 types) or randomly switch to one of the above in 1 hour. Data update animation, decimal point-like water column animation.

2) OLED) 256-level brightness automatic adjustment. Full UI animation. Dynamic real-time weather icon display. Three-level menu button interaction (up, down, left, and right).

3) Network and location configuration) WiFi will prompt whether configuration is required after the connection fails at startup. There are also corresponding WiFi configuration options in the third-level menu. The location information is given in three modes: ① Fully automatic network positioning (poor accuracy, generally at the municipal level) ② Positioning by longitude and latitude (this method is the most accurate, but the configuration is more troublesome) ③ Current location pinyin input configuration (if the current location is not will not be queried in the database), there are prompts for the above configuration methods. The method is to automatically jump to the configuration page after the mobile phone connects to the hotspot created by the device.

4) Information update) Weather and weather forecast are updated every 20 minutes, and the time is synchronized once a day.

5) Data storage) All changed or configured data are automatically stored in the memory, and the data will not be lost when the power is turned off.

6) If the remaining battery power is higher than 4V, it will not be displayed on the LED dot matrix screen to improve the look and feel. The rightmost row of LEDs will turn on the power indicator when the power is lower than 4V.

 

Software description:

1) Baidu Map API account, register yourself and add the WEB API product, copy the user AK to IPLocation.h and replace the words "your AK". Do not replace too many words. (If you don’t need the network IP location function, you can skip it)

2) Hefeng Weather API account, register yourself and add the product, copy the KEY to Hweather.h and replace the words "your KEY".

3) Regarding library files, Arduino IDE can just add an ArduinoJson library by itself. The rest of the libraries are written by me and thrown into it.

4) A full-screen warning message will appear at 13:14 and 17:20 every day~

 

 

Instructions

1) Restore factory settings method) After shutting down the machine, press and hold the button and then turn it back on to enter the options page.

2) When on the desktop) Press the right button to enter the menu. Press the left button to switch between the desktop and weather forecast interface (if you do not actively switch back, it will automatically switch back to the main interface after 30 seconds). Press the up button to update the current weather and weather forecast data immediately. Press the button immediately. Switch the dot matrix color mode once (the color randomization of LED color needs to be turned on).

3) When in the menu, the left button is usually for return and the right button is usually for confirmation or switching state.

4) Burning instructions:
Esp12f burning steps
1. Use the esp8266 environment in the Arduino ide environment (self-Baidu)
2. Select the esp12E1.0 module
3. Configure parameters according to the icon in the data package
4. Click download and wait for the compilation to be completed and automatically download Restart and
Stc burning steps
1. Unzip the stc isp compressed package in the data package
2. Open stc isp.exe
3. Follow the diagram to configure parameters and follow the prompts to connect USB to ttl
4. Burning program (required for stc burning Soft restart, the simple way is to unplug the GND Dupont line and plug it in again)

 


Precautions

1) If you do not use USB power supply for a long time and use lithium batteries, be sure to turn on the scheduled shutdown and wifi power saving mode, which will greatly reduce power consumption.

2) Burn the sub-processor firmware first, otherwise the ESP8266 will occupy the STC serial port and prevent the program from being downloaded. If you have already burned a program to the 8266, you can also burn an empty program to the 8266 and then burn the sub-processor. Pay attention to the wiring on the PCB. When programming the sub-processor, reserve a pin header. V is connected to the 3.3V of the USB to serial port, T is connected to RXD, R is connected to TXD, and G is connected to GND. If the power supply is connected incorrectly, it will break down!

3) The button welding should be as close to the inside as possible (but not too far). You should choose according to the accuracy of the shell you printed, otherwise it will not be easy to install.

4) The 368 (like) LEDs I use are ice blue and violet from Uxin Electronics. Be sure to choose LEDs with colors close to the VF (about 3.2V), otherwise there will be a difference in brightness and darkness. When buying lamps at one time, be sure to make sure they are from the same batch to ensure consistency. Buy more lamps to prevent them from having poor consistency or being burned by welding.

5) The board was drawn in one go, so there are some shortcomings that I am too lazy to do the second version, such as ① Checking whether the USB plug-in circuit is not done (cannot automatically switch between power saving mode and performance mode). ②The RTC interrupt pin is not connected to the MCU and cannot be woken up regularly, so the ESP cannot enter sleep mode and the power consumption cannot be further reduced. ③The LED driver uses 595 as a constant voltage, which requires too high LED consistency. If it is replaced by a constant current driver, the effect will be better. Those who have the ability and motivation can make improvements on these points (of course, the IO of 8266 is too small, so you can optimize it by yourself).

6) I have not merged or repaired the printed files of the 3D model. I will repair them myself when printing. Otherwise there will be tears in some places. The thickness of the shell is modeled according to the lithium battery (103565 3000mah), so it is relatively thick. If you only need a small-capacity battery, you can change the thickness of the shell by yourself.

7) About welding) It’s time to test your patience and skills, go! The recommended temperature for soldering LEDs is 200° and low-temperature soldering. No false soldering.

8) When purchasing components, be sure to buy genuine ones. Don’t buy copycats for cheap. There may be many problems. Recommendation without channels (Uxin Electronics). Resistors and capacitors should be purchased and used strictly according to the parameters in the schematic diagram. Don’t be lucky and think that it’s almost enough! (Of course experienced people can use it in some places). Beginners must not use it blindly!

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-06-24 20:40:35

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号