Weather Station Design #1663: ESP32-WROOM-32D, Wi-Fi, 30m — BOM, Wiring Diagram & Firmware | Zhiyun Zhizao
Weather Station prototype #1663 built on ESP32 with ESP32-WROOM-32D, Wi-Fi, 30m. Complete BOM (9 components, approx ¥199), pin-level wiring, 3D assembly, step tutorial and compilable firmware. Free to view — contact us for a custom variant.
Open in Studio → Contact us for details
Bill of Materials (BOM)
| Component group | Model / Spec | Qty | Unit | Subtotal |
|---|---|---|---|---|
| MCU board | ESP32-WROOM-32D Wi-Fi + | ×1 | ¥22 | ¥22.0 |
| Sensor | 0–30m/s | ×1 | ¥48 | ¥48.0 |
| Sensor | 16 | ×1 | ¥42 | ¥42.0 |
| Display | LCD1602 + I²C | ×1 | ¥9 | ¥9.0 |
| Actuator | LED | ×1 | ¥3 | ¥3.0 |
| Structure | 40P / | ×1 | ¥5 | ¥5.0 |
| Structure | M3 | ×1 | ¥6 | ¥6.0 |
| Structure | IP65 + | ×1 | ¥18 | ¥18.0 |
| Power | 6V 3W + CN3065 + 18650 + 5V | ×1 | ¥46 | ¥46.0 |
Pin-level wiring table
| Component | Pin | MCU pin |
|---|---|---|
| MCU board | VCC/GND | 5V / GND |
| MCU board | AO | GPIO34 |
| LCD | SDA / SCL | GPIO21 / GPIO22 |
| LED | OUT | GPIO25 |
3D assembly view
Step-by-step assembly
- 1. Prepare components and tools · 15 min
- 2. Bring up the minimal system · 15 min
- 3. Connect sensors and verify readings · 30 min
- 4. Connect actuators and drivers · 20 min
- 5. Add display and interaction · 25 min
- 6. Power rails and common ground check · 20 min
- 7. Flash the firmware · 20 min
- 8. Calibrate and integrate · 40 min
- 9. Verify thresholds and logic · 25 min
- 10. Burn-in test and finalize · 60 min
Firmware code
Arduino C++ · ESP32 Dev Module
/* zz-weather-1663 · 营地风速风向记录仪(LED太阳能LCD告警版)
校调基线:SAMPLE_S=8s / FILTER_N=12 / DEBOUNCE_N=3 / THRESHOLD_PCT=66
采样与阈值在下方宏定义中修改后重新编译即可,无需改接线 */
/* 营地风速风向记录仪(LED太阳能LCD告警版)
* 智云智造 AI 工程引擎生成 · 引脚宏与接线图一一对应
* 板型:ESP32 Dev Module · Arduino IDE 安装对应库后编译上传
*/
#include <Wire.h>
// ---- 引脚宏(引擎按无冲突原则分配)----
#define PIN_SDA 21
#define PIN_SCL 22
#define PIN_WIND 5
#define PIN_VANE_ADC 34
#define PIN_LED 25
// ---- 器件对象 ----
volatile unsigned long pc_wind = 0;
void setup() {
Serial.begin(115200);
Wire.begin(PIN_SDA, PIN_SCL);
pinMode(PIN_WIND, INPUT_PULLUP); attachInterrupt(digitalPinToInterrupt(PIN_WIND), [](){ pc_wind++; }, FALLING);
pinMode(PIN_VANE_ADC, INPUT);
pinMode(PIN_LED, OUTPUT); digitalWrite(PIN_LED, LOW);
Serial.println("[ZYZZ] system ready");
}
void loop() {
// 1) 采集传感器
noInterrupts(); unsigned long pc_wind_snap = pc_wind; pc_wind = 0; interrupts(); // 风速传感器 脉冲计数
int raw1 = analogRead(PIN_VANE_ADC); // 风向传感器
// I²C 器件 LCD 显示屏 地址见数据手册
// 2) 阈值判断与执行器联动
// digitalWrite(PIN_LED, condition ? HIGH : LOW); // 高亮 LED 模组
Serial.printf("tick %lu\n", millis() / 1000);
delay(2000);
}
Safety & compliance notes
- Double-check voltage and current ratings against datasheets before ordering parts.
- Keep mains voltage, lithium cells and high-current loads away from the prototype until insulation is verified.
- MCU, drivers and sensors must share a common ground; use separate power rails for motors and pumps.
- Do not replace certified safety devices (smoke alarms, gas detectors) with these prototypes.
- Generated results are for learning and prototype validation only.
FAQ
Is this design suitable for beginners?
Difficulty is rated out of 5 with an estimated build time. Follow the wiring table and the step tutorial in order; each step states the expected result before power-on.
Can I swap components or reduce the budget?
Yes — parts with the same bus and voltage are drop-in replacements. Keep separate power rails for high-current loads and update the firmware pin macros to match.
Can it run on battery / outdoors / report to the cloud?
The BOM already encodes the power and connectivity choice shown in the title. For outdoor use add the IP65 enclosure listed; Wi-Fi reporting hooks are reserved in the firmware.
Sensor readings look wrong — what now?
Calibration steps are in the tutorial: compare against a reference, perform two-point calibration for analog probes, and let gas sensors pre-heat before comparing values.
Where is data stored and can I get a custom version?
Local prototypes store data on SD card or serial output; Wi-Fi builds can push to your own server or an IoT platform. Contact us for a customized variant of any design.
智云智造