0x00 Project Preface
In the advanced class, the teacher told us a lot about the Internet of Things at the beginning of the class, and we were going to make a wifi-controlled switch. A lot of cool operations were given in class, such as temperature and humidity, OLED, etc. I was also ambitious at the time, planning to build the most powerful Internet of Things switch in the universe. As a result, the teacher's words touched me, "Renovate the existing equipment at home to connect to the Internet of Things." I thought about it seriously, and now I really want the lights in the room to be intelligent, but the wiring is all on the wall. If you add various high-end things, such as OLED temperature and humidity, who will show it to you?
0x01 Requirements Analysis
According to the preface, I finally decided to upgrade the switches at home based on the original ones. The original wiring remains unchanged and a switch is added.
Then what I thought of was to use relays to control electrical appliances. Since I have a Xiaoai stereo at home, the V1.0 plan planned to link up with Xiaoai classmates to control the old lights at home.
As a result, when I actually studied the original switch at home, I was dumbfounded (220V high voltage warning, students had better turn off the main switch first)
In addition to one light with single control, my home also has one light with dual control (mainly). I think the smart controls are basically one light with dual controls. It is very easy to change one light from single control to dual control. We have learned about it in school, but it would be troublesome to change one light from dual control to three holes (the key is that I forgot)
So I researched online. Finally I saw this line map:
Is there a surge in complexity? Let’s analyze the circuit at home. I don’t want to replace the original dual-control switch (wall switches are hard to buy), so I need my circuit to act as a multi-control switch in the middle. The multi-control switch is not an ordinary relay, so I went to look up the information on the relay.
0x02 Selection and production
According to the demand, I finally found an 8-pin relay with two sets of conversion relays to meet my needs. The module selection was because the switch wall in my house is not large and can be made taller but not wider. So I chose ESP8266-01. , this wifi can be raised up, and components can be placed below, saving board space. And the height is about the same as that of a relay, so it won't be too high.
Regarding the circuit design, I differed from the circuit taught by the classroom teacher. I used an optocoupler for isolation and added an indicator light. Increased system stability.
Then comes PCB design prototyping and soldering!
0x03 Physical display
0x04 Networking configuration
Regarding the configuration, I used Diandeng Technology for networking. You can refer to: https://www.diandeng.tech/doc. The detailed network configuration video will be sent to station B after the competition! (Advertise for Lichuang!) Station B ID: iceprism
0x05 Enlightenment
Although I have seen many people making a lot of very high-tech switches, I am not ignorant of high technology. However, through demand analysis, I found that if I embed it into the wall, no matter how high-tech it is, there is no point. On the contrary, stability and reliability are the truth.
Although this advanced class seems to be an understatement. In fact, there have been many pitfalls. Regarding the transformation of the three controls, the Lichuang open source platform has no template that can be copied. . . Then go find it and do your own research. I also bought several relays and built a small circuit to test and select the ones. At first, I didn’t check the thickness of the wires at home, and the terminal blocks I bought couldn’t be connected. In short, I learned a lot of knowledge, and the pitfalls I stepped on made me rich in experience. Finally, Xiao Ai was really happy when she controlled the light hhhhh
Thank you Lichuang Platform for hosting this event!
If I am lucky enough to win, I will open source the Alibaba Cloud + Xiaoai board mentioned in the title, double the control and double the happiness hh
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