├── EDA └── Project_6in1.zip ├── README.md └── img ├── D1.png ├── D2.png ├── D3.png ├── D4.png ├── D5.png ├── D6.png ├── D7.png └── PCB.jpg /EDA/Project_6in1.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liwei19920307/S6in1/908624d4711821556f14c4d8e09aed2052d6eb69/EDA/Project_6in1.zip -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # S6in1 2 | 3 | ## 不再维护 4 | 5 | ## 简介 6 | 7 | ![PCB_1](./img/PCB.jpg) 8 | 9 | 讨论群: `810581215` 10 | 11 | 全新的六合一传感器(红外发射、红外接收、人体传感器、亮度传感器、RGB 指示灯、蓝牙) 12 | 13 | 升级点: 14 | 15 | 1. 在上一次[S5in1](https://github.com/liwei19920307/S5in1)的基础上用`ESP32C3`(增加了蓝牙功能)替换`ESP8266`,增加了对低功耗设备数据采集的能力 16 | 17 | 2. 替换原来单色`LED`为 W`S2812B(RGB)` 18 | 19 | 3. 重新设计人体传感器部分,更加简单可靠 20 | 21 | 4. 全部曲线,双面覆铜减少干扰 22 | 23 | 问题: 24 | 25 | 这个项目硬件部分其实半年前就好了,一直没放出来是由于`epshome` 并未完全支持`ESP32C3`,还有一点`bug`。红外发射和红外接收不发同时使用,只能二选一,具体修复时间还要`esphome`等。但等到现在了`esphome`对`C3`的支持还是不是很好,所以就先开放出来希望早点解决。目前所有传感器都测试过,没有问题 26 | 27 | 以下仅提供核心内容,具体步骤参考[S5in1](https://github.com/liwei19920307/S5in1) 28 | 29 | ## `材料清单` 30 | 31 | | 名称 | 型号 | 数量 | PCB 标注 | 链接 | 32 | | ------------------------------------------- | ----------- | ---: | :--------: | :-------------------------------------------------------: | 33 | | WS2812B 幻彩 LED 灯带 5V 全彩灯条 5050 灯珠 | 30 1 米 | 1 | U2 | [购买](https://item.taobao.com/item.htm?id=523924102690) | 34 | | 单排针 间距 2.54MM | 1 \* 40P | 1 | H1 | [购买](https://item.taobao.com/item.htm?id=553875848479) | 35 | | VS/HX1838/PC638 红外接收头 | | 1 | U3 | [购买](https://item.taobao.com/item.htm?id=522552967131) | 36 | | 3MM 940nm 红外发射管 | | 2 | I1 / I2 | [购买](https://item.taobao.com/item.htm?id=522572541770) | 37 | | 光敏电阻 5516 | 5516 | 1 | R1 | [购买](https://item.taobao.com/item.htm?id=522556415238) | 38 | | PIR AL312 热释电红外传感器 | AL312 | 1 | AL312 | [购买](https://item.taobao.com/item.htm?id=604332532927) | 39 | | AMS1117-3.3 稳压电源芯片降压 IC | AMS1117-3.3 | 1 | U1 | [购买](https://item.taobao.com/item.htm?id=522579028878) | 40 | | ESP-C3-13U 模块 | | 1 | ESP-C3-13U | [购买](https://item.taobao.com/item.htm?id=652413887471) | 41 | | 3\*4 龟仔/微动/轻触开关 | | 1 | FLASH | [购买](https://item.taobao.com/item.htm?id=546724645617) | 42 | | 贴片 S8050 J3Y 贴片三极管 500MA SOT-23 | | 1 | Q1 | [购买](https://item.taobao.com/item.htm?id=522577964105) | 43 | | 0603 贴片电阻 1MΩ 1 兆欧 1/10W 精度 ±1% | | 1 | R2 | [购买](https://item.taobao.com/item.htm?id=525898476191) | 44 | | 0603 贴片电阻 10KΩ 10 千欧 1/10W 精度 ±1% | | 1 | R3 | [购买](https://item.taobao.com/item.htm?id=525777943950) | 45 | | 正品 0603 贴片电容 50V 100NF ±10% | | 1 | C1 | [购买](https://item.taobao.com/item.htm?id=537743724825) | 46 | | 40P 彩排杜邦线 | 母对母 21CM | 1 | - | [购买](https://item.taobao.com/item.htm?id=558182761958) | 47 | | 220V 转 5V700mA 电源模块 | 5V700mA | 1 | - | [购买](https://detail.tmall.com/item.htm?id=543443029399) | 48 | | 86 型人体感应开关面板 | | 1 | - | [购买](https://detail.tmall.com/item.htm?id=622077644993) | 49 | | 2.4G 内置柔性 FPC 软天线 | IPEX 接头 | 1 | - | [购买](https://item.taobao.com/item.htm?id=574057911861) | 50 | 51 | ## `ESPHome` 52 | 53 | ```yaml 54 | esphome: 55 | name: s6in1 56 | platformio_options: 57 | platform: https://github.com/tasmota/platform-espressif32.git 58 | platform_packages: 59 | - framework-arduinoespressif32@https://github.com/espressif/arduino-esp32.git#2.0.2 60 | board_build.flash_mode: dio 61 | 62 | esp32: 63 | board: esp32-c3-devkitm-1 64 | framework: 65 | type: arduino 66 | 67 | logger: 68 | 69 | api: 70 | password: !secret api_password 71 | 72 | ota: 73 | password: !secret ota_password 74 | 75 | wifi: 76 | ssid: !secret wifi_ssid 77 | password: !secret wifi_password 78 | fast_connect: on 79 | 80 | web_server: 81 | port: 80 82 | 83 | # 重启 84 | switch: 85 | - platform: restart 86 | name: "s6in1_reboot" 87 | 88 | # 蓝牙 89 | esp32_ble_tracker: 90 | 91 | # WS2812 92 | light: 93 | - platform: neopixelbus 94 | variant: WS2812X 95 | type: GRB 96 | pin: 0 97 | num_leds: 1 98 | name: "s6in1_light" 99 | method: ESP32_RMT_1 100 | 101 | # 红外发射(生效请注释掉红外接收,esphome bug) 102 | remote_transmitter: 103 | pin: 2 104 | carrier_duty_percent: 50% 105 | 106 | # 例子发射raw码遥控电视 107 | # 由于esphome的不支持,目前还不支持通过api调用红外,等待esphome修复bug 108 | # 发射的raw码可以用遥控器对着传感器按下,在web日志里可以看到Received Raw: 开头的日志,不同遥控器行数不同,将没用的日志信息删除合并后就是raw的code,可以学习任何红外遥控器 109 | button: 110 | - platform: template 111 | name: "master_s6in1_tv_on_off" 112 | on_press: 113 | - remote_transmitter.transmit_raw: 114 | carrier_frequency: 38kHz 115 | code: [9045, -4500, 585, -520, 578, -527, 580, -525, 578, -527, 586, -518, 579, -525, 580, -525, 585, -519, 569, -1641, 583, -1626, 585, -1624, 580, -1628, 586, -1677, 579, -1630, 580, -526, 583, -1625, 586, -1623, 586, -519, 586, -1622, 582, -1628, 587, -518, 580, -524, 585, -520, 586, -519, 584, -520, 585, -1650, 584, -521, 588, -517, 580, -1630, 584, -1624, 585, -1624, 586, -1623, 585] 116 | 117 | # 红外接收(生效请注释掉红外发射,esphome bug) 118 | remote_receiver: 119 | # 没用的占位,必须要,esphome有bug 120 | - id: s6in1_rr_null 121 | pin: 122 | number: 5 123 | inverted: yes 124 | dump: raw 125 | # 实际红外接收 126 | - id: s6in1_rr 127 | pin: 128 | number: 1 129 | inverted: yes 130 | dump: raw 131 | 132 | sensor: 133 | # 运行时间 134 | - platform: uptime 135 | name: "s6in1_uptime" 136 | # WiFi强度 137 | - platform: wifi_signal 138 | name: "s6in1_signal" 139 | update_interval: 60s 140 | # 亮度 141 | - platform: adc 142 | pin: 3 143 | name: "s6in1_brightness" 144 | attenuation: 11db 145 | update_interval: 5s 146 | unit_of_measurement: "%" 147 | icon: "mdi:brightness-6" 148 | accuracy_decimals: 0 149 | filters: 150 | - lambda: |- 151 | return ( 3 - x ) / 0.03; 152 | 153 | # 热释电动作传感器 154 | binary_sensor: 155 | - platform: gpio 156 | pin: 4 157 | name: "s6in1_pir" 158 | device_class: motion 159 | ``` 160 | 161 | ## `细节` 162 | 163 | ![D1](./img/D1.png) 164 | ![D2](./img/D2.png) 165 | ![D3](./img/D3.png) 166 | ![D4](./img/D4.png) 167 | ![D5](./img/D5.png) 168 | ![D6](./img/D6.png) 169 | ![D7](./img/D7.png) 170 | -------------------------------------------------------------------------------- /img/D1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liwei19920307/S6in1/908624d4711821556f14c4d8e09aed2052d6eb69/img/D1.png -------------------------------------------------------------------------------- /img/D2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liwei19920307/S6in1/908624d4711821556f14c4d8e09aed2052d6eb69/img/D2.png -------------------------------------------------------------------------------- /img/D3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liwei19920307/S6in1/908624d4711821556f14c4d8e09aed2052d6eb69/img/D3.png -------------------------------------------------------------------------------- /img/D4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liwei19920307/S6in1/908624d4711821556f14c4d8e09aed2052d6eb69/img/D4.png -------------------------------------------------------------------------------- /img/D5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liwei19920307/S6in1/908624d4711821556f14c4d8e09aed2052d6eb69/img/D5.png -------------------------------------------------------------------------------- /img/D6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liwei19920307/S6in1/908624d4711821556f14c4d8e09aed2052d6eb69/img/D6.png -------------------------------------------------------------------------------- /img/D7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liwei19920307/S6in1/908624d4711821556f14c4d8e09aed2052d6eb69/img/D7.png -------------------------------------------------------------------------------- /img/PCB.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liwei19920307/S6in1/908624d4711821556f14c4d8e09aed2052d6eb69/img/PCB.jpg --------------------------------------------------------------------------------