l7UyKG

Multifunctional Collection Center (/doge

 
Overview

Project description:
This is the first answer sheet of the project owner using EasyEDA as a rookie. Although there are many defects... but with the help of EasyEDA, these are all minor problems~ 
Application scenarios: smart home, environmental monitoring.
Function introduction: It can be directly connected to 220V, can detect ambient air quality, can detect ambient temperature and humidity, ambient light, and comes with a 4-digit LED digital tube display and a 0.96-inch OLED display.
Open source agreement: GPL-3.0
Design and selection:
This work has the advantages of practicality, personalization, and integration. The production process is simple and easy to understand, suitable for personal DIY.
CCS811 was originally used for air quality detection. After testing, it was found that there would be data abnormalities, and it was later replaced with SGP30. (Maybe it's a wiring or program problem?)
The BH1750 sensor is used for ambient light detection. The
temperature and humidity detection uses HTU21D + DS18B20.
The digital tube driver uses TM1637.
The Oled uses SSD1306
. In order to realize the remote switching of lights on and off on the mobile phone (computer, air conditioner, etc.), a relay with optocoupler isolation is added for driving.
Design process:
Hardware: Directly refer to the datasheet provided by the manufacturer. Remember to use DRC after drawing.
Software: Use ESPHOME in HomeAssistant as the platform and build it directly.
Physical display:
Running effect:
Program:
Note: In order to connect to the HomeAssistant platform, ESPHOME is directly used for programming. Of course, you can also use Espressif's official ESP-IDF for development, which will not be repeated here (/It is very stable during use and there are no outrageous bugs... So I'm lazy and won't write ESP-IDF.
esphome: name: esp32s_timer platform: ESP32 board: esp-wrover-kitwifi: ssid: !secret wifi_ssid ##Encrypt using the secret option of HASS password: !secret wifi_password manual_ip: ##Specify the IP address of the device static_ip: 192.168.50.170 ##Change to the address you want to set gateway: 192.168.50.1 ##Device gateway subnet: 255.255.255.0 ##Subnet mask# Enable logginglogger:# Enable Home Assistant APIapi: password: "333"ota: password: "333"web_server: ##This is web control. Add these 2 lines to open the device ip and have a control page port: 80 i2c: - id: bus_a sda: 21 scl: 22 scan: false font: - file: "comicbd.ttf" id: my_font size: 11dallas: - pin: GPIO27 sensor: - platform: bh1750 i2c_id: bus_a name: "BH1750 Illuminance" id: bh1 address: 0x23 measurement_time: 69 update_interval: 10s - platform: htu21d i2c_id: bus_a temperature: name: "htu21d Temper ature" id: temperature humidity: name: "htu21d Humidity" id: humidity update_interval: 10s - platform: sgp30 i2c_id: bus_a eco2: name: "SGP30 eCO2" id: sgp30_1 accuracy_decimals: 1 tvoc: name: "SGP30 TVOC" id: sgp30_2 accuracy_decimals: 1 address: 0x58 update_interval: 10s - platform: dallas address: 0xDE0220764FA6FF28 name: "DS18B20 Temperature" id: ds18b20 - platform: wifi_signal name: "X_Bedroom WiFi Signal Sensor" update_interval: 10sswitch: - platform: gpio ## The device type is GPIO name: "X_Bedroom_Light" ## The name can be customized pin: GPIO16 ## Use GPIO-0 id: relay ## Customizable inverted: yes ## Invert output, that is, low level trigger - platform: gpio ## The device type is GPIO name: "Timer_C" ## The name can be customized pin: GPIO17 ## Use GPIO-0 id: relay_2 ## Customizable inverted: yes ## Invert output, that is, low level trigger time: - platform: homeassistant id: homeassistant_timedisplay: - platform: tm1637 clk_pin: GPIO25 dio_pin: GPIO26 update_interval: 500ms intensity: 3 lambda: |- static int i = 0; i++; if ((i % 2) == 0) it.strftime("%H.%M", id(homeassistant_time).now()); else it.strftime("%H%M ", id(homeassistant_time).now()); - platform: ssd1306_i2c i2c_id: bus_a model: "SSD1306 128x64" address: 0x3C brightness: 0.3 lambda: |- it.strftime(0, 0, id(my_font), "%Y-%m-%d %H:%M %w", id(homeassistant_ time).now()); it.printf(0, 12, id(my_font), "eCO2: %.1f ppm", id(sgp30_1).state); it.printf(0, 24, id(my_font), "TVOC: %.1f ppb", id(sgp30_2).state); it.printf(0, 36, id(my_font), "T: %.1f° " H: %.1f%%", id(humidity).state);
 
Problem summary:
The digital tube only displays one time and minute separator? The same is true when programming with Arduino. I don't know why? I hope someone can help me solve
 
this problem. 2023/04/02: After looking at the schematic diagram, I found that the ports of these two points are not the same. The order of lighting is inconsistent. This may be the reason.
 
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-05-30 03:09:02

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号