通通

[Mijia | ESP8266] Curtain Motor

 
Overview

It can connect to WiFi, use the DianDeng platform (official website: DianDeng Technology) to access Mijia, and can use Xiao Ai to control the curtain switch.
In addition to using Xiao Ai to control, it can also be controlled by the low-power wireless switch I made (project link: [Low Power | Rechargeable] ESP8266 Wireless Switch-Jialichuang EDA Open Source Hardware Platform)
1. Hardware part:
Rendering ↑
The diameter of the curtain rod in my room is 27.5mm. I share the shell source file. If necessary, you can modify it as needed.
Use 12V power supply, theoretically require at least 12V3A power supply, the interface is DC 5.5 * 2.5mm.
The bottom design of the curtain motor ↑
uses a 42 stepper motor with a shaft length of about 23.5mm. The drive is a cheap A4988, which can also be replaced by a more expensive silent drive.
The synchronous belt model is 2GT-6mm, the synchronous wheel is 20 teeth with an inner diameter of 5mm and a width of 6mm. The idler wheel size model is the same, but you should choose one with a bearing.
The limit switch is fixed on the shell, the limit switch extension rod is put on the limit switch to "clamp" the synchronous belt,
the common ends of the two limit switches are connected together and connected to the GND on the mainboard through wires, and then the normally open ends of the two switches are connected to SW1 and SW2 on the mainboard through wires.
The window area on the mainboard needs to be tinned.
There are limit blocks fixed on the synchronous belt in the print file, but I did not use them in the actual installation. I used the copper buckle connected to the synchronous belt as a limit block. Any kind of limit block is fine.
 
Installation requires: 12 M3 flat head screws (at least 8mm long, not too long or too short) 2
                  M3*20mm double-pass copper columns 8
                  M3 nuts (thickness about 2.4mm) 4
                  M3*3*4.2 inlaid nuts 2.
Software part (Arduino):
Connect the mainboard to the computer through a data cable.
Lines 45, 46, and 47 in the curtain motor code need to be modified.
The secret key is obtained by adding an independent device in the lighting app, and the WiFi name and password are filled in and compiled and uploaded. Name the device in the Lighting app and bind the Lighting account in the Mijia app.
After uploading, open the serial monitor, wait for ESP8266 to successfully connect to the server, and then output the address of the microcontroller in the serial port. This address needs to be written into the wireless switch code for esp-now wireless transmission. After the motherboard starts
, it starts to try to connect to WiFi. At this time, the indicator light flashes quickly. After connecting to WiFi, it starts to connect to the mqtt server. At this time, the indicator light flashes slowly. After successfully connecting to the server, the indicator light turns off. For details, see the attached video.
At this time, you can connect the 12v power supply to start testing whether the device is running normally.
If the motor does not turn and shakes severely during the test, please do not panic and try to check whether the motor line sequence is correct.
 
Please make sure that the positive and negative poles of the 12V power supply are connected correctly!
Reverse connection will burn the motherboard components! Please make sure that the positive and negative poles of the 12V power supply are connected correctly! Reverse connection will burn the motherboard components!
Please make sure that the positive and negative poles of the 12V power supply are connected correctly! Reverse connection will burn the motherboard components!
 
After the program is uploaded, you can use Xiao Ai to control the curtains.
If you happen to have one or more Xiaoai speakers, you can create a manual scene and put the operation of opening and closing curtains on the Mijia homepage or in the notification bar.
However, because the standard version of DianDeng Technology cannot define the device as a curtain motor type, I defined the device as a socket type.
At this time, if you want to use Xiaoai to control the device, you need to read the full name of the device, which is very inconvenient.
 
(For example, if I name the device as curtains and ask Xiaoai to open the curtains, she will answer that you don’t have a curtain device yet, but if I name the device as bedroom curtains and ask Xiaoai to open the bedroom curtains, the device will run normally.)
 
At this time, you only need to change the operation corresponding to the closing curtain voice in the Xiaoai training of the Xiaoai speaker to opening and closing the bedroom curtains. I saved the country in a roundabout way.
 
I put all the files required for the project in the compressed package of the attachment, including code files, SolidWorks source files of the shell, .stl files (which can be used directly for printing), etc.
(I am not a mechanical major and my modeling level is limited, please don’t spray)
The video of the curtain motor running in the attachment was shot during the installation process. At that time, the other half of the curtain had not been fixed on the synchronous belt. You only need to fix the other half.
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-06-27 16:15:24

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号