type | model | Advantage | cost |
---|---|---|---|
Main control+Wifi | ESP8266-12F | It has a high main frequency, strong processing performance, and low cost, making it very suitable for use in node-type smart devices. | ¥8.86 |
AC-DC | HLK-PM01 | It has a powerful output capability of 5V@3W. The output voltage and ripple are very stable and can be used to drive four relays. | ¥19.29 |
LDO | SPX3819M5-L-3-3/TR | Compared with AMS1117, it saves considerable space, and its 500mA output capability is sufficient to handle high-power RF circuits. | ¥0.86 |
drive | NUD3105DMT1G | The ultra-small package inductive driver saves the huge space occupied by dual MOS with the same principle. | ¥1.66 * 2 |
drive | 74LVC2G14GW | Inverter to prevent the relay from being accidentally triggered when the main control is reset. | ¥0.37 * 2 |
sensor | ACS715ELCTR-05B-T | A sensor based on the Hall effect with ultra-high response frequency (unfortunately, the bias voltage of Vout's VCC/2 was misunderstood) | ¥12.21 |
sensor | SHT30 | Temperature and humidity sensor with lower temperature drift and higher accuracy, and extremely fast response speed | ¥11.30 |
relay | SRD-DC5V-SL-C | Songle is a professional relay factory with a history of more than 20 years. Its quality has been certified by authorities from Germany, the United States, China and other countries. | ¥2.11 * 4 |
Currently, the following functions of Google Assistant voice control are supported:
Regarding user operation experience, a user-friendly client and interface cannot be underestimated. The open source HomeAssistant project is used here, which supports IoT devices and even vehicles connected to unknown protocols of some third-party companies.
In order to cope with various complex network environments and the difficulty of MCUs in dealing with network protocols, we chose the MQTT protocol to ensure efficient, fast and stable transmission of signals. As we all know, the MQTT server in the MQTT protocol is very critical. It is responsible for forwarding subscription and publishing information from devices and users, so it is a key transfer center. Here we choose the EMQ MQTT server developed by Chinese people. The operating environment is Debian10, and the service operation failure rate is extremely low.
In order to enable smart devices to cope with more complex actual application environments and more demanding network conditions, I simulated some actual possible faults and made some solutions.
Since it is only the first version of the PCB and has not been iterated yet, there are some initially considered features that have not been implemented.
Use the efficient, permanently free domestic PCB design tool: Lichuang EDA. In the current stage where multi-person collaboration is so important, Lichuang EDA has greatly improved the development speed and progress of small teams. In addition, compared with other large-scale PCB drawing software, it has the advantage of extremely low environmental configuration requirements. It is extremely friendly to novices and can be quickly started. It omits some uncommon parameters and presets some commonly used parameters.
The main control adopts Essence's ESP8266-12F/S module, which has the advantages of high main frequency, stable operation, and extremely low cost. It combines WiFi and MCU into one, which greatly improves the development efficiency of developers. For the host computer environment, you can choose espressif's eclipse-based IDE, or you can use Arduino's ESP8266 compatibility library. Limited by the cost of learning time, the latter is chosen here. At the same time, like OSHWhub, it also has a large open source community, which reduces the difficulty of development.
Through this training camp organized by Lichuang EDA, I got to know Lichuang EDA more comprehensively. Compared with other large-scale PCB design software, it is lightweight, free, and saves time and effort in developing applications. It helps us beginners get started quickly. It may save some unnecessary time. In addition, this is also my first time designing a strong current application, and almost the first time I actually design a practical (commercial) application. At the same time, I would like to thank the training camp for this opportunity, which allowed me to come into contact with more IOT platforms, understand more ICs, and more practical websites.
$ curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
$ docker volume create portainer_data
$ docker run -d -p 9000:9000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer
Note: Portainer is a graphical management interface that facilitates managing Docker through the web ( http://your-server-ip:9000/), not required
$ sudo apt update && sudo apt install -y
apt-transport-https
ca-certificates
curl
gnupg-agent
software-properties-common
$ curl -fsSL https://repos.emqx.io/gpg.pub | sudo apt-key add -
$ sudo add-apt-repository
"deb [arch=amd64] https://repos.emqx.io/emqx-ee-ce/deb/debian/
$(lsb_release -cs)
stable"
$ sudo apt update
$ sudo apt install emqx-ee
$ emqx start
$ sudo systemctl start emqx
$ sudo service emqx start
$ docker run -d --name="home-assistant" -v /PATH_TO_YOUR_CONFIG:/config -v /etc/localtime:/etc/localtime:ro --net=host homeassistant/home-assistant:stable
Note: Change "/PATH_TO_YOUR_CONFIG" in the command to the directory in your physical machine where you want to save data , such as "/root/hassdata"
default_config:
sensor:
- platform: mqtt
name: "次卧温度"
state_topic: "home/secbedroom/temp"
unit_of_measurement: '°C'
- platform: mqtt
name: "次卧湿度"
state_topic: "home/secbedroom/humi"
unit_of_measurement: '%RH'
climate:
- platform: mqtt
name: 次卧空调
fan_modes:
- "auto"
- "quiet"
- "1"
- "2"
- "3"
- "4"
- "5"
- "turbo"
swing_modes:
- "off"
- "on"
mode_command_topic: "home/secbedroom/ac/modectrl"
mode_state_topic: "home/secbedroom/ac/modestat"
temperature_command_topic: "home/secbedroom/ac/tmpctrl"
temperature_state_topic: "home/secbedroom/ac/tmpstat"
fan_mode_command_topic: "home/secbedroom/ac/fanctrl"
fan_mode_state_topic: "home/secbedroom/ac/fanstat"
swing_mode_command_topic: "home/secbedroom/ac/vswingctrl"
swing_mode_state_topic: "home/secbedroom/ac/vswingstat"
current_temperature_topic: "home/secbedroom/appatemp"
min_temp: 16
max_temp: 30
temp_step: 1
retain: false
switch:
- platform: mqtt
name: "插排开关1"
command_topic: "home/secbedroom/socket/relay1ctrl"
state_topic: "home/secbedroom/socket/relay1stat"
- platform: mqtt
name: "插排开关2"
command_topic: "home/secbedroom/socket/relay2ctrl"
state_topic: "home/secbedroom/socket/relay2stat"
- platform: mqtt
name: "插排开关3"
command_topic: "home/secbedroom/socket/relay3ctrl"
state_topic: "home/secbedroom/socket/relay3stat"
- platform: mqtt
name: "插排开关4"
command_topic: "home/secbedroom/socket/relay4ctrl"
state_topic: "home/secbedroom/socket/relay4stat"
automation: !include automations.yaml
group: !include groups.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
All reference designs on this site are sourced from major semiconductor manufacturers or collected online for learning and research. The copyright belongs to the semiconductor manufacturer or the original author. If you believe that the reference design of this site infringes upon your relevant rights and interests, please send us a rights notice. As a neutral platform service provider, we will take measures to delete the relevant content in accordance with relevant laws after receiving the relevant notice from the rights holder. Please send relevant notifications to email: bbs_service@eeworld.com.cn.
It is your responsibility to test the circuit yourself and determine its suitability for you. EEWorld will not be liable for direct, indirect, special, incidental, consequential or punitive damages arising from any cause or anything connected to any reference design used.
Supported by EEWorld Datasheet