Video showing the effect of Station B: [Ink screen] 30 yuan homemade desktop ornaments ~ four modes to switch at will! always one option fit for you! _bilibili_bilibili
Hardware
1. Ink screen module
It uses a 2.9-inch ink screen from Xianyu. The price of a single piece is around 15. The driver board was designed with reference to other ink screen open source projects.
In order to ensure proper plugging and unplugging effect, it is recommended that the PCB thickness is 1.2mm.
* Regarding the model of the ink screen, I bought two different models, one is Wei Feng and the other is HINK. The two are not compatible. Since the project uses the GxEPD2 library to drive the ink screen in terms of software, the solution is to use the GxEPD2 library. Just select the appropriate model. As follows:
GxEPD2_BW<GxEPD2_290, GxEPD2_290::HEIGHT> display(GxEPD2_290(/*CS=5*/ 7, /*DC=*/ 4, /*RST=*/ 5, /*BUSY=*/ 6)); // The second batch of screens
GxEPD2_BW<GxEPD2_290_T5, GxEPD2_290_T5::HEIGHT> display(GxEPD2_290_T5(/*CS=5*/ 7, /*DC=*/4, /*RST=*/5, /*BUSY=*/6) ); //First batch of screens
2. Base module
The base module mainly serves to connect the development board and the ink screen module ( the reason why I made this design is because it feels interesting and I want to try it hahaha). Weld the PCB socket to realize the insertion and removal of the ink screen module, weld the header to realize the connection with the ESP32C3 development board, and weld the buttons for display control.
*The keyword for PCB socket on Taobao is "NDK/TAT Noguchi bus socket PCB gold finger socket"
3.ESP32C3 development board
Use Hezhou's ESP32C3 development board. You can buy either the classic or simple version of the development board. I personally like the classic version, because when using the simple version, you need to pay attention to more technical details and it is easier to encounter pitfalls. Just solder the pin header upwards, because the pin header and female connector are connected, so it is very convenient to unplug it for other projects after this project is finished.
software
1. Programming software Arduino
The Arduino programming software is relatively simple, and there are quite a few libraries available.
You can refer to the online information to configure the environment. The network disk information is also provided here to help you configure it quickly. For how to use it, please see my new video.
Network disk address: Link: https://pan.baidu.com/s/1ELNBuo_a1YlaOqj3Q381AQ?pwd=lfxy
2. Development board added
Theoretically, you can refer to this article: ESP32 Getting Started Notes | 02 - ESP32-Arduino Development Environment Setup_MCUlover666's Technology Blog_51CTO Blog
But this is only theoretical. Various problems are often encountered in the process, mainly due to the failure of successful downloading caused by the network.
3.Libraries used
The libraries used in this project are:
①ArduinoJson library parses Json data. The weather, ancient poems, famous quotes and other information in the project are obtained through some APIs and stored in the returned json data.
②GxEPD2 library drives ink screen
③Timezone library is needed to obtain the clock through NTP
④U8g2 library image display library
For libraries, you can search and download them in Project->Load Library->Manage Library.
4. Project source code
See attachment DesInk4.2.0.zip
5. Font and picture modification
To modify the font, please refer to the article: How does oled u8g2 display Chinese (valid in actual measurement)_KhalilDai's blog-CSDN blog_u8g2 Chinese
The monochrome bitmap bmp picture is converted into a matrix using PCtoLCD2002 software. The modulo configuration is as follows:
Firmware burning method
If you just want to burn the program without modifying it, you can refer to the following method
1. Download the burning tool esptool
① Official download
Address: https://www.espressif.com.cn/zh-hans/support/download/other-tools
Note: If you download the official version, you will need to modify it later.
② Attachment download
Just download and unzip it and use it, and there is no need to modify it again later.
2. Modify the configuration of the burning tool
The official version needs to modify one configuration to be successful. Download the modified version and use it directly. You can skip the following steps.
① After executing the exe file for the first time, a configure folder will be generated in the directory . Open spi_download.conf in the following path with Notepad.
② Change flash_size = keep to flash_size = 4MB and save the file.
3. Firmware burning
① Run the exe file and select the following options. For the classic model, select UART download, and for the simple model, select USB download.
② Select the bin file downloaded from the attachment , the burning address is 0x0 , and the rest of the configuration is as follows.
③ First click the ERASER button to clear, and then click START to burn. The simple model needs to enter the download mode when burning: press and hold the boot button and then power on.
④ Once the program is burned successfully, it can be run.
manual
1. Installation of each part
① When installing the development board and base, ensure that the Type-C port is on the side of the KEEP key (with a white horizontal line)
② When the ink screen module is connected to the base, it can be used in both directions. Try to insert it in the center position.
2. First time use
① Distribution network
1) It is recommended to use web configuration for the first time. After selecting, press the KEEP button, and the red light will stay on. Use your mobile phone or computer to connect to WiFi "DesInk Distribution Network".
2) After the connection is successful, you will automatically enter the network configuration interface, select the required network and fill in the password.
②Weather key
1) Enter the Xinzhi Weather website and register an account Xinzhi Weather - High-precision meteorological data - Weather data API interface - Industry meteorological solutions (seniverse.com)
2) Enter the console to add and select the free version product
3) Select your private key, copy it, and fill it in the web configuration interface.
3. Daily use
①Mode switching and updating
Press the MODE button to switch modes and press KEEP to update. For modes that require the Internet to obtain information, such as weather and ancient poetry interfaces, the switching speed is directly related to the quality of the network signal. If the network is poor, you need to wait a moment.
It is not recommended to refresh frequently in the ancient poetry mode, as it may easily cause the website to be limited, and you need to wait for about an hour before it can be used normally. Since there are many rare characters in ancient poetry, there will also be certain missing characters.
②Configuration mode
Long press the MODE button until the red light goes out and then release it to enter the configuration mode. Pressing KEEP in the configuration mode will clear the configuration of the connected WiFi and restart to enter the network configuration interface. (Equivalent to restoring factory settings)
For the BOM table, it is more accurate to view the attachments.
All reference designs on this site are sourced from major semiconductor manufacturers or collected online for learning and research. The copyright belongs to the semiconductor manufacturer or the original author. If you believe that the reference design of this site infringes upon your relevant rights and interests, please send us a rights notice. As a neutral platform service provider, we will take measures to delete the relevant content in accordance with relevant laws after receiving the relevant notice from the rights holder. Please send relevant notifications to email: bbs_service@eeworld.com.cn.
It is your responsibility to test the circuit yourself and determine its suitability for you. EEWorld will not be liable for direct, indirect, special, incidental, consequential or punitive damages arising from any cause or anything connected to any reference design used.
Supported by EEWorld Datasheet