Original Requirements
: 1. Initially, I used ordinary relays to control the fan and humidifier. However, ordinary relays have a problem: they make a "click-click-click" sound when engaging, which can easily cause insomnia when using a computer to automatically control temperature and humidity at night.
2. Using existing components also had issues. The 5V power lines for each circuit needed to be disconnected in the middle to connect to the relay, resulting in messy wiring and inconvenience. After testing

Wi-Fi control of the relays
, it felt wasteful, like using a sledgehammer to crack a nut.
First, there's no need for an ESP32; an ESP8266 is sufficient.
Second, there's no need for relays; two MOSFETs are enough.


Lessons Learned:
Try to be consistent between surface-mount and through-hole components. Use surface-mount components where necessary, and through-hole components where necessary. The lesson learned this time was that the inputs were all surface-mount, while the output relays and USB ports were through-hole. This made repairs more difficult if there were problems with the later circuitry, as through-hole components made soldering inconvenient. Therefore, consistency is crucial.
ESP32 soldering is problematic; beginners can easily ruin chips on their first attempt. If you have a heated soldering station, use one. Manual soldering is really prone to damaging chips (I ruined two myself). The first chip was damaged because I repeatedly soldered and disassembled it to familiarize myself with ESP32 soldering. As a result, I added too much rosin, and the ESP32 cover came off. The second chip was damaged because the two corner pins had solder bridging inside. When I tested it by applying a high level to the corresponding pins after powering it on, it burned out. (
Picture of the first damaged chip). So, if you have the means, use a JLCPCB SMT ESP32 . I've recently started practicing drawing traces, so I've encountered many problems. These are some issues I've encountered during the process; please try to avoid them. 1. The capacitors are not placed properly; the power lines should pass through the capacitors before reaching the components. 2. There should be clear space under the antenna, or it should extend beyond the edge of the board. 3. The 5V and 3.3V power lines are too close together. -8/13/Chen 1. There are many unnecessary bends in this power line; they could be straightened. 2. The signal lines don't need to be thickened; currently, thickening them makes them too close together. -8/14/Chen Summary: Although this project is usable and achieved its goals, it was a failure. Replicating it is not recommended; lessons should be learned.