In a private house      06/20/2020

Do-it-yourself automatic curtains. Curtains with electric drive: types, pros and cons, operating rules Do-it-yourself automatic opening of curtains diagram

Live in a beautiful interior country house or a city apartment is not only pleasant, but also comfortable. After all, the interior decoration of the rooms creates the appropriate mood in them and disposes to rest. And one of the important points in the design of residential premises is textiles on the windows. Let's discuss everything about automatic window blinds in this article.


What it is?

New technologies are actively entering our lives. Today, if you wish, you can equip your home with high-tech equipment that will help make it as comfortable as possible, as well as aesthetically attractive.


Buyers who care about the comfort of their own lives should pay attention to such an invention of our time as electric curtain rods. It is able to autonomously control the level of lighting in the room. Thus, even in your absence, green plants in the house receive the optimal amount of light.

Take a look at the following photo to see how beautiful these highly functional automatic home window design inventions can be.


Similar curtains were created not so long ago. However, today it is gaining popularity at such a rapid pace that it may soon replace conventional textiles. And this is not surprising, because a person is constantly striving to make his life easier.

Smart technologies in action

After all, these are reliable, durable and easy-to-use automatic products with which you can transform your home and fill it with an atmosphere of warmth.

Automatic curtains for windows are part of innovative smart home systems, where the interior is equipped with special units, which makes it highly functional. The opening of the electric tulle occurs automatically and without human participation in this process.


Such roll models work due to the presence of wound power in and design of the motor. And it is on the type of engine used that the speed of lifting the curtains will depend. Advantages of automated curtains

Advantages

What are the advantages of such inventions for window openings?

In addition to the fact that automatic Roman blinds make a person’s life more convenient and easier, they also have a rather large list of positive qualities, including:

  • automatic curtain control systems on the window allow you to attach textiles of any weight, size and structure to them. Although in fairness, we note that more powerful engines create in this regard wide opportunities. But with not very powerful engines still it is worth giving preference to textiles with low weight;


  • makes it possible to produce curved forms of cornices and interesting forms of textiles. So Roman or roll options are very popular today;
  • can be hand-mounted on a window of any size and design. Even the most complex geometric shape of the window opening will not become an obstacle to this;
  • The control of this curtain is very simple. Even a child will master it;
  • allow you to decorate windows with your own hands with all kinds of curtains, curtains and tulle in design, texture and style;
  • they work completely silently, that is, curtains and opening the curtains will not interfere with family rest even at night. The curtains will close with light, smooth movements, which will completely enchant you and your guests;
  • often with proper use and regular service, such products have a very long term services.

Flaws

Are there disadvantages or difficulties associated with automatic curtains? Note that the installation of such systems should be carried out after careful measurements of your window opening. After all, such innovative electric curtains are created directly for your conditions. And even a centimeter deviation can make hanging the curtain rod difficult.

Control

And how is such an automatic product controlled? Automatic control curtains can be controlled remotely. To do this, an infrared or radio remote control is included with the product. It is also possible to control such a product manually by pressing a button or a two-gang switch.

Due to the presence of a special light sensor, Roman electric curtain rods can be programmed to cover window openings on particularly sunny days. Therefore, you will no longer need to do it manually.

Progress does not stand still and gadgets touch all spheres of life. The ease of use of a particular piece of furniture makes life more comfortable. This also includes automatic operation some types of curtains on the windows. The designs are no longer new, but for owners who want to install such systems for the first time, it is worth considering the issue comprehensively.

  • Control methods
  • Operational Benefits
  • Types of automatic curtains

    These are roller blinds, indoor roller shutters, Various types blinds. They are classified according to several criteria:

    By mounting options

    1. Directly into the opening - these are internal roller shutters on the windows. There is a significant drawback - this option does not provide for opening a window or even a window. Only ventilation mode is possible.
    2. Window opening overlap. Maneuverability becomes wider, but still the full opening of the window will not work.
    3. external options. These are shutters, roll curtains. They are made of metal or plastic. Protect windows from natural precipitation - rain, hail, snow. Significantly prevent the entry of uninvited guests.

    By design

    1. Open. Blinds of the usual type with open edges. Installed inside the window openings of an apartment or house. The lower edge remains unsecured, has a device for manual control of the canvas - a ring, a bracket, a cord.
    2. Cassette. Outdoor roller shutters, when closing, they “leave” from the grooves of the vertical guides. There is a variant of mini-cassette curtains - they are installed on the dormers or skylights of a small shape.

    It is important to choose the type based on the goals of the owners. External options allow you to install inside and the usual variations of canvases - multilayer, structural, asymmetric. Nothing will interfere with them. It is preferable to install internal blinds in new interior styles - minimalism, hi-tech, kitsch. If there is a craving for innovation, they act boldly.

    Automatic curtain device

    The model of any version contains a shaft with a built-in electric drive mechanism that winds the web on its axis. The opening-closing system works from a signal from the control panel and shifts the canvas to the desired opening height. Then it is returned to its original state. The design is simple and, if desired, home craftsmen provided themselves with automatic roller blinds with their own hands.

    The device and control of the electric drive

    This is the heart of automation. It is a miniature motor with enough power to lift even heavy canvases. It is powered by a regular network of 220V. Or built-in batteries with a charger. Progressive models are distinguished by built-in functions that improve the comfort of operating curtains on window openings. Namely:

    • Lifting speed. Automatic curtain rods wind up the fabric from 10 to 25 cm per second. The heavier the fabric, the slower the twist. Actually, such a function in a calm existence is not required. It is important to ensure instant ascent or descent during emergency situations - fire, burglary, penetration.

    • Emergency stop. It is needed to stop the mechanism of the structure in case of a fire or an obstacle in the window opening.
    • Memory. It will fix the desired position of the canvas for a certain time of day.
    • Closer function. That is, automatic roller blinds are adjusted independently if the gap of the open window does not suit the owners.

    Functions are also available for external roller blinds - metal-plastic shutters. They are controlled from outside or inside the room.

    Automatic roller blinds

    Control methods

    Structures have multiple options. For example:

    • With the help of remote controls. They are manual, wall-mounted, touch-sensitive, with buttons. They provide opening and automatic closing of curtains, control of various functions.

    • In progressive models, a radio receiver is built in, a system that works on infrared emitters. They are installed mainly on windows so that the rays of the sun themselves control the models of cassette curtains.
    • The consoles appear to be single or multi-channel, allowing you to raise automatic curtains on windows in several rooms at once.
    • Manual control is associated with photocells - at the slightest natural dimming, automatic roller shutters on the windows themselves determine the opening and closing width, respectively.

    Functionality and, accordingly, popularity are enjoyed by remote controls with software, where the above pleasures are taken into account and new ones are added. Naturally, the average price for automatic curtains is 20,000 rubles for a device with a standard set of functions. Everything that is more comfortable is valued at a decent amount.

    Operational Benefits

    The fact that it is convenient to open and close the curtains is not worth mentioning, although it brings up laziness in the owners. Other benefits of using it are as follows:

    1. Can be installed on any window size. Wide, high, narrow, small or irregularly shaped openings are well draped with similar options. Acceptable in rooms for various purposes - roll curtains for the kitchen, for example.
    2. Automatic roller blinds have several opening modes that allow you not to open all the windows at once, but in steps or one at a time. This gives a wide scope for maneuvering sunlight - in different time, the rays will illuminate the premises as needed.
    3. Have a remote control remote control and accordingly the timer. Instead of a boring alarm clock, the automatic opening of the curtains can wake up the owners of the apartment by gently letting in the rays of dawn. Automatic Roman blinds for panoramic windows are especially beautiful - rising slowly and gently, they open a beautiful view outside the window, immediately giving rise to a good mood.
    4. Without constant manual operation, the fabric will remain in its original state - new and with a spark. There is a drawback - it fades, so appropriate reliable options are selected - synthetics are better in this respect than natural linen.
    5. In addition to the decorative and utilitarian function, they also have a protective one - automatic fire curtains that will not allow oxygen to enter the room in large quantities with the risk of an explosion or reverse thrust. In case of danger, the built-in alarm will close the windows, thereby protecting the glass.

    And, of course, you can’t do without automatic curtains if the window openings are at a height above human height or are shutters outside the second floor.

    Automatic curtains are a very convenient invention.

    Disadvantages of automatic curtains

    Any design, and even more so automatic electric shutters, has its drawbacks. It is important to consider them, otherwise the comfort of operation will be at risk. For example:

    • Failure of the remote control. Since control is tied on it, you will have to sit in the dark or in an aquarium until the master arrives, if the expired battery does not become the cause.
    • Electronic relays of automatic curtains react to humidity. If the room is somehow connected with a large amount of condensate, then breakdown or even combustion of all circuits is not ruled out. It is important to ensure the position of the engine and electronic stuffing in a dry place without access to water and steam.
    • Difficulty to understand. The desire to have more opportunities plays a cruel joke with us - it is not easy to understand all the innovations, and the expenditure will be considerable and, it turns out, in vain. This applies to apartments with elderly family members - it is not easy for them to understand the principle of operation of automatic curtains.
    • Expensive repairs or complete replacement of equipment is an article that the owner decides on immediately. Many installers offer a guarantee for the product and work, but at the same time, it is possible to identify the cause of the failure only in the appropriate center. Therefore, the owners will have to pay under the contract.

    However, even the listed shortcomings of the automatic system for the operation of curtains do not stop future owners from buying - it really is so convenient.

    Where are automatic roller blinds used?

    "Habitat" similar models wide You should carefully consider all the points in order to understand whether your apartment or house falls under the described types of rooms. So:

    • Traditional decoration panoramic windows curtains with automatic mode. The benefit is significant - to decorate large openings from ceiling to floor only with textiles - it is difficult and not always appropriate if the room is fully glazed. Automation will make the lighting inside as needed. Important - such rooms are decorated with roll curtains in the same color scheme and dimensions.
    • Progressive electric curtains on the windows of the bedroom, nursery and even the kitchen. It's nice to wake up with such canvases. The living room is no exception - bold styles require a progressive solution, which, however, does not exclude the exploitation of traditional curtains. It is important to consider that in this case it is better to use automatic Roman blinds - they are cozy and homely.
    • Attic rooms. It is difficult to arrange standard woven curtains there. You have to use special inclined holders so that the canvases do not sag perpendicular to the floor. With the use of the automatic option of roll curtains on plastic windows, there will be no problem. Everything is fixed on the wall, and operation becomes comfortable.
    • You will need soundproof curtains for the windows of domestic premises. In the laundry room or home boiler room. Units sometimes make completely unbearable sounds. At the same time, it is important to leave the installation of such options at the mercy of professionals and adjust the possibility of installation with permissive safety rules. Some change houses, for example, with a gas boiler installed inside, require open windows, so automatic shutters are supplied with a programmed program and an alarm.

    WATCH THE VIDEO INSTRUCTIONS

    So, the comfort of operation has been determined, there is a desire to install progressive gadgets in the form of automatic curtains. Now it is important to determine the installer company - there are many of them and some have already established themselves as responsible and reliable performers of the work. It is worth focusing on real reviews owners of such structures - they tell a lot about the company and the nuances of using products.

    Now you know what are automatic curtain rods and automatic curtains for windows.

    The idea was born a long time ago and matured for a long time. It all started with moving to another apartment, the windows of which face east. Nothing in the winter, but in the summer the arrogant sun rises when I just fell asleep or didn’t even go to bed yet. It shines brightly right in the eyes, says that I should not oversleep the summer. It is, of course, right, it’s not a matter of sleeping in the summer, but somehow it’s impossible not to sleep at all. From the sun, curtains have been invented for a very long time, and I even have them. Pretty dense. But not enough. Bright light pierces through them, not direct rays, but still bright. And most importantly, you must not forget to close them in the evening, open them during the day when you wake up. Someone makes a smart home at home, someone is crazy. Well, I have a lazy house, all in me. The owner should not bother himself with such hard work as moving the curtains as much as twice a day. Let the curtains open smoothly some time before the alarm (or even instead of it). The sun should wake my majesty, but not disturb his sleep, right?

    Spoiler:

    I began to think about how to automate this business. The first thought is obvious, a cable, an engine and hang it all on the curtains. While I was thinking about how to implement it, fix it, how to attach the end sensors, then this, while I was trying to overcome laziness and do it, three years had passed in total. But he didn't. And this is good. Because by that time another thought had crept into my mind. Instead of moving curtains that do not move easily and do not block light enough, it is better to use blinds. Well, when I got to googling about them, I found out about such a cool thing as roller blinds. Never encountered them before.


    Roller blinds are the middle ground between blinds and curtains. A piece of fabric that, when not needed, is rolled up at the top. They are hung on each window separately. For opening - directly on the sash, you can open the curtains in any position. Of course there are different colors, patterns and light transmission. And, what I need, there are “blackout” options, that is, almost completely blocking the light. In the usual version, they are controlled by a hanging loop with a chain rope. There are different widths, but if necessary, you can cut it in place. Prices are also different, somewhere from 600 rubles (~$10). Here, for example, in . If you need simple, no frills, then it is quite acceptable, as it seems to me.

    Bought, hung - excellent! It remains only to automate. There are no problems with the engine, the curtain is quite light, nothing powerful is needed. I decided to remove the manual cord control. Without it, the motor shaft can be rigidly connected to the reel. This simplifies the design. The case, in the presence of a 3D printer, turns from a problem into a design issue. But electronics ... There are many options for solving the problem. I’ll hide a detailed analysis of why I chose this one under the spoiler.

    Options, thoughts, compromises

    First we need to decide whether we want to control the curtains from a button, remote control, smartphone, or something else. Or all at once. And directly or integrate into some lazy house. If integrated, then how to connect, with wires, Wi-Fi, bluetooth, radio channel, or some other perversion. Here everyone has their own preferences. I chose Wi-Fi as pretty universal option. Producing wires is unnecessary. IR / radio remotes do not make sense, it is better to have one ring to rule them all, oh, that is, one smartphone for all home automation. Moreover, if you wish, redirecting commands from anywhere to Wi-Fi is quite simple. I have an IR receiver in my computer, I turn off the light and control the music with the TV remote control. It will be necessary (and if I find another unoccupied button) - it will also control the curtains from it.

    Well, since Wi-Fi, then of course ESP8266. Modules built on this microcontroller are inexpensive and quite suitable for the task. I know about ESP32 (almost the same, but newer and also with bluetooth), but I haven't used it yet.

    And here a compromise is brewing, which will have to be made. Pull power with wires. Because turning the motor a couple of times a day - a battery, for example 18650, will last for a long time. But continuously feed the ESP8266 - no.

    According to quick estimates, the engine consumes around 220mAh, we take a 18650 battery for 2500mAh, we get 5 volts from it with a booster, 2500 * 3.6 / 5 * 80% = 1440mAh, which means you can twist it 1440/220 = ~ 6.5 hours. Raise or close takes about 2 minutes (depending on window height and speed). About 90-100 round trip cycles on a single charge. 3 months would be enough. And if you use 2 batteries, but with increased capacity - more than six months. Acceptable. But in addition to the engine, there is electronics.

    The ESP8266 has several power saving modes for such cases. But if we want (and we do want) that the command to open and close the curtains can be sent at any time, then Wi-Fi cannot be turned off, and without this it will not save much. My experiments led nowhere, at least. The average consumption remained somewhere around 5-10mA, which is clearly a lot for autonomous power supply. Worse, my esp "shka periodically stopped saving energy, it was only necessary to ping it 10 times. Xs what a glitch, I didn’t understand. Well, even if I’m crooked, it can really squeeze out 2-3mA, it’s still not an option. Change batteries every a month (and this is still in a good case) is too much. Turning on Wi-Fi occasionally just to synchronize the schedule is not an option. You never know when you need to close the curtains, suddenly you want to watch a movie during the day, and the bright light of the sun interferes. So we pull the power with a wire. low-voltage, low currents, easy to lay between the frame and the sash, behind the window plinth, from the side of the balcony, or how to disguise it.But you did it once and forgot, and you don’t change the batteries every time. manual control by a wired button. I’ll think about this option for a summer residence. Either change Wi-Fi to BT, RF, IR or something else two-letter low-eating. By the way, fluent googling says what is on sale (even right here, from sellers these curtains) and battery drives with a remote control, who needs it. And I will farm as I please. With wires. Hide them really.

    Another question arises, here we have 2-3 (well, I specifically have 2) windows nearby (I mean separate glasses. Deaf, opening or a balcony door, in one window opening) in the room, you need the same number of curtains, engines too, but how many “brains”? In general, of course, the computing power of the ESP is more than enough, we are not planning rocket science here. But, on the other hand, then in addition to power, you will need to lay wires to control the motors, for steppers it is 4 pins, if directly. The most common and cheap Chinese scarves on ESP also have a limited number of pins. And if you shove these handkerchiefs directly to the motors, one for each, then everything is simplified. So I decided that if a cannon and shells cost a penny, then you can shoot sparrows from it. A simple, modular, easily repairable, compact solution outweighs the match savings. The electronics of one drive will break, so the second will allow you to open the window and I will not die from lack of lighting (yes, I am that vegetable).

    Usually, when making lazy automation, it is imperative to think over backup control options, since it will definitely break down someday. And if it does not break, then the light will be turned off. Or wi-fi hangs. I refused mechanical manual control, the chain at the window does not hang out. So if there are problems with food, we can’t do anything with the curtains. Okay, we'll survive somehow. You can power it from an uninterruptible power supply or make a 5 volt uninterruptible power supply. Another thing is if everything works, but Wi-Fi has dropped. There is a free pin on the board where you can stick a button to manually start the curtains. The drive is high, the button can be pulled down to hang out on a cord. But I didn't. My router is powered by UPS, it is not buggy, uptime for a year or more, it is rebooted only when updating the firmware and replacing batteries. And in the event of a house fire, as happened recently. The access cable channel was on fire, there was no light for a couple of hours, the uninterruptible power supply quickly gave up. But this is rare. In general, the button can be convenient for someone as another control channel.

    Now let's get down to the details, in every sense.

    Engine. Here the choice was clear for me. Widespread . The price is 1.5-3 bucks, depending on the quantity, the configuration of the driver board and the seller's greed. Sold on every corner of the Chinese Internet. There are 5 and 12 volts, I used the most common, five volts. It is a stepper motor (i.e. it can be turned in small “steps” for desired angle or the desired number of revolutions) combined with the gearbox. Due to this, with a very modest weight (~ 30 g) and dimensions (~ 3x3x2 cm), it develops good power, about 300 grams-force per centimeter. This is not much, but it is enough to wind the curtains. The reducer also provides effective braking of the shaft in the absence of power. You can scroll it by hand, but with a decent effort, more than a worker. So that the curtain does not unwind spontaneously when the power is turned off. Another plus is that it is very quiet. It is almost inaudible already a meter from the ear. When attached to a hard surface, vibrations during operation slightly increase the noise, it becomes slightly audible in a quiet room, but it is unlikely to wake anyone up. Me for sure. In general, as I understand it, they are often used to control the shutter of air conditioners. And she can move all night in swing mode (I don’t know how it is in Russian, in short, when she waves back and forth). The gearbox is plastic, but I don’t consider it a disadvantage here, the load is small, wear is unlikely to affect the “curtain” run, does it somehow live in the air conditioner? Someone generally made such mini 3D printers, and there is non-stop movement. The main thing is not to twist it too often by the shaft, this can easily kill him. It also has a fairly significant shaft play, both axial and radial. Pretty significant. But then again, in this application, this does not matter at all and does not matter. So he has, I think, only one minus, again a consequence of the gearbox, the motor is slow. 15-25 RPM, i.e. one revolution in 3-4 seconds. Slower is possible, faster is not. But the curtains are such a thing, there is no need to hurry, on the contrary, you need to raise them slowly and majestically. So it fits.

    The motor can turn the curtains by a given number of revolutions. But it's all, in Einstein's way, relative. And we need, in Archimedean style, a fulcrum from which to count. If you have two such control points, top and bottom, then you can generally use a conventional engine and turn it “all the way”. But it is inconvenient to do this from below, but you can put a mikrik on top. (I saw an implementation on the Internet without limit switches at all, the curtain was trained when it was first turned on. But this is not my way, the position can be reset when the power is turned off, if you do not save it every time to flash memory, forcing it. The engine may skip for some reason steps. You never know.) The microswitch will be pressed by the fully raised curtain, and down we will unwind to the length specified during the setting. In fact, it would probably be even better to use a reed switch and a magnet at the bottom of the curtain. But I hadn't thought of that before. The comrade suggested to me when we discussed this topic in smart curtains from Xiaomi. I left the mics, but nothing prevents the use of reed switches, if desired. Mikrikas cost a little over a buck a bundle. Search for words micro limit switch, for example. We need the smallest, 13x6mm, preferably without a roller. Although the roller is always circumcised.

    In terms of mechanics, the body and a couple of M3 screws are left to put together. We will draw the body, we will live to print. Ideally, the case should be made as compact as possible, for aesthetic reasons. And why waste extra plastic. So we make a board at the beginning, there is already a case on it.

    Electronics.

    So the heart ... although no, the brains, we will have an ESP8266. This microcontroller requires external memory, an antenna, and other small things that are difficult to solder at home. So we take the finished scarf. A lot of them different options, from very small to almost arduino-like. My choice is ESP-07. One of the most compact options, with a ceramic antenna. There is even a connector for an external antenna, but it is not needed within the apartment. ESP-12 is slightly larger due to the antenna "drawn" on the board. The price is 2 bucks, plus or minus how you bargain.

    These brains cannot directly control the engine. Overstrained. I don’t remember exactly how much ESP pin current is allowed, it seems to be 12 mA, but it needs to be around 200-300. You need transistors for amplification. The easiest way is to take a microchip with keys, ULN2003. At the same time, it contains all the diodes necessary to control an inductive load. Often, boards with this microcircuit are sold as a kit for the motor. Only there it is in a DIP package, which is unnecessarily bulky. It is good to have such scarves for prototyping with wires, and put the ULN2003ADR in the SO-16 package into the finished product. It costs even in the retail Chip and Dip only 19 rubles, on Ali it is generally less than a dollar for a dozen.

    The engine requires a power supply of 5 volts, the brain needs 3.3. So we put a microcircuit-stabilizer. Here the choice is huge. I took the most pop - AMS1117-3.3 in the SOT-223 package. The price is a dollar for a dozen, for $3 they will send a hundred at once. They are not suitable for powering ESP "shek from lithium, the voltage drop is about 1 volt, but powering from 5V is just right. I often use them for esp and STM32.

    We also need resistors 0805 with a nominal value of 10KΩ, plus or minus. A triple of capacitors, also 0805, rated 1uF or more. Less desirable, can be buggy. And pins for connecting everything, so as not to solder tightly. The most common, single-row straight lines, step 2.54. Color to taste.

    Powered by a 5 volt source. Current consumption up to 0.4A per curtain. An honest 1 ampere block should be enough for two curtains. If you do not raise them at the same time, then even 0.5A is probably enough. But it's better not to risk it. If possible, it is better to overclock the power supply to 6 volts, this compensates for the drop on the wires and keys of the motor driver. Especially for wide heavy curtains.

    For the initial firmware, you will also need a USB-TTL adapter. Any. You can use any Arduino with a USB port as it. The adapter costs a penny, but you can also ask someone for a while, further firmware updates, if necessary, can already be done over the air.

    Pay.

    The circuit is simple, the connection is typical. I drew and then bred the board in DipTrace.

    It turned out to be a little more difficult to separate the board. I wanted to make it as compact as possible, but without giving up 0805 small things, as the most common and comfortable enough for soldering. And the tracks are 0.4mm, it is quite acceptable for the manufacture of LUT. The payment is two-sided. It was possible to reduce the length by another millimeter or even two by throwing out the optional resistor R5 between DTR and GPIO0, but I thought about it too late.
    You can also order boards in China. JLCPCB seems to still have a promotion with free shipping on the first order. Then 2 usd for a dozen (or even much more, if you file manually later). With delivery it’s already worse, it’s over the top ten. But you can look for options, there are many. I myself have never ordered, I get by with a photoresist.

    Frame.

    In the course of work, the case has come a long evolutionary path, starting with a simple bracket-bracket for the engine.

    For some time I puzzled over how to fix the mikrik and how to press it. I tried options for attaching a fork to it, between the teeth of which I passed the curtain, so that the weighting agent at the bottom of the curtain pressed this fork when lifting. All this was unaesthetic and impractical. But nice solution eventually found. You just need to slightly push the plastic weighting bar so that it rests against the drive housing. Make the lower wall of the case flexible, and hide the mikrik inside.

    The extended tip of the plank can be closed with a vertical U-shaped profile glued to window frame. Then the curtain will adhere to the glass even on tilting windows. For symmetry, the bar is cut in half and extended from both sides.

    The case is designed for mounting in the base, which comes with the curtains. There is a rather rich choice of fastening methods, on the window over the edge, on adhesive tape, with screws. It's stupid to refuse. For other curtains, the size of the fastening bar may differ, the model will have to be edited. But it's not difficult, I drew in OpenSCAD, well, as I drew, everything is set by text there. So it should not be difficult to fix it, just change a few numbers. But right off the bat it can be difficult to figure out my shit code. To whom it will be necessary - I will prompt where and how.

    We print. I am preparing a task for the printer in Slic3r "e. I try to adjust it so that it is printed only with perimeters, without filling. I set the number of upper and lower layers so that the bottom (when printing) wall is completely filled.

    My settings are like this. Printing with a layer of 0.25 mm, the first layer is 0.3 mm, 3 perimeters (it is better to put more perimeters for the cover, 5-6), solid layers: 4 top, 4 bottom. I printed both ABS "ohm (it's a little difficult to print, it's better to print with a full-height protective perimeter) and PLA. But I settled on PETG, they are the easiest. It takes 17 grams to print the body, about 6 for the cover. Printing time is 45- 50 minutes and 15 minutes, respectively.

    After printing, it can be treated with sandpaper and thinner to get a glossy surface, but I'm too lazy, so I decided that [s] will not be visible from afar anyway.

    We also print an adapter for the axle. It also needs to be adjusted to a specific curtain, if it has a different landing diameter. Mine is 15-16mm.

    We solder.

    I usually make boards with photoresist. For me it comes out a little longer than LUT, but a little better in quality and less marriage.

    What is bad about making boards at home, jumpers will have to be soldered into the vias. On factory boards, the holes inside are coated with metal and this ensures contact between the sides of the board. Well, I make jumpers from a strand of stranded wire. I put the board on the anvil, insert the core, bite off a millimeter above the board and smack it with a hammer. It is better to raise the board a little before hitting it so that it rivets evenly from above and below. It turns out quite reliably, and if you also tin it later, it’s generally excellent. And nothing sticks out, you can make transitional ones right under the microcircuits.

    We solder the details. Pay attention if you suddenly repeat. Resistor R5 - 300 Ohm (designation 301), not 10K (103), like the rest. Do not confuse. It is generally optional, you can solder the jumper. It is just in case, so as not to burn the DTR line when experimenting with the firmware. On the reverse side, there is also an optional resistor R7 (pictured above), do not solder anything there at all, this is for experiments with deep sleep only.

    Some pins also act as interlayer jumpers. So you need to solder them on both sides. First, solder from below, then lift the plastic skirt and carefully, using not too much solder, solder from above. Ideally, the skirt sits almost in place, it has a slight indentation. I solder myself, do not pay attention. I'm generally a master of all crooked hands.

    original firmware.

    If you already have the Arduino IDE installed, then the easiest way is to flash from it. If you have not yet installed a package to support ESP8266, then you need to add it (Tools - Board - Boards manager, esp8266 by ESP8266 Community - Install, version 2.4.1, at the moment. In 2.3.0 I had glitches and brakes). Next, set the parameters.

    In order not to install the Arduino IDE, you can use the free utility from Espressif, the developer of this chip. Download and run. In the settings we set everything as in the screenshot, in the first line we only select our path to the downloaded bin-firmware. In the address "0x0000" it is x, not ha, if that. And, importantly, choose right size memory. For ESP07 usually 8Mb (=1Mb). For other boards, it may be 32 Mbits (=4 Mbytes). Otherwise, there will be an error with the firmware.

    In both cases, you need to select the correct COM port for your usb-ttl adapter. You can see it in Device Manager in Windows. And the Linux people will figure it out themselves. You can set the port speed to any, but it's better to start with 115200, for reliability.

    We connect as follows.
    Board - USB-TTL
    gnd - gnd
    RX - TX
    TX-RX
    On the board, we connect DTR and GND (the one that is later used for the limit switch, it is still free). This is necessary so that when power is supplied to the esp8266 board, it switches to firmware mode. Then, for normal work, DTR will need to be disabled, otherwise it will hang, waiting for the firmware.

    And lastly, we supply 5 volts to the contacts in the corner of the board, gnd (minus) and VIN (plus). And don't confuse. Everything is ready, press start or upload. If everything works out the first time, we drop everything and run to buy lottery tickets. Otherwise, we check everything again, most often the problem is with the choice of a com port or mixed up RX-TX (you can try to swap them). We check the soldering, we pray to Cthulhu, we try again.

    After a successful firmware, turn off the DTR and the adapter, only power remains. Turn off, turn on again. Consumption should be about 80 mA, this is so, for control (in flash mode or incorrect recording, consumption is usually less). We give the board 5 seconds to start and look at the available Wi-Fi networks. A new, password-free network should appear.

    We connect and go to the address. You should see something that looks like an interface. We climb in and set up.

    In the settings, you can select the Russian language if English does not suit you. I prefer English in technical things. But, I suspect, not everyone shares my tastes and, so that there would be no accusations of hatred of my native language (although at school I really didn’t like it very much and received triples), I decided to give the owner a choice.

    I'm still finishing the firmware, at the moment version 0.02 beta still doesn't support a lot of things. For example, you cannot set a static IP, only a DHCP machine. First you need to come up with a network name and specify your Wi-Fi network. It is advisable to specify an NTP server to get the exact time. After the reboot, find out from the router what IP it gave to our drive. If desired, fix it so that it does not change. From a mobile phone, in theory, you can enter the browser by the name that was specified in the settings. It may not work with a computer, for example, in Win7 there is no mDNS client by default. You can put Bonjoure from Apple, or maybe it's already worth it if you are an apple fan. But this is a separate issue.

    Further firmware updates are supported over the air. Both from the Arduino IDE directly (mDNS support is needed in the system), and by directly uploading the bin-file at http://IP/update (login-password admin:admin, so far it changes only in the firmware, then I can take it to the settings) .

    In general, I want to say right away that the firmware is written in accordance with all security standards adopted in IoT (Internet of Things). Those. anyhow. However, if someone connected to this device, then the password from your wireless network he already knows, but it can do harm only by moving the curtains back and forth. Nevertheless, at least you should not give access to the curtains from the global network directly on the router. In the future, maybe I will add password access, although so far I don’t see the point in this.

    Regarding writing the firmware, it would be unfair not to express gratitude to the comrade and his cat for their pro esp8266, which helped to deal with this chip. And for him for SonoffLED, from the source of which I learned a lot. So Alexey, thank you!

    So, we launched, set up the network, you can put it together. We solder the wires to the mikrik, crimp the connector. Or take two wires with a connector and solder them. It is necessary to solder to the extreme conclusions, normally closed. If suddenly the limit switch falls off the board, it will be equivalent to a constantly pressed state, there is less chance of killing the engine.

    We fasten the motor to the body. Insert a mic. For reliability, it is better to fix it with a drop of hot glue from the side of the contacts. We connect to the board and tamp it inside. I did not shorten the wires from the motor, of course, I was too lazy. Just rolled it up and stuffed it inside. He justified this by the fact that it would be easier to change it if it was suddenly needed. The board comes in snugly if sawn off correctly. Sharpen if necessary. No fastening required, sits securely. Power wires can be pushed into the slot above the mount, then they will not be visible. We fasten the lid. Does not work. Seal the wires, try again. I managed. Time from the third. Serving option:

    The power supply from Ali, used from some kind of technology, is pretty decent, as far as I can tell with my education (I graduated from refresher courses in reviews from kirich "a). 10 watts per 5 volts are declared, we don't have so much power I only slightly increased the output voltage, by half a volt somewhere, by changing the resistor. If necessary, we change the output capacitors to a higher voltage. The power supply unit will be installed on a glazed balcony, almost under the ceiling, but still stuffed it in an IP55 junction box, with a Schneider brand. I like them. Connecting wires on fakes for wago, but the currents are small, I generally have a C6 machine on the balcony line, if anything (I don’t want to provoke wago-srach in the comments).

    Laying the power wires inside sashes. We make a loop in the place where it turns so that it does not bend too much. And connect to the power supply.

    Time to tune the motor. For a stepper motor, it is important in what sequence to turn on the windings. If connected incorrectly, it will spin in the opposite direction or even twitch like an exhausted epileptic. It seems like when I made a board and wrote software, I laid down a direct order. But, apparently, he messed up somewhere, as always. As a result, in the settings I made a choice of any connection option, so as not to bathe in the future. Suddenly, the Chinese on the engine connector will change the pinout. The A-B-D-C option suits me. We try different ones, press the Test buttons. We choose the direction forward or reverse, so that the "test up" winds up the curtain. You can experiment with speed. The default is 1500, which is microseconds per step. The lower the number, the higher the speed. It works for me somewhere up to 900, at 800 it already stops spinning. It's better to leave a spare. You can slow down even more, perhaps slightly reduce the noise from vibration, if somewhere the resonance appears at a certain speed.

    After setting the motor, you need to adjust the length of the curtain. Raise it all the way up until the sensor is triggered, then lower it down to the desired length. You can use the test button, or you can set the curtain length value, gradually increasing it. Having learned desired length, save.

    Ready! You can open and close windows through the browser from any device. It works quietly, smoothly, slowly (the eye does not even immediately catch such a movement, that is, you do not jump from an unexpected sharp movement). I have in balcony door glass in full height, the curtain does not reach the bottom about a foot, but there is not much light there, the balcony shields. You can build a curtain, I don't need it. So the total length of 1.70m passes in 2.5 minutes at a speed in the settings of 1500.

    I didn’t do web layout for a long time, since then a lot has changed, for example, it turned out that tables are no longer typeset. And we still need to do something to make it look decent on mobile devices. It turned out so-so, but you can live.

    Integration with something smart.

    And here it will be short.
    It is already possible to manage over the network with a simple HTTP request.
    http://ip-address/open
    http://ip-address/close
    There is also a service link, it is convenient to use it with ajax
    http://ip-address/test?up=1&reversed=0&pinout=2&delay=1500&steps=300
    All parameters are optional, returns, after the operation is completed, the current position of the curtain.

    Where to score these http links depends on which system smart home use. I have my own, based on what I did at work for more serious things. But I am sure that you can screw it to anything without much effort. You can find examples on the Internet.

    The MQTT protocol can be screwed. I will probably add it in the next firmware versions.

    That's what I don't know yet how best to solve it - synchronization with an alarm clock. I did not find how to do this in AndroidAPI. So that I set the alarm for 14:00 in the morning, and the curtains received a command to open at 13:50. You can use an alternative alarm clock as an option.

    If this particular part was of most interest to someone, I apologize. But the topic is too broad. Here and Tasker for Android with voice control, and Siri, and Domotics with Broadlinks and Mi devices. All this can be applied, but described in one review - no. I already spent more bytes of text than recent years three.

    Another variant.

    Well, does anyone have a desire to repeat the same to themselves? If you want to repeat, but there is nothing to print the case on, there is no desire to poison the board, the soldering iron was borrowed by a familiar cryptanalyst, that is, I have a recipe for you from cubes.

    We are looking in China for any debug board on esp8266, so that with soldered pins and a usb connector. There are all sorts of WeMos, NodeMCU and the like, to your taste and cheaper. It is not much more expensive than a bare esp07, in fact. Next, we connect this to the driver board that comes with the motor (sometimes it doesn’t, look for the right lots). We flash via a USB cable, as well as written earlier. Only the flash button is on the board or even works by itself. All is ready. 5 minutes, really. Here's how to then attach the motor specifically to your curtain - these are no longer my problems :)

    The connection is simple. We connect 4 inputs on the driver board (IN1-IN4) to pins D1, D2, D6, D7 (they can be signed like esp, GPIO4, GPIO5, GPIO12, GPIO13). We connect strictly any way. Then in the settings we set it as it should. The plus and minus of the driver are connected to VIN (maybe marked as 5V) and gnd, respectively. Here already, if you mix it up, you can’t fix it in the software. All.

    Plans.
    To start, finish the firmware. This process is eternal, so I didn’t delay the review further. Plans to add MQTT, static IP, offline scheduling. Something else, I don't remember. Then there are thoughts for giving to do autonomous power supply, there you can stupidly work according to the schedule of sunrise and sunset. Or by photo sensor. There is also an idea to adapt the development for the projector screen. A more powerful motor will be needed.

    But I'm happy with the result. Hope it's useful to someone else. I probably forgot to write about many things. So I'll try to answer in the comments.

    Boring video. I shot it on a mobile phone, the sharpness constantly floated away, but I can’t do better :(

    UPDATE. Since the publication, the firmware has been significantly improved. Sources and binaries are still available on GitHube. Gradually finished off a separate one. Who really wants can buy ready-made blocks from me. Add to favorites Liked +240 +439

    The desire to equip a house with your own hands is not always associated with the need to save on the work of a specialist or finished products. Craftsmen are driven by the desire to surpass professionals. And often they succeed, even in such difficult cases as independent production electric drive for roller blinds. new test key

    Why do you need an electric drive?

    Installation of automatic blinds is recommended in large buildings, residential or non-residential buildings. This is necessary in order not to waste time adjusting the entire system. By programming the device, you can control all windows. In this case, each individual window is regulated independently of the others.
    Automatic models have another indisputable advantage. The wear of the structure is much slower, since the same force is always expended during adjustment. Electric roller blinds can cost significantly more. In addition, it is necessary to pay for the work of the master who will install them if the buyer cannot do it himself.

    Kinds

    Separate 2 ways to control automatic roller blinds:

    • Remote. Curtains are controlled by a specially programmed remote control. A timer can be set on the device, which will enable the remote control to give commands at a certain time. Such a system works on the same principle as an alarm clock;
    • Stationary. To put such a mechanism into action, you need to press the button, which is mounted next to the window.

    The most expensive models of blinds are equipped with photocells. They are sensitive to natural or artificial lighting, rising and falling at the right time. There is a misconception that automatic curtains make too much noise when operating. In fact, the presence of noise can only indicate the poor quality of the installation. If the design is installed correctly, the movements of the curtains will not bother you.

    There are other classifications for motorized blinds, for example, according to the place of installation:

    • Ventilation. They are installed in the ventilation system. Such curtains are often used in industrial enterprises to protect the premises from extraneous noise or unpleasant odors;
    • For generators. Necessary in order to protect the generator from dirt and dust. Despite its name, this type of curtain is actively used in everyday life. There are built-in and overhead models. This design is necessary where particularly high requirements are placed on safety;
    • Outdoor. The main function is to protect the premises from the penetration of unauthorized persons, that is, burglary. In addition, the model protects from low temperatures and direct sunlight.

    When making blinds at home, you can focus on the types of roller blinds with an electric drive given above. However, one should not forget that it is advisable to purchase ready-made designs for outdoor use. Roller blinds of our own production are only suitable for indoor use.

    Do you need to be a professional?

    Construct automatic system with their own hands can not only a specialist with the appropriate education. The assembly and installation technique is much simpler than it seems. Master classes presented on thematic resources and books on construction topics indicate step by step actions. However, certain skills are still required. If you've never had to do repair work, it is worth contacting a specialist. This will avoid the unpleasant consequences associated with improper installation and unnecessary costs.

    curtain material

    In most cases, high-density fabric is chosen for the manufacture of blinds. However, other materials can also be used.

    If the interior of the room allows, non-working floppy disks or CDs will be used to make curtains. This idea is suitable for a teenager's room, where excessive severity will look out of place. In an informal interior, you can use calendar cards or postcards. Even strips of leather might work.

    First stage of work

    If the decision to create a structure with your own hands has already been made, first of all, you need to decide on the size of future curtains. To do this, measure the window frame, since the length of the future product must match its parameters. Curtains can be large. But the difference usually does not exceed 12 cm. The width of the blinds must match the width of the frame. About 2 cm must be left for seizures.

    When cutting the material, you need to prepare 2 patterns, since one of them will become the wrong side, and the other front side. Patterns are folded right side in and sewn. The resulting workpiece is turned out. In the bag, you need to sew up the remaining hole. If desired, you can choose different materials for each side. But according to experts, both blanks should be made from the same material.

    It is not necessary to make curtains yourself. You can upgrade ready-made ones that include a plastic rod in the mechanism.

    Second stage of work

    At the next stage, the blinds need to be attached to a wooden beam. The width of the curtains should be 1 cm more than the length of the beam. Material for curtains should be spread inside out. In the upper part of the workpiece, an indent of at least 5 cm must be made. After that, a pre-prepared beam is laid. The material is tightly attached to it. For fixing, you can use a stapler. The rail should pull the curtain. In order to make this possible, you need to make a small pocket. The material must be wrapped by 3 cm. A beam is threaded into the resulting pocket.

    Third stage of work

    The electric drive can be bought at the store. However, some prefer to create it with their own hands. In order to assemble it yourself, you will need a bit extension and an electric screwdriver. The last element is powered by three batteries. First you need to disconnect the battery compartment. Power wires need to be extended. They are increased by 2 or 2.5 m. The gearbox and electric motor should be finalized. The need for this appears due to the fact that the drive will be installed in a limited space. The essence of the refinement is to reduce the body.

    Fourth stage of work

    The drive is attached to the blinds. The bit fixing extension is provided in a special stuffing box. You need to remove the stock cap. The first element is installed in the end of the winding body. It is necessary to ensure that the gland in the end is strengthened tightly enough.

    A special bracket must be attached to the frame, on which the device will be fixed. Ties are required for the initial fixation of the electric drive to the blinds. Subsequently, the elements used for fasteners must be replaced with brackets. Installation is carried out in a horizontal position after the engine is mounted in its place. There is a reversing switch on the power supply. With its help, the work of the entire finished structure is controlled.

    The electric drive can be presented in the form of a motor with a gearbox. To select the right model, you should consider the force of rotation of the shaft and speed. You need to purchase a unit whose power is at least 12 watts. The speed of rotation of the shaft, according to experts, should exceed 15 revolutions per minute.

    Next, the engine is installed in a plastic box. Then you need to run the cable. The next step is the holding of buttons, which completes the process of manufacturing curtains with electric drive. You can supplement the finished design with the help of automation and stationary power supply. A model that includes such elements can move right/left if it is a vertical model, or up/down if it is a horizontal version.

    • Professionals advise to purchase an Arduino module. Experts highly appreciate this device. With its help, not only blinds, but also gates, heaters and some other devices and devices can be controlled. You can regulate the operation of the device using the module after a special program has been written for it. This is especially necessary in cases where the system will be installed on 2 or more windows. By lightly pressing the buttons, you can set the required closing or opening speed, raise the curtains completely or partially, and also carry out other necessary manipulations. The Arduino module allows you to program additional functions, among which the safety mode should be noted. This function is necessary in order to notify in a timely manner that certain failures have appeared in the operation of the module;
    • Leave yourself the opportunity to control the design of the blinds manually. No matter how high-quality the mechanism of the electric drive is, sooner or later a malfunction may occur. Possible breakdowns in which you have to install a new drive. Manual control allows, in case of imbalance, to synchronize the operation of the structure. The absence of dependence on the electric drive allows the use of curtains at a time when the motor is disconnected for replacement or repair;
    • Protect the mechanical part of the structure from dust and moisture that can enter the room through the window. In the kitchen, the electric drive is exposed to the adverse effects of soot and steam, which are released during cooking. The mechanism will fail sooner or later. However, the period of his work can be significantly stretched;
    • curtains by yourself
    • Since the actuator will require repair anyway, do not glue plastic boxes containing moving parts. Use staples to fasten them together. They can be removed if necessary.

    Curtain offer by yourself for test

    Electric roller blinds are another step towards coziness and comfort in your home. By taking care of their installation, you get the opportunity not to waste time adjusting the mechanism. In order to make and install curtains yourself, it is not necessary to have a technical education. new test key. Just be careful and be patient.

    One day, after a hard day at work, I came home and realized that I wanted to relax, and not walk around and close the curtains. I would like to see them closed in the evening and open in the morning, while not dancing in front of the window. Googling different solutions, it was decided to do everything myself.

    By popular demand, I post all my developments on converting ordinary roller blinds into automated ones with remote control. Beware, lots of photos!

    Let's start with roller blinds:

    • Pros: roller blinds visually expand the space, beautiful and inexpensive. Very easy installation. You can manage each window separately. Frees up space on the windowsill.
    • Difficulties: manually opening 5 windows already takes a long time. Fully open corner window the mechanism itself interferes (example: the mechanism at the top of the balcony door rests against the wall and does not allow the passage to be opened completely). Because of this, it is necessary to hang curtains from the outside of the window. The price even for Chinese motorized curtains starts from 2000 rubles, we multiply by 5 and we immediately think how to do everything with improvised means.

    A little about tasks:

    It is necessary to add remote control to ordinary roller blinds from a hardware store and connect to smart home on the openSource Home Assistant platform. And still it is necessary to keep the usual control of the rope.

    Choice of motors:

    If everything is automated, then the speed does not play a role, so you can use motors with a gearbox. Collector motors are cheap, but not the most reliable thing for daily use. Servo machines also have commutator motors and are not stable at constant rotation. Great option look like stepper motors. Silent, you can control the position, cost a penny. As a result, a set of 5 28BYJ-48 motors with a ULN2003 driver cost me $10

    About the 28BYJ-48 engine:

    There were questions about the power of this engine. Fears that he would be weak did not materialize. Or rather, if you use the full-step mode, then the engine is very frail, if you use the half-step mode, then the shaft cannot be stopped with your bare hands. To whom there will be little power, there are many articles on the Internet on how to raise the voltage, turn it into bipolar and other improvements.

    About sensors:

    Since we still have manual control, and we don’t want to drive the engine in vain, curtain position sensors are needed. A minimum of one sensor is required at one end, but two is better. You can use any terminal, optical, etc., but I personally chose the reed switch, because. gluing a neodymium magnet on the other side is very simple and should work stably and durable. I chose the reed switches themselves for aesthetics already in the case. Plus provided for setting the distance from the shaft. Height can be adjusted with spacers.

    About the mount design:

    The task was to design the case as simple as possible for manufacturing on a 3D printer with minimal modifications. Modeled in Fusion 360. The complete mount clings to the top of the window, but such a design on an FDM printer would be difficult to make with the required strength requirements, so a design with one screw for adjustment was invented.

    In total, we got three parts for 3D printing. Link to download 3d models.

    Main part for motor, control board on ULM2003, mounting for reed switches, motors, line to stabilize curtains, and adjusting screw.

    A cover to cover all this disgrace. Clamp or otherwise hook.

    The very design of the curtains contains several springs that work like a brake if you pull on the curtains (the spring tightens) or releases if you twist the rope.

    When assembling, you need to do one refinement: break the rim that covers the rope with wire cutters, because. now we have our own fixed bezel, which prevents the rope from falling out.

    Control:

    Manage stepper motor will be NodeMCU on ESP8266. It was chosen because of its cheapness, the availability of a backup wi-fi channel, and it is quite easy to write the necessary scripts on it. If you need more than two curtains or additional sensors, then the legs of the microcontroller are no longer enough, you can look towards the ESP32. (esp32 is not shown in the photo, because it is in the junction box)

    Software part:

    The development environment can be any. The ESP32 can be programmed through the Arduino IDE. But I chose Visual Studio Code for myself because of the speed, modularity and free. In this environment, you can develop for almost any platform (not just hardware). You can even connect IAR ARM. (But that's a completely different topic)

    The task of the program is simple:

    Connect via WiFi
    Connect to MQTT broker
    Subscribe to a topic
    Control the speed of two motors
    Monitor the condition of the end sensors
    Send broker current steps

    Sources can be taken