{"id":119,"date":"2026-02-25T21:43:34","date_gmt":"2026-02-25T12:43:34","guid":{"rendered":"https:\/\/wuhanqing.cn\/wordpress\/?p=119"},"modified":"2026-02-25T21:50:25","modified_gmt":"2026-02-25T12:50:25","slug":"esp32-runway-approach-lighting-desktop-ornament","status":"publish","type":"post","link":"https:\/\/wuhanqing.cn\/wordpress\/?p=119&lang=en","title":{"rendered":"ESP32 Runway Approach Lighting Desktop Ornament"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\">ESP32 Runway Approach Lighting Desktop Ornament<\/h1>\n\n\n\n<p>This project presents a desktop intelligent ornament that provides a highly faithful reproduction of a civil aviation runway approach lighting system. It integrates an ESP32 microcontroller with hard-wired sequential logic circuitry (NE556 + CD4017) to deliver realistic visual effects, while simultaneously enabling real-time retrieval and display of METAR and TAF meteorological reports for airports worldwide.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">1. Abstract<\/h1>\n\n\n\n<p>This project aims to design and implement an aviation-themed ornament that combines both decorative and functional characteristics. On the hardware side, a two-layer stacked PCB structure is employed, where an NE556 dual timer and a CD4017 counter jointly realize a hybrid drive for 20 chaser lights (runway sequenced lights) and 48 steady-burning approach lights, with hardware-based adjustment of brightness and flashing frequency. On the software side, the system is developed using MicroPython and leverages the Wi-Fi capability of the ESP32 to support web-based Wi-Fi provisioning and real-time acquisition of aeronautical meteorological data (METAR\/TAF). The project not only reproduces the visual aesthetics of the runway threshold lighting environment, but also serves as a practical meteorological monitoring terminal for aviation enthusiasts.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">2. Functional Features<\/h1>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Simulated Lighting Effects<\/strong>: Includes 20 sequential guidance lamps (emulating sequenced flashing lights) and 48 steady-burning approach lights.<\/li>\n\n\n\n<li><strong>Hardware Interaction<\/strong>:<br>\u00a0 \u00a0 - <strong>Left rotary knob<\/strong>: Master power switch and global brightness control for all lights (PWM dimming).<br>\u00a0 \u00a0 - <strong>Right rotary knob<\/strong>: Adjustment of the running speed (frequency tuning) of the chaser lights.<br>\u00a0 \u00a0 - <strong>Baseboard push button<\/strong>: One-touch entry into Wi-Fi provisioning and ICAO code configuration mode.<\/li>\n\n\n\n<li><strong>Intelligent Information Display<\/strong>: A 0.96-inch OLED screen cyclically displays the raw METAR and TAF reports of the selected airport (5-second interval).<\/li>\n\n\n\n<li><strong>Convenient Network Provisioning<\/strong>: Supports access-point (AP) mode provisioning, with an embedded web configuration page and QR-code-based quick access.<\/li>\n\n\n\n<li><strong>Physical Design<\/strong>: Two-layer PCB structure (100 mm x 80 mm), with the front silkscreen integrating an airport layout diagram and radio frequency table (TWR, GND, APP, etc.).<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">3. Project Images<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">3.1 Physical Device<\/h2>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/github.com\/WuHanqing2005\/Runway_Approach_Light\/raw\/main\/picture\/3-1.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">3.2 Circuit Diagrams<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">3.2.1 Baseboard Schematic<\/h3>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/github.com\/WuHanqing2005\/Runway_Approach_Light\/raw\/main\/picture\/3-2-1.png\" alt=\"\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">3.2.2 Top Board Schematic<\/h3>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/github.com\/WuHanqing2005\/Runway_Approach_Light\/raw\/main\/picture\/3-2-2.png\" alt=\"\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">3.3 2D Previews<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">3.3.1 Baseboard 2D Preview<\/h3>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/github.com\/WuHanqing2005\/Runway_Approach_Light\/raw\/main\/picture\/3-3-1.png\" alt=\"\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">3.3.2 Top Board 2D Preview<\/h3>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/github.com\/WuHanqing2005\/Runway_Approach_Light\/raw\/main\/picture\/3-3-2.png\" alt=\"\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">3.4 Circuit Schematic (Principle Diagram)<\/h2>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/github.com\/WuHanqing2005\/Runway_Approach_Light\/raw\/main\/picture\/3-4.png\" alt=\"\"\/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">4. Usage and Operating Instructions<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">4.1 Initial Startup<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Power supply<\/strong>: Use a Type-C cable to connect to the connector at the upper-left corner of the baseboard (a power adapter of 5 V \/ 1 A or above is recommended).<\/li>\n\n\n\n<li><strong>Power-on<\/strong>: Rotate the <strong>left rotary knob<\/strong> clockwise; the red power indicator LED will illuminate, and the lighting system will enter its initial operating state.<\/li>\n\n\n\n<li><strong>Adjustment<\/strong>:<br>\u00a0 \u00a0 - Rotate the <strong>left rotary knob<\/strong> to adjust the global brightness.<br>\u00a0 \u00a0 - Rotate the <strong>right rotary knob<\/strong> to change the flashing speed and running effect of the runway lights.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">4.2 Network Provisioning and Configuration<\/h2>\n\n\n\n<p>If the screen indicates that the device is not connected, or if you need to change the target airport:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Enter configuration mode<\/strong>: Long-press the tactile push button located at the lower-right corner of the baseboard.<\/li>\n\n\n\n<li><strong>Scan to connect<\/strong>: The screen will display a QR code and the IP address <code>192.168.4.1<\/code>.<\/li>\n\n\n\n<li><strong>Operation<\/strong>: Connect your mobile phone to the Wi-Fi network <code>METAR_Config<\/code>, then scan the QR code or manually enter the IP address in a browser to access the configuration page.<\/li>\n\n\n\n<li><strong>Submit settings<\/strong>: Enter the Wi-Fi SSID, password, and the target airport <strong>four-letter ICAO code<\/strong> (for example, Shenyang Taoxian ZYTX), then click Save. The device will automatically reboot and start fetching meteorological data.<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">5. System Design Principles<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">5.1 Hardware Circuit Design<\/h2>\n\n\n\n<p>The system adopts a division-of-labor paradigm in which hard-wired logic is responsible for lighting effects, while the microcontroller is dedicated to data processing:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Core logic (NE556 + CD4017)<\/strong>:<br>\u00a0 \u00a0 - <strong>NE556 (Unit A)<\/strong>: Outputs a 1 kHz waveform with adjustable duty cycle, used as the <strong>PWM dimming signal<\/strong> applied to the anodes of the LEDs.<br>\u00a0 \u00a0 - <strong>NE556 (Unit B)<\/strong>: Outputs a square wave with adjustable frequency from 3\u2013100 Hz, used as the <strong>clock signal<\/strong> input to the CD4017.<br>\u00a0 \u00a0 - <strong>CD4017<\/strong>: A decade counter whose outputs Q0\u2013Q9 drive 20 chaser lights (paired in parallel) via 10 sets of MOSFETs.<\/li>\n\n\n\n<li><strong>Visual simulation mechanism<\/strong>: The gates (G) of the chaser-light MOSFETs are controlled by the timing sequence of the CD4017, while the anodes are modulated by the PWM dimming signal. Because the PWM frequency (1 kHz) is much higher than the sequence switching frequency, the effects of speed regulation and brightness control are effectively decoupled and superimposed.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">5.2 Software Architecture<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Programming environment<\/strong>: MicroPython (using Thonny).<\/li>\n\n\n\n<li><strong>Data acquisition<\/strong>: The <code>urequests<\/code> module periodically sends requests to an aeronautical meteorology API, retrieves JSON data for the specified ICAO code, and parses out the <code>rawOb<\/code> (METAR) and <code>rawTAF<\/code> (TAF) strings.<\/li>\n\n\n\n<li><strong>Display control<\/strong>: The OLED is driven using the <code>ssd1306<\/code> driver; a character-segmentation algorithm is employed to realize line-wise rendering and automatic scrolling of long textual reports.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">6. Bill of Materials (BOM)<\/h1>\n\n\n\n<p><img decoding=\"async\" src=\"https:\/\/github.com\/WuHanqing2005\/Runway_Approach_Light\/raw\/main\/picture\/BOM.jpg\" alt=\"\"><br>(For details, refer to the <code>BOM_TOTAL_PCB.xlsx<\/code> document in this folder.)<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">7. Notes for Open-Source Replication<\/h1>\n\n\n\n<p>To ensure successful replication of this project, please pay close attention to the following engineering details:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">7.1 Hardware and Soldering Considerations<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>EDA platform<\/strong>: The project is designed using <strong>JLCEDA (Professional Edition)<\/strong>. The source file is <code>ProPrj_Runway_Approach_Light_2026-02-24.epro2<\/code>.<\/li>\n\n\n\n<li><strong>Pin alignment<\/strong>: It is essential to use the <strong>38-pin version<\/strong> of the ESP32 development board (19 pins per side) to avoid mechanical incompatibility.<\/li>\n\n\n\n<li><strong>Soldering process<\/strong>: For the baseboard logic ICs (NE556\/CD4017), solder bridging must be strictly avoided. The <strong>MOSFET driver transistors<\/strong> are extremely sensitive to temperature (maximum tolerance around 170 \u00b0C) and <strong>must be soldered last<\/strong>. It is recommended to use low-temperature solder; each soldering operation on a single pin should not exceed 3 seconds to prevent device breakdown or thermal damage caused by heat accumulation.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">7.2 Toolchain and Resource Organization<\/h2>\n\n\n\n<p>All supporting software and firmware required for this project are stored in the <code>tools<\/code> directory, organized as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>tools\/\n\u251c\u2500\u2500 1-Thonny\u5f00\u53d1\u8f6f\u4ef6\n\u251c\u2500\u2500 2-\u5f00\u53d1\u677fCH340\u9a71\u52a8\n\u251c\u2500\u2500 3-ESP32-FLASH\u56fa\u4ef6\u4e0b\u8f7d\u5de5\u5177\n\u2514\u2500\u2500 4-ESP32-MicroPython\u56fa\u4ef6\n    \u251c\u2500\u2500 esp32-20220618-v1.19.1.bin (\u63a8\u8350)\n    \u251c\u2500\u2500 ESP32_GENERIC-20240602-v1.23.0.bin\n    \u2514\u2500\u2500 ESP32_GENERIC-20250415-v1.25.0.bin<\/code><\/pre>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><strong>Firmware note<\/strong>: Although multiple firmware versions are provided, to ensure optimal compatibility and stability it is <strong>strongly recommended to flash version <code>v1.19.1<\/code><\/strong>.<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">7.3 Core Development Procedure<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Hardware self-test<\/strong>: After completing all soldering, perform a powered-on test first to verify that the logic for both the chaser lights and the steady-burning light groups functions correctly.<\/li>\n\n\n\n<li><strong>Driver installation<\/strong>: Install <code>tools\/2-\u5f00\u53d1\u677fCH340\u9a71\u52a8<\/code> on your computer to ensure that the device can be recognized.<\/li>\n\n\n\n<li><strong>Firmware flashing<\/strong>: Use <code>tools\/3-ESP32-FLASH\u56fa\u4ef6\u4e0b\u8f7d\u5de5\u5177<\/code> to flash the recommended <strong>MicroPython firmware<\/strong> version onto the ESP32.<\/li>\n\n\n\n<li><strong>Environment configuration<\/strong>: Install and open the <strong>Thonny<\/strong> IDE, and select ESP32 as the interpreter. Configuration details can be referenced from relevant instructional videos, such as the \u201cPuzhong ESP32 Tutorial\u201d series on Bilibili.<\/li>\n\n\n\n<li><strong>Code deployment<\/strong>: Connect to the development board via Thonny, upload the project source file <code>METAR.py<\/code>, and execute it.<\/li>\n\n\n\n<li><strong>Final assembly<\/strong>: After confirming that the software runs correctly, insert the ESP32 module into the baseboard pin headers, complete the overall assembly, and perform a final power-on test.<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">8. References and Technical Standards<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">8.1 International Standards and Industry Specifications<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Title<\/strong>: <strong>WMO-No.306_Vol_I.1_Manual_on_Codes.pdf<\/strong><br>\u00a0 \u00a0 - <strong>Publisher<\/strong>: World Meteorological Organization (WMO)<br>\u00a0 \u00a0 - <strong>Relevance<\/strong>: The parsing logic for METAR\/TAF messages in this project strictly follows the field definitions and encoding rules of <strong>FM 15 (METAR)<\/strong> and <strong>FM 51 (TAF)<\/strong> as specified in this manual.<\/li>\n\n\n\n<li><strong>Title<\/strong>: <strong>ICAO_Annex_14_Vol_I_Aerodrome_Design_and_Operations.pdf<\/strong><br>\u00a0 \u00a0 - <strong>Publisher<\/strong>: International Civil Aviation Organization (ICAO)<br>\u00a0 \u00a0 - <strong>Relevance<\/strong>: The arrangement of lights and the timing requirements for the sequenced flashing lights in this project are based on the provisions for approach lighting systems in <strong>Chapter 5.3.4<\/strong> of this standard.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">8.2 Key Component Datasheets<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Title<\/strong>: <strong>C7434190_555\u5b9a\u65f6\u5668-\u8ba1\u65f6\u5668<em>NE556DR-MS<\/em>\u89c4\u683c\u4e66_WJ411490.pdf<\/strong><br>\u00a0 \u00a0 - <strong>Manufacturer<\/strong>: MSKSEMI<br>\u00a0 \u00a0 - <strong>Relevance<\/strong>: Used in the design of the dual 555 timer circuitry, enabling generation of the system PWM dimming waveform and CD4017 clock pulses.<\/li>\n\n\n\n<li><strong>Title<\/strong>: <strong>C7473153_\u8ba1\u6570\u5668-\u5206\u9891\u5668<em>CD4017BM-MS<\/em>\u89c4\u683c\u4e66_WJ411742.pdf<\/strong><br>\u00a0 \u00a0 - <strong>Manufacturer<\/strong>: MSKSEMI<br>\u00a0 \u00a0 - <strong>Relevance<\/strong>: Used to implement the decoding and counting logic, as well as the hardware shift driving, for the 20-channel runway sequenced flashing lights.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">9. Author and Technical Support<\/h1>\n\n\n\n<p>If you encounter technical difficulties during replication, or if you have suggestions for improving this project, you are welcome to contact me via the channels below:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">9.1 Author Information<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Educational background<\/strong>: Undergraduate student in the Department of Electronic Engineering, <strong>Kyung Hee University (South Korea)<\/strong><\/li>\n\n\n\n<li><strong>WeChat<\/strong>: <code>Daniel_Qinghan<\/code><\/li>\n\n\n\n<li><strong>Email<\/strong>: <a href=\"mailto:wuhanqing2005@gmail.com\" target=\"_blank\"  rel=\"nofollow\" >wuhanqing2005@gmail.com<\/a><\/li>\n\n\n\n<li><strong>GitHub repository<\/strong>: <a href=\"https:\/\/github.com\/WuHanqing2005\/Runway_Approach_Light\" target=\"_blank\"  rel=\"nofollow\" >https:\/\/github.com\/WuHanqing2005\/Runway_Approach_Light<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">9.2 Technical Discussion Group<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>QQ group<\/strong>: <code>1087242118<\/code> (please indicate \u201capproach lights\u201d when requesting to join)<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">9.3 Project Demonstration Video<\/h2>\n\n\n\n<p><a href=\"https:\/\/www.bilibili.com\/video\/BV1fFtZz1Eyx\" target=\"_blank\"  rel=\"nofollow\" >https:\/\/www.bilibili.com\/video\/BV1fFtZz1Eyx<\/a><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>ESP32 Runway Approach Lighting Desktop Ornament<\/p>\n<p>This project presents a desktop intelligent ornament","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[30],"tags":[],"class_list":["post-119","post","type-post","status-publish","format-standard","hentry","category-project-en"],"_links":{"self":[{"href":"https:\/\/wuhanqing.cn\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/119","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wuhanqing.cn\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wuhanqing.cn\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wuhanqing.cn\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wuhanqing.cn\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=119"}],"version-history":[{"count":2,"href":"https:\/\/wuhanqing.cn\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/119\/revisions"}],"predecessor-version":[{"id":122,"href":"https:\/\/wuhanqing.cn\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/119\/revisions\/122"}],"wp:attachment":[{"href":"https:\/\/wuhanqing.cn\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=119"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wuhanqing.cn\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=119"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wuhanqing.cn\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=119"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}