If you don’t want to miss my updates, remember to check the public account in the upper right corner and set it as a star, and give me a star!
With a smart curtain robot design that doesn’t require complex sliding rails, you can just hang it up and use it! Let Azheng (Bilibili: Azheng Langge Li Ge Lang) teach you:

To make smart home devices, smart curtains are essential. Existing smart curtains require installation of large electric sliding rails, and the original equipment and layout must also change! This little thing designed by Azheng can push the curtains and is ready to use! From circuit board, shell assembly, to WeChat mini-program, everything is done by myself!

Don’t underestimate this small curtain robot, it contains a lot of knowledge:

Selecting components took a long time. Since its working environment is low power consumption, and it requires Bluetooth, a gyroscope, and a light sensor to wake up via interrupts, all components must enter low power mode without disconnecting power. Therefore, component selection is particularly important! Fortunately, the few devices chosen now have very low power consumption.
The main control system uses STM32L051, and the schematic design has been completed. I was particularly amazed by the PW02 Bluetooth module, which is surprisingly small.
Circuit diagram drawing (click to enlarge)
The above schematic is the second version, the first version had some problems:
1) The internal clock error of the first version of STM32 was too large to achieve relatively accurate timing, so the second version added an RTC clock;
2) The second version added a gyroscope chip to sense the acceleration when the user manually pulls the curtains, thus controlling the curtains;
3) The light sensor chip in the first version had issues with the schematic from Jialichuang Mall, which was awkward, and the second version will be modified to resolve it.
The shell part has been optimized and designed in several aspects:
1) Installed bearings in multiple places to reduce friction, while leaving a 0.1mm tolerance between the shell and the assembly of bearings and motors for easy installation;
2) To shorten the shell size, the motor is hidden in the middle of the roller, which is perfect;
3) The overall appearance is based on the Tmall Genie air conditioning remote control design, round (using the simplest shape due to lack of aesthetics, haha).
The development of the WeChat mini-program is relatively simple:
1) With the support of ColorUI, it looks quite beautiful, and there are many animations and effects;
2) Features include connection, list display, and sliding list connection;
3) After connecting the WeChat mini-program with Bluetooth, it sends the current Beijing time to the hardware microcontroller, facilitating the RTC clock adjustment;
4) The memory function is related to the hardware.
WeChat mini-program development
The hardware program development is relatively simple, mainly configuring STOP mode for low power consumption and serial port interrupt wake-up. Notes:
1) Low power configuration
2) Internal RTC clock is inaccurate (the second version will add RTC crystal oscillator)
3) Bluetooth timing for RTC adjustment ensures that once the user uses it, RTC adjustment will occur, ensuring relative accuracy of the time
4) Since the N20 motor is an ordinary reduction motor and not a stepper motor, it cannot accurately locate the curtain position. Therefore, users can manually input the opening and closing of the curtains during the first use, relying on time to locate the motor’s running distance (a better solution will be optimized in the future), which will be recorded in Flash, allowing for memory even after the next boot or power failure. Unless the user performs another memory operation (corresponding to the memory button operation in the WeChat mini-program).
Hardware program development
The smart curtain robot hook is a non-standard part, so it’s hard to buy. It was made manually with pliers. (…)
The bearings were also bought on Taobao after measuring the hook size; they convert sliding friction into rolling friction, reducing the friction between the hook and the sliding rod.
At the same time, the rubber pads on the rollers are to increase the friction between the roller and the sliding rod, and a spring is installed inside to increase the pressure between the roller and the sliding rod, increasing friction!
The finished product is as follows:
The above is Azheng sharing the process of realizing a smart curtain robot. If you are interested, you can follow his blog:http://wenzheng.club/
Darwin in collaboration with global renowned component distributor Digi-Key launched the Back2School Series Season 2, 14 memorable projects during college to help freshmen and seniors quickly return to campus. This content is the 14th project of the Back2School Series Season 2.
Thus, after two months, the 2020 Digi-Key Back2School Series Season 2 project has concluded. How many of the 14 projects have you learned? What would you like to see for the 2021 Back2School? Feel free to leave a message to let us know.
Back2School Project Review:
Project 1: Simple transistor + amplifier to achieve signal reception from 1000 kilometers away
Project 2: Hands-on guide to making an FPGA electronic piano for the coffin dance
Project 3: STM32 PK Raspberry Pi, giving new life to the perpetual calendar
Project 4: Classic course project: Signal amplifier production, 3 components are enough (watch on Darwin’s Bilibili)
Project 5: 9 modes automatic switching, with music spectrum “Guangzhou Tower” little waist
Project 6: Control techniques for tracking/obstacle avoidance/PID algorithm of the divine team and divine car
Project 7: Fast recognition of moving objects can be achieved with 【Raspberry Pi + camera】
Project 8: Homemade “smart” moving 【RoboMaster】 mech!
Project 9: Universal small gyroscope allows 【RoboMaster】 robot to strike accurately
Project 10: PWM pulse width modulation! DIY upgraded breathing light 【Breathing Bath Heater】 (watch on Darwin’s Bilibili)
Project 11: Difficulty = 0, quick DIY multifunctional monitoring platform (temperature/heart rate/pitch angle)
Project 12: Helmet tracking! Automatically recognize aiming + motor control for face tracking (watch on Darwin’s Bilibili)
Project 13: Detailed explanation of TCP/IP protocol networking, turning “handheld” into a smart control center
Join the Back2School project season now and get the latest information:
QQ Group: Search: 1081905597 to join the project discussion group
WeChat Group: Add Niji or Momo on WeChat, and we will pull you into the group!
Project Sharing | Electronics Competition Series | Artificial Intelligence | Postgraduate Entrance Examination
Must-Know Knowledge Points | Graduation Project | Switch Power Supply | Job Hunting
We are Nimo, the founder of Darwin, the lady who only talks about technology and not flirting. The Darwin online education platform aims to serve professionals in the electronics industry, providing skill training videos covering popular topics in various subfields such as embedded systems, FPGA, artificial intelligence, etc. We tailor layered learning content for different groups, such as commonly used knowledge points, breakdown assessments, electronics competition/smart car/postgraduate entrance examination, etc. Welcome to follow us.
Official website: www.darwinlearns.com
QQ Group: Group 1: 786258064 (full)
