MartinFowler

[Training Camp_Advanced Class] Xiaoai and Alibaba Cloud realize a smart switch with multiple controls for one light

 
Overview

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)
P00809-085907.jpg

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:

image.png

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

-4d6ec9dcdfc664ea.jpg38b26de9dc8b956b.jpg 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

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2024-11-22 12:44:00

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

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号