y82OJY

A glow tube clock that can be interacted with via a UI

 
Overview
Video Link:
Bilibili Video -- Function Demonstration and Introduction
Project Overview
This project is a Nitrogen Glow Tube clock based on the ESP32S3. Users can configure the ESP32S3 via their mobile phones. After connecting to Wi-Fi, it will automatically calibrate the time and obtain weather information for the target city. Users can interact with the UI through the encoder. The UI can display the time, date, weather, temperature, indoor temperature and humidity, Nitrogen Glow Tube on/off status, Nitrogen Glow Tube display mode, ambient light mode, and custom ambient light color data on the corresponding modules. Users can control the Nitrogen Glow Tube and ambient light through the UI.
Project Function


Power-on: The project uses a Type-C interface for power supply. After plugging in the data cable, press the self-locking button to power on. After powering on, the UI displays "WiFi connecting..." in a black transparent prompt box. The prompt box hides after about 10 seconds of WiFi not being connected.


WiFi Configuration: Ensure the mobile phone is connected to 2.4G WiFi, open the ESPTouch app, enter the WiFi password, and connect. After a successful WiFi connection, a prompt box appears, adding "WiFi connection successful" and "Obtaining NTP server time...". If the acquisition is successful, "Acquisition successful" is displayed; otherwise, "Acquisition failed" is displayed. After a successful WiFi connection, the system automatically retrieves the weather and temperature of the target city (using the Xinzhi Weather service) and displays it in the corresponding module.


UI Interaction: Users interact with the UI using the encoder. Rotating the encoder moves the focus to different modules, and the panel scroll bar also moves, displaying the focused module on the screen. When focused on a module, pressing the encoder moves the focus to a control within that module. When focused on the module again, pressing the encoder exits the focus process, moving to the next module. When focused on a switch, pressing the encoder toggles the switch's state. When focused on a button, pressing the encoder presses the button. When focused on a slider, pressing the slider selects it; rotating the encoder left or right changes the slider's value; pressing the encoder again exits the focus process. Each encoder operation triggers a buzzer.


Glow Tube: The "Glow Tube On" switch in the UI is enabled, displaying the time in hours and minutes by default. The "Hours/Minutes/Seconds" switch in the UI also enables the glow tube to display the time in minutes and seconds. After the glow tubes are lit, every 5 seconds, all the numbers on each tube light up sequentially to prevent cathode poisoning.


Ambient Lighting: When the "Auto" switch is turned on in the UI, the ambient light will automatically change color and brightness in a gradient manner. When the "Auto" switch is off, users can select different numbered RGB lights and change the values ​​of the R, G, and B sliders to customize their color and brightness.


Project Parameters:


The project uses a DS1302 RTC chip and a button battery as backup power, allowing for timing even in the event of a power outage. The author used a DIP packaged chip in this project because it was readily available, and surface-mount packaging was not used to avoid waste. Surface-mount packaging can be modified accordingly if desired.


The project uses a DHT11 temperature and humidity sensor, which has a wide temperature measurement range and can meet general needs. If the device is powered on for an extended period, the temperature and humidity values ​​will be affected by heat; this phenomenon will be more noticeable when the glow tube is turned on.


The project uses a 1.14-inch plug-in LCD screen with an ST7789V driver chip, a resolution of 135*240, and a GUI for user interaction.


This project uses WS2812 5050 RGB LEDs to implement ambient lighting. Users set the desired color via a UI, and the main controller transmits the corresponding data via a single bus to achieve changes in LED color and brightness.


The encoder module used is KY-040 FOR. The


push-button switches are 12mm blue ring-shaped metal push-button switches with self-locking mechanisms.
The software


development environment is ESP-IDF v4.4.5. The project source code is open-source and can be used for secondary development. Notes on
the neon tube clock: This project does not integrate the neon tube boost module onto the board; the boost module must be soldered onto the board manually using wires. It is recommended to insulate the neon tube pins with heat shrink tubing or electrical tape to avoid short circuits and potential hazards. It is also recommended to wrap the neon tube boost module with electrical tape to prevent it from contacting exposed solder points on the motherboard and causing a hazard. [Image of the actual product]







model.zip
Demo video.mp4
Glow tube housing solution.SLDPRT
PDF_Interactive Glow Tube Clock with UI.zip
Altium_Interactive Glow Tube Clock with UI.zip
PADS_Interactive Glow Tube Clock with UI.zip
BOM_Interactive Glow Tube Clock via UI.xlsx
90773
PCIe to 4-bay U.2 backplane (eDP version)
A redesigned PCIe to four-bay U.2 hard drive backplane featuring a six-layer board and I-PEX 20455 connectors.
PCIe to Quad-Bay U.2 (SFF-8639) Backplane (eDP Version)
Version History:

v1.1 2024-09-29: Added chassis and bracket information
v1.0 2024-09-14: Tested and working properly
v0.1 2024-06-29: Initial Design

Introduction
A year ago, I designed a PCIe to quad-bay U.2 backplane using FI-R 51p connectors. During long-term use, I noticed that the backplane occasionally experienced hard drive speed reduction or failure to recognize the hard drives. The FI-R connectors were too thick and wide, which was not conducive to component layout and enclosure design (for example, if placed on the same side as the U.2 interface, it might hit the hard drive enclosure when connecting a hard drive). Furthermore, JLCPCB removed the restriction that free prototyping of six-layer boards required BGA components during the year, so I decided to reset and upgrade this project.
Compared to previous projects, this project has the following major changes:

the connector has been replaced with I-PEX 20455 050E, and the matching cable is I-PEX 20453 50P non-circular/reverse cable, which significantly reduces the size and is commonly used for eDP screen cables;
the impedance design is tailored to JLCPCB's six-layer 3313 stacked structure, with a PCIe data line differential impedance of 85 Ω and a clock line differential impedance of 100 Ω, and more impedance control designs have been added;
most surface-mount components are placed on the top surface (except for the 0 Ω resistor for LED configuration, detailed later), allowing the use of JLCPCB's economical surface-mount components, eliminating the need for manual soldering of U.2 female connectors;
two mounting holes have been added and their positions adjusted, no longer compatible with 2080 aluminum profiles :(, but a matching housing and a bracket adapted to a certain NAS chassis are available :) (still under design);
support for fan "daisy chain" has been removed, retaining only a 4-pin connector connecting 12V and GND. Pin header location. This project

is designed
for JLCPCB's six-layer 3313 stack-up (JLC06161H-3313), with a board thickness of approximately 1.6cm, copper thickness of 1/0.5oz, and PCB dimensions within 10cm x 10cm. The minimum via inner diameter is 0.3mm. The minimum component size is 0402, the shortest pad center distance is 0.5mm, and most surface-mount components are located on the top surface, with 5mm space on the top and bottom sides for no surface-mount components. There are four surface-mount identification marks on the top surface. JLCPCB six-layer immersion gold prototyping vouchers and economical surface-mount components can be used (the "gold finger bevel" process should not be selected, otherwise it will be considered a special process, and only standard surface-mount components can be selected).
The U.2 female connector package is designed based on Foxconn LU25683 and may be compatible with other harpoon pin mounting models. For machine mounting, it is recommended to purchase the model with the suffix 9H (LU25683-A001-9H), which comes in tape and reel packaging with a top cover. Models with the suffix 4H come in tray packaging without a top cover.
Using
this backplane requires a motherboard that supports PCIe splitting; ideally, the x16 slot should be split into 4+4+4+4. If it can only be split into 8+4+4, the system may not be able to recognize one or more hard drives on the U.2 interface.
Cut along the thin slot above CN1-2 and connect CN1-CN3 and CN2-CN4 using an I-PEX 20453 anti-planar/reverse ultra-thin coaxial cable. This cable is available on Taobao; a 300mm length cable costs no more than 25 RMB.
The PCIe daughterboard has a pad for an XT30 PW-M female connector, which allows you to draw 12V from the PCIe slot and connect it to the XT30 UPB-M female connector on the backplane to power the hard drive. However, according to the PCIe specification, the slot can only provide a maximum of 75W of power, while a U.2 drive typically consumes up to 25W under full load. Therefore, it is not recommended to connect multiple high-power hard drives to the backplane when drawing power from the slot. For common ATX power supplies, it is recommended to use a PCIe 6-pin connector to power the backplane. The 3.3V power supply can be provided using the onboard step-down module (U1) or an external power supply (CN10, 2.54 pin pitch).
It is recommended to check for short circuits, signal continuity, and voltage before connecting the hard drive and powering on to avoid situations where the power supply is excessively high. Compared to the previous version, this
design incorporates more impedance optimization measures, such as:
removing a layer of copper beneath the pads for cross-layer reference; ensuring no trace splits near the reference ground plane of all differential lines and no silkscreen covering on data lines; removing unused pads on vias and adding anti-pads; increasing the spacing between differential lines and copper on the same layer, and removing residual ground copper between differential lines; and reducing the amplitude of serpentine lines when adjusting for equal lengths. However, due to the layout changes, some negative factors affecting impedance have been introduced: half of the data lines and all hard drive clock lines pass through two vias (top-bottom/inner layer-top), and the input reference clock passes through three vias; the clock buffer chip is poorly positioned, resulting in long clock traces; ideally, the clock buffer should be placed in the middle of the left side of the board, close to the I-PEX connector (CN 1-4) and the clock pins of U.2, but its peripheral components occupy a large area and are prone to conflict with connectors and mounting holes. Any optimization suggestions from experts are welcome. The 12V main power supply retains both PCIe 6-pin (CN7) and XT30 (CN8-9) connection options. Due to the clock buffer placement and enlarged heat dissipation openings, the 12V copper pour width is slightly reduced compared to the previous version, but it should still be sufficient for the 25W requirement per drive. The surface-mount solid capacitors placed on the board edge in the original design have been removed, replaced by through-hole pads (C13-14, C23-24) next to each U.2 female connector, allowing for capacitors to be added from the back. The 3.3V power supply buck module has been replaced from NAE12S03 to TPS82130 (U1), slightly reducing costs. Similarly, 2.54mm pitch through-hole pads (CN10, CN11) are provided on the board for connecting to 3.3V and GND, allowing for the option of soldering pins instead of mounting the buck module for external power supply. Alternatively , a step-down module can be installed, with 3.3V output taken from the connector pins. However, it is not recommended to install both the step-down module and take 3.3V input from the connector pins, as this may damage the module. In addition to removing the fan "daisy-chain" function mentioned above, the design of directly mounting an 8cm fan on the board has also been removed. This design significantly interfered with the board layout, such as preventing wiring at the openings and limiting the placement of through-hole or even tall surface-mount components within the fan's corresponding area. This version retains only one 4-pin fan connector (CN5), and the speed measurement and control wires are unused; these functions can be manually wired if needed. The fan may be moved to the casing for mounting in the future. Furthermore, compared to the previous version, this version has a larger ventilation slot area. The chassis and bracket : This backplate can be used with an adapter bracket to modify the Aurigas NAS chassis (aluminum version), which originally supported 6 x 3.5" hard drives, to support 8 x 2.5" U.2 hard drives. The bracket model file is attached. The hard drive bay structure of the Sky Arrow chassis is said to be the same as that of the Aurigato chassis, but it has not been tested whether this bracket is compatible with either the Sky Arrow or the Steel Aurigato chassis. The installation result is shown in the picture:





















SSD slots 1-3 can be indicated by the presence/activity indicator lights on the front of the chassis (since there are only three sets of indicator lights on the chassis, the bottom SSD0 is not supported):
The bracket and backplate installation steps are as follows. Due to the small size margin of the bracket, it is recommended not to tighten the screws securing the bracket and backplate all at once. After installing the hard drive and making minor adjustments to its position, tighten them completely. However, the hex studs should be directly secured in place:

Remove the original hard drive cage and backplate, and run the power and indicator light cables to the hard drive bay;
Install M3 threaded, 5mm high hex studs on the bracket and secure them with nuts;
Insert the bracket diagonally into the hard drive bay from the front, then rotate it to vertical position, and use the original hard drive cage and backplate screws to secure the bracket to the hard drive bay;
Connect the coaxial cable to the backplate, insert it into the hard drive bay, and then use M3 threaded, 4mm high hex studs to secure it. Secure the backplate to the bracket studs using round-headed screws (screw head diameter should not exceed 6mm). Ensure the coaxial cable passes precisely through the gap between the two studs and between the backplate and bracket.
Connect the power and indicator light cables.
Thread the coaxial cable through the motherboard bay, connect it to the PCIe daughterboard, and install it into the motherboard slot. Note the connection order: the lower coaxial cable on the backplate should connect to the daughterboard closest to the PCIe bracket. A 300mm long coaxial cable is sufficient to install the daughterboard corresponding to the backplate near the CPU into the third slot of the motherboard, or the daughterboard corresponding to the backplate near the PCIe slot into the first slot.
Install the hard drive. Use the aforementioned M3 threaded, 5mm high hexagonal studs, or M3 screws and nuts or washers with a diameter not exceeding 6mm, in the hard drive mounting screw holes. Then slide the hard drive into the bracket slot and connect it to the backplate.
Use tape or other tools to seal any gaps to control airflow and ensure effective heat dissipation. To accommodate the hard drive presence/activity indicator

lights
on the aluminum version of the Gouriza chassis, this version includes a 7-pin connector pad (CN6) on the right side for connecting the ACT and IFDET pins of SSDs 1-3. To avoid conflicts, 0Ω resistors (R21, 23, 25, 27) are placed on the back of the chassis between the onboard activity indicator lights (LED1-4) and their corresponding ACT pins. If you don't need to use them on this chassis and still want to see the onboard activity indicator lights, you can connect these resistor pads together with a lump of solder.
The test
used four M.2 hard drives connected to the U.2 interface and tested on an E5 v4 machine. The motherboard was configured with x4/x4/x4/x4 slots. All four hard drives were recognized and successfully negotiated to PCIe 3.0 x4, reaching the drive's rated read/write speed.
(Image
v1.0 version:
Known issues
v1.1)

The signal fan-out routing of the 20455 connector on the backplane can be adjusted to create more space for heat dissipation slots;
the clock routing of the SSD section can be optimized, reducing its length and minimizing its impact on auxiliary signal routing;
the position of the 8639 connector needs minor adjustment to reduce interference between the hard drive and the side brackets;
the solder mask on the 12V and GND sections should be opened to enhance current carrying capacity;
the solder mask on the back of the clock buffer and buck module should also be opened to enhance heat dissipation;
the 12V connector on the PCIe daughterboard should be replaced with an XT30PW-F. The fixed feet occupy less space and allow for more flexible layout;
there is an error in the silkscreen markings near the indicator light cables on the back panel; the following designs and documents were referenced

during
the design of this project, and I would like to express my gratitude to the authors:

PEX8796_PCIE_GEN3_24PORT_Switch - OldMonster;
Inspur 2.5-inch rear hard drive cage modified to NVMe back panel - OldMonster, the design files are in their group;
PCIe_Bifurcation - OldMonster;
AN 672: Transceiver Link Design Guidelines for High-Gbps Data Rate Transmission - Intel
PCIe to four-bay U.2 back panel using FI-R 51p connector - kybd
Chassis for the U.2 tower with backplate and hard drive bracket. STEP
PDF_PCIe to 4-bay U.2 backplane (eDP version).zip
Altium_PCIe to Quad-Bay U.2 Backplane (eDP Version).zip
PADS_PCIe to 4-bay U.2 backplane (eDP version).zip
BOM_PCIe to 4-bay U.2 backplane (eDP version).xlsx
90775
RGB intelligent air pressure laptop cooler
Background: The heat dissipation and noise control performance of thin and light gaming laptops is generally mediocre. Therefore, I decided to create a fan-driven laptop cooler to improve this issue and also enhance the desktop aesthetics.
Features: Fan-driven cooling, RGB lighting effects, button and knob control, remote software control, and voice assistant intelligent control.
This RGB intelligent fan-driven laptop cooler, based on the ESP Wroom 32e, consists of a main control PCB (communication module, main control module, power supply module), button PCB (button switches, knobs), RGB light strip, turbine fan, and a 3D printed shell.
Background: The heat dissipation and noise control performance of thin and light gaming laptops is generally average, so I decided to make a fan-driven laptop cooler to improve this problem and at the same time beautify my desktop. Functions: Air pressure cooling, RGB equivalent, button and knob control, software remote control, voice assistant intelligent control.
 
Demonstration: https://www.bilibili.com/video/BV1nitfehE3X/?vd_source=d1f3fc84c98ce29f0b067a18ea300d05
 
Major Components List:
1. Two 12cm turbine fans (
purchased from Pinduoduo; the seller no longer sells them, but they're basically the same; theoretically, turbine fans with screw hole specifications as follows (diameter less than 12cm) can be used).
2. WS2812 LED strip (purchased from Pinduoduo; LED density doesn't need to be too high, 60-80 LEDs/meter is fine; buy one meter)
. 3. Soft sponge single-sided tape, 2cm wide, 1cm thick.
4. 502 glue, hot melt glue, light-shielding tape.
5. DC power supply (12V). 2A or 3A (1A not recommended), DC power female connector
 
model:
I used Tuozhu X1C for
3D printing. Printing consumables: ESU's economical white PLA. All models in this project will use approximately 700g.
When slicing the model, the two largest printable parts (left and right main body) were adjusted to 6 layers for the walls, and the RGB light strip walls were adjusted to 4 layers with an infill density of 8%. Adjusting the number of layers is mainly to suppress light leakage. My RGB light strips use a honeycomb infill method; different infill methods will result in different light strip effects (different patterns). It
is recommended to use light-shielding tape to fix the RGB light strips. Also, apply an appropriate width of tape above the light strips (to suppress light leakage).
See the attached SW file for the
 
code:
For simplicity, ESP32 and Arduino software are used. The IDE
communication module code (XT.ino) involves adding the network access configuration from DianDeng Technology. For specific methods, please refer to the DianDeng Technology tutorial (i.e., obtaining the key, filling in the key, WiFi, WiFi password).
The value of "NUMPIXELS" in the main control module code (ZK.ino) should be adjusted according to the actual RGB LED strip used.
The code file is attached.
 
PCB:
See the schematic and PCB at the end of the project.
A picture of the soldered result is also attached.
 
Assembly tips:
Before assembly, please complete other tasks, such as ensuring
high voltage is required in the area where the fan is located during code burning. The gaps in this enclosure are... This was my first time making buttons using 502 glue
. The inside was just a jumbled mess. The blue strip is an RGB LED strip (facing down, on both sides, with wires soldered in the middle) (you can keep the printed support and use it as filler on the LED strip). The folded filler is paper and heat shrink tubing, and the clump is hot melt glue. I was too lazy to buy a new 5-pin XH2.54 cable, so I just used DuPont wire and heat shrink tubing. Some people suggest using XH2.54 wire.
The clump is hot melt glue. Refer to the PCB file for the connector order.
Note: the positive and negative terminals of the XT connector are reversed here. Please pay attention when wiring. Refer to the following diagram (red line is positive).
Extend the XT cable to the right rear of the casing and connect it to the DC female connector. The DC female connector can be directly inserted into the model.
Finally, put on the cover and apply soft sponge and single-sided tape (the effect depends on your dexterity). That's it! (If the laptop is not wide enough to allow air to pass through, you can do the following: add a little sponge on both sides and stick it slightly inside the casing.)
Laptop Cooler Model.zip
TX.ino
ZK.ino
PDF_RGB Intelligent Air Pressure Laptop Cooler.zip
Altium_RGB Intelligent Airflow Laptop Cooler.zip
PADS_RGB Intelligent Air Pressure Laptop Cooler.zip
BOM_RGB Intelligent Air Pressure Laptop Cooler.xlsx
90776
Three-channel square wave generator circuit
This is a three-channel square wave generator based on STM32 that can generate an adjustable frequency from 1Hz to 8MHz.
The preface
was a template provided by JLCPCB, which I filled in directly. Therefore, please don't blame me for any repetitive descriptions or logical errors in the following text. (Disclaimer)
Video Link:
I'm too lazy to upload it to Bilibili, so just check the attachment below.
Project Introduction:
This is a three-channel square wave generator based on STM32 that can generate an adjustable frequency from 1Hz to 8MHz.
(Actually, it's a problem from the 2024 Yanshan University Electronic Engineering Competition Autumn Round. I just finished it and uploaded it; the hardware and code are terrible.)
Project Function:
This design is a PWM generator based on an STM32 microcontroller; it has three separate PWM outputs: a screen and a button panel.
Function: Based on the frequency required by the button output, the output will be automatically activated, and the corresponding PWM will be output automatically.
Project Parameters:
The overall hardware design of the project is not difficult, but the choice of the main control chip was very difficult. High-frequency chips are expensive; cheap chips have low frequencies.
Ultimately, an extremely cheap chip was chosen. If you want to achieve a smaller error in the high-frequency range, you'll have to pay extra!

This design uses the STM32G030F6P6 main control chip, which is small, inexpensive, and has all pins arranged appropriately for the needs. The design uses a 0.96-inch OLED display
with three rows corresponding to three outputs.
Software calculations are used to obtain the optimal solution for the timer divider and counter while keeping the system clock constant. The project consists of two circuit boards and a purchased 0.96-inch OLED. You can find the 0.96-inch OLED on Taobao (click the blue text to jump). The main control board consists of three parts: the core, peripherals, and power supply. The core part essentially involves the minimum system and pin layout of the STM32G030F6P6. Regarding the pin layout, the peripheral pins are as follows: | Function | Number of Pins | Corresponding Peripheral | Role | | --- | --- |---|---| | Chip Programming Interface | 2 | SWDIO | Programming | | Chip Reset Pin | 1 | NRST | Program Reset | | RF Coaxial Connector | 3 | PWM | Three-channel PWM Output | | 0.96-inch OLED | 2 | I2C | Screen Display | | LED | 3 | GPIO | Indicates whether this port outputs PWM | | Keyboard | 4 | 74HC165 Communication | Keyboard Output | | Serial Port | 2 | USART | Host Computer Communication | Adding two power supply pins, there are exactly 19 pins. The STM32G030F6P6 has a total of 20 pins. Therefore, only one pin is left for an external high-speed crystal oscillator, meaning that the STM32's BYPASS function must be used. Therefore, an active crystal oscillator must be used! Then, a simple test on the STM32CubeMX can help find a suitable pin configuration method. The following is the corresponding circuit diagram. The crystal oscillator section uses a ferrite bead + capacitor filtering scheme to reduce the impact of power supply ripple on crystal oscillator accuracy. Subsequent testing revealed that the actual crystal oscillator frequency accuracy is four decimal places. There are only three programming ports, and the 3V3 power supply pin has been removed. Since it is clear that USB power will be used during programming, there is no power issue. Four M3 screw holes are added for copper pillars to support the overall development board. Two 1*2P female headers are added as structural components connecting the button board and control board. The peripherals involved have already been listed in the main control section above, so they will not be repeated here. The schematic diagram is as follows: The RF head is directly connected to the microcontroller pins without any protection measures. (Because it is directly connected to the oscilloscope during the assessment, it should not be damaged, and this also reduces signal attenuation or delay issues caused by decoupling.) The OLED uses a 1*4P female header, and the power supply port uses a 0402 0Ω resistor as the selection resistor. The pin order of the old and new versions of the 0.96-inch OLED is different; users need to select and solder this according to the purchased module. (Simply solder shorting is sufficient; buying 0Ω resistors is not very meaningful.) The button board has a total of 10 pins: 2 power supply pins, 4 button pins, 3 indicator light pins, and 1 chip reset pin. (This pin is optional, but inconvenient for resetting.) The serial port uses the classic CH340N chip, which is also the most common USB-to-TTL chip. To prevent accidents, a protective TVS diode is added to the differential signal of the USB circuit. The power supply uses two Type-C interfaces as power inputs. After passing through a diode circuit to prevent reverse current flow, the main switch controls the on/off state. A resettable fuse and a power filter capacitor are connected after the main switch to obtain the protected main input power. Since all peripherals use 3V3 as their power supply, the main input power is stepped down to 3V3 through two LDOs. One supply line powers the modules on the main control board, and the other supplies the button array on the button board. The schematic diagram is as follows: USB2 is a 16-pin Type-C connector, which can communicate with the host computer while providing power; USB1 is a 6-pin Type-C connector to prevent power supply to the board if USB2 cannot be soldered. Both USB connectors have 5.1K pull-down resistors on their CC pins for easy identification and configuration by different hosts. Two Schottky diodes, D1 and D3, form a circuit to prevent reverse current flow. When both USB ports are plugged in, the hardware automatically selects the one with the higher voltage as the main power input. (Schottky diodes have lower voltage drop and faster switching speed than ordinary diodes.) F1 is a resettable fuse, which will not malfunction under normal use; it's there to prevent accidental shorting of subsequent circuits during manual soldering. The LDO uses an RT9013-33GB chip, which is small and outputs approximately 500mA, just right for the relatively low current requirements of peripherals. The schematic diagram of the button board is shown below: First, there are 25-pin headers for signal input and 12-pin headers for fixing the structure; this corresponds to the core board. The keyboard module uses cascaded 74HC165 chips; for details, please refer to the video on Huaqiu Mall. The keys use a 10kΩ pull-up resistor and a 10nF capacitor in parallel for hardware debouncing. The LED and chip reset circuits are the basic structure and require no further explanation. (To reset the chip, simply short-circuit the RESET and GND input signals.) The software code is straightforward; everyone has their own coding style, and there's nothing to criticize. This project's code is rewritten based on the HAL library code configured in STM32CubeMX. All written files are located in the Core folder (it's recommended to view them directly in KEIL for a more intuitive understanding).





















































































The modifications I made are as follows (from bottom to top):
| Filename | Function |
| --- | --- |
| oledfont.c | 0.96-inch OLED screen character driver |
| oled.c | 0.96-inch OLED screen display driver |
| 74HC165.c | Keyboard scanning driver |
| pwm.c | PWM output driver |
| oled_opa.c | OLED menu format definition |
| button_opa.c | Button operation function definition | |
menu.c | Menu state machine establishment |
| main.c | Main function |
Notes:
Don't force solder the 16P USB if it won't solder ()
Assembly process
: You still don't know how to assemble it after soldering? ?
Look at the actual picture and you'll understand ()
[Mocking face is stuck in Bengbu]
Actual picture
Figure 1: Front view of core board
Figure 2: Front view of button board
Figure 3: Back view of button board
Figure 4: Assembly diagram
3-Channel-PWM.zip
VID_20240925_005833_compressed.mp4
PDF_Three-channel square wave generator circuit.zip
Altium Three-Channel Square Wave Generator Circuit.zip
PADS Three-Channel Square Wave Generator Circuit.zip
BOM_Three-channel square wave generator circuit.xlsx
90777
The final ESP32 toy: a sensor and space monitoring data aggregation station – a space environment manager.
This small toy integrates a temperature and humidity sensor, an air quality sensor, and a decibel sound volume sensor. It also supports obtaining geomagnetic and solar activity data from publicly available websites via WiFi. When connected to a charger as an external device, it can monitor the charger's operating status (charging voltage, current, and operating power).
Video Link:
Bilibili Video -- Function Demonstration
Project Introduction
It's been over a year since I started DIYing, and I've been using ESP series chips for MCUs. From not knowing what a serial port was at the beginning to handling the entire software and hardware of this project, it's been incredibly rewarding! So, to test my learning, I tried designing and building this little sensor toy.
Initially, I wanted this little thing to provide as much information as possible about the surrounding environment, including time, climate, ambient temperature and humidity, harmful gas concentration, noise intensity, light intensity, PM2.5 concentration, and even ionizing radiation intensity, which I had previously researched when building a Geiger counter.
Finally, considering the safety and size of the circuit, I decided to temporarily abandon the light intensity (I don't like it anymore), PM2.5 concentration (the module is a bit large), and ionizing radiation intensity monitoring functions (the boost circuit is a little dangerous & the Geiger tubes I researched are too large, and smaller ones are too expensive). I only retained the temperature and humidity sensor (SHT30), CO2, TVOC, and alcohol concentration sensors (SGP30), and the decibel sensor (LM2904). Doing only this felt a bit tedious, so we also incorporated inspiration from HAM fans—space environment monitoring data. The National Space Monitoring Center of the Chinese Academy of Sciences releases various interesting space data from its Space Environment Forecasting Center, some of which can affect radio wave transmission and are therefore familiar to some HAMs.
Website: http://www.sepc.ac.cn/
Since many of our main products are charging-related (power banks, chargers), we also designed a charging status monitoring page to display the charging voltage and current of each charging port on the charger. The Modbus protocol is used to enable data communication between the charger's MCU and the administrator's MCU.
Project Function
Screen Display:
A total of 4 pages, rotating periodically.

The ambient temperature page displays the date, weather, ambient temperature, humidity, and noise level in decibels (minimum value is 40dB due to sensor limitations).
The air quality page displays the date, time, TVOC, and CO2 concentration data
. The spatial environment page displays geomagnetic and solar activity data.
The charger status monitoring page displays the charger's charging status and the voltage and current output of each charging port. The charger currently uses a self-developed 1-to-3 charger (not open source). If you want to achieve similar charging interface data monitoring, you need to ensure that your charger is programmable.
There are two display color schemes: "Daytime Mode" and "Nighttime Mode," automatically switching between them at 7 AM and 7 PM respectively.

To use:
after tossing the switch in the upper right corner to the left, long-press the top right button 1 to open the administrator account. Other interactive functions are not yet designed.
How is this different from previous open-source projects?
To allow more learning enthusiasts to understand how the functions are implemented and to facilitate their own adjustments and creations, the complete source code will be open-sourced this time (this is all done by Lulu; please be gentle with any errors, bugs, or awkward writing style).
As for the software used, how to write code on macOS, how to write functions, what environment can run the source code, how to compile, etc., please don't ask me. You can seek publicly available tutorials and materials; I've already taught these in my previous videos.
The project

uses an ESP32 chip + 64M bit flash + 64M bit PSRAM chip design, without using off-the-shelf modules.
It uses both battery power and external power supply, switched via a toggle switch. If it doesn't suit your preferences, remember to modify it.
The purchased SHT30, SGP30, and LM2904 modules can be easily plugged into the back of the board. If you encounter circuit design problems, this can also improve the utilization rate of the sensor modules. It features
a 1.54-inch LCD screen, ST7789,
and has reserved space for a Class D amplifier MAX98357 and a microphone MSM261S4030H0R, as well as a speaker jack. If you need sound-related functions, please write your own code to control and modify them.
Regarding the charger's charging status monitoring, the charger we use is not open source. The software code already contains the complete code logic for charger monitoring. Please refer to your charger's hardware specifications and redevelop the program accordingly to achieve similar monitoring functionality.
The casing file is attached. If you are familiar with SolidWorks, you can edit the part files.

The
software code
is shared via Baidu Cloud: SensorSpaceController.rar
Link: https://pan.baidu.com/s/1HNA90nkJLDsiK2qUvP5Rzw?pwd=xr44
Extraction code: xr44
Notes :

Components are based on the BOM;
the casing structure design is not ideal, making the screen prone to failure. It is recommended to move the screen's interface slightly towards the center of the board and change the screen interface from soldering to plug-in connection to improve screen reusability.
In addition to the components mentioned in the EDA project file, you may need to purchase the following parts:
an IPEX 4th generation Wi-Fi antenna (length optional) to ensure Wi-Fi connectivity;
and four M24 and M212 black metal screws. (4) M24 dual-through studs (4), M2*20+6 single-through studs (4);
1.54-inch LCD, driven by ST7789;
SHT30 temperature and humidity sensor module, SGP30 air quality monitoring module, LM2904 decibel monitoring module
panel. Panels can be directly customized from JLC using the panel in the project file to protect the screen;



Assembly process
Bilibili video -- Functional demonstration
and physical photos.
Parts_3D.rar
PDF_ESP32 Final Toy: Sensor & Space Monitoring Data Collection Station - Space Environment Administrator.zip
Altium_ESP32 Final Toy: Sensor & Space Monitoring Data Collection Station - Space Environment Administrator.zip
PADS_ESP32 Final Toy: Sensor & Space Monitoring Data Collection Station - Space Environment Administrator.zip
BOM_ESP32 Final Toy: Sensor & Space Monitoring Data Collection Station -- Space Environment Administrator.xlsx
90778
electronic
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2026-03-24 13:21:01

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号