Motor blinds
(video at the end of the review)
As part of the implementation of the "smart home" idea, I had a long-standing desire - to purchase electric blinds, or as they are sometimes called - "motorized blinds". Plastic windows have been installed for a long time, blinds (ordinary, aluminum) have been bought for a long time and perfectly perform their function. But here I set out to equip them with an electric drive. And having studied the offers on the market, I got a little prifegel from the prices! For one window, some companies offer electric blinds at a price of 30 thousand rubles! I have a 3 piece window. It turns out the price will be 90 thousand rubles! It's not even funny anymore... And I will definitely have to change the blinds, to the "correct" model, to which branded electric drives are suitable. In general, all this did not suit me, to put it mildly. On EBay, I also did not find normal options. Maybe I was looking in the wrong place? ... What would not be expensive, and you could fasten it to your existing blinds. After thinking about it at my leisure, I came to the conclusion that there is nothing complicated here, and you can do everything yourself.

And so, on the one hand, the topic is for those who have a great desire to get electric blinds, and on the other hand, there is the ability to work creatively with their hands

What we have?
Classic aluminum blinds. I have a three-leaf window, which means there are 3 blinds.

Like most similar blinds, the control here is implemented according to a simple classical scheme: pull the rope - raise the blinds up, twist the plastic stick (in one direction or the other) - the blinds open or close by turning.

Here actually there are variations of needs. The electric drive can be made to raise the blinds up. Or on turn of shutters (opening and closing). You can, of course, do both at the same time. Since in everyday life I most often use the mechanism for turning the "blades" when opening or closing a window, it was decided to make an electric drive for this.

I want to say right away that the implementation of the idea of ​​\u200b\u200bhome-made motorized blinds does not limit your imagination. You can make control from the remote control, control by an external light sensor, a motion sensor, you can make automatic work on a timer (for example, the blinds close in the evening, open in the morning). And all this can be done almost at a simple, everyday level. You can use a regular timer that controls the outlet. Regarding the remote control from the remote control, you can also use numerous devices that are stuck between the outlet and the consumer, controlled remotely. These are now sold by the sea and they are not at all expensive. All this will be connected in an elementary way.

I personally do not need a wireless remote control. The wired remote, standing on the table near the computer, will completely triple me. I also don’t feel the need for a timer (at least for now). So in my review I will describe the implementation of "motorized blinds" for myself. Although there can be a lot of automation options here, of course. And not at all for the crazy money that all this is now on the market.

So:
The main idea was to create a mechanism that would not damage the blinds themselves and their design. I don't like ruining good things, so I was guided by the principle of making as few changes to the blinds as possible. I did it with an eye to the fact that it would be possible to disassemble everything and return the blinds to their original state.

The main center for the implementation of the idea are the motors. Having studied a little on EBay, I found all kinds of "motors" for sale for every taste. The main thing here is to buy a motor with a gearbox. This will allow, on the one hand, to choose (when buying) any required shaft rotation speed, and on the other hand, the rotation force will be sufficient to rotate the blinds handle.

Having estimated how many revolutions the shutter handle makes to open or close them, I settled on a motor with a shaft rotation speed of 15 revolutions per minute (in general, it could have been taken faster). The supply voltage is 12 volts. Looking for such motors on EBay is very simple. There are options with different rotation speeds. Everyone will be able to choose what they need.
In an EBay search we write: Motor 12v 15rpm(rpm - shaft rotation speed).

3 motors worth $ 13 apiece were bought and soon came to me from China.

It is very important that the motors are reversible. This means that when the polarity is reversed, the shaft can rotate in the opposite direction. Not all motors can do this. If you find it like in my photo, you can safely take it. They come in 15, 20, 30, 50 rpm, etc. and look the same on the outside.

Day of work and you're done! HOORAY!
You can lean back in your chair, drink coffee, who smokes - smoke

Video how it all works. The length of the cable at the remote control is 10 meters. The video can be viewed in HD quality directly on YouTube.:


Thank you for your attention to my review.
I will answer questions.
If you have other ideas / options for the implementation of electric drives for classic blinds, write, it will be interesting.
In my personal opinion, the designs that allow you to motorize any available blinds are of the greatest interest, and not buy some special models for a specific drive.

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. Simple, modular, easily repairable, compact solution outweighs the savings on matches. 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 (that is, it can be turned in small “steps” to the desired angle or the desired number of revolutions) combined with a 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 how much exactly the 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 has 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, better block overclock the power supply by 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 operation, DTR will need to be disabled, otherwise it will hang like that, 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 are no accusations of hating me for mother tongue(although at school I really didn’t like him very much and got 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 he already knows the password for your wireless network, and he 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).

We lay the power wires along the inside of the sash. 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 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 the 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 full-length glass, 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 work Scheduled. Something else, I don't remember. Then there are thoughts for giving an autonomous power supply, where 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

Electric blinds can be made by hand. Initially determine the size of the curtains. To do this, you need to measure the window frame or sashes. The length of the blinds must match the parameters of the frame. It is allowed to increase this indicator for curtains (compared to the frame) by 8-12 cm. You will need to leave 2 cm for allowances. The width of the blinds should be equal to that of the frame.

Main works

Do-it-yourself curtains with an electric drive are made using a fabric, a stapler, a tape measure, a level, an electric screwdriver. The next step involves cutting the fabric. You will need 2 patterns - for the inside and for the front side. The segments are connected inside out and sewn together. The curtain rolls out. The resulting gap is sutured and smoothed. Experts recommend using a fabric of the same color.

Types of blind drive control.

Blinds are attached to wooden beam, the length of which should be 1 cm less than the width of the curtain. To do this, the fabric is spread on a flat surface (wrong side up). An indent of 5 cm is made from above. Then the finished beam is laid. The support is wrapped in fabric. Wood and canvas are fixed with a stapler. In order for the rail to pull the curtain, you will need to make a pocket for it. The edge of the canvas is wrapped by 3 cm. The beam is threaded into this pocket.

To raise / lower the blinds, an electric drive is used. You can buy it ready-made or make it yourself. The last method involves the use of an electric screwdriver, a bit, an extension cord for bits. Initially, the screwdriver is disassembled. It is powered by 3 A4 batteries. The battery compartment is disconnected, the power wires are extended by 2-2.5 m. The electric motor and gearbox need to be finalized. This is due to the fact that the main drive will need to be installed in a narrow window space. In this case, the refinement of the device is associated with the shortening of its body.

Back to index

Motor selection rules

Device roller blinds with electric drive.

The drive is easily connected to the curtain with your own hands. A bit extension is provided in the appropriate gland. The first element is installed in the end face of the winding housing of the blinds. Remove the stock cap first. This procedure is performed in such a way that the gland is tightly fixed at the end.

The device is mounted to a construction bracket fixed to the frame. Initially, the electric drive for curtains is fixed with ties. Then the fasteners are replaced with brackets. If the engine is installed, mount the blinds in a horizontal position.

You can control the operation of the structure using a reversing switch located on the power supply.

You can make blinds with an electric drive, presented in the form of a motor with a gearbox. When choosing the last unit, the speed and force of rotation of the shaft are taken into account. Experts recommend buying for this purpose motors with a shaft rotation speed of more than 15 rpm. The voltage of the reversing unit must not be less than 12 W.

With the modern pace of life, you always want to return to a pleasant and comfortable home, which soothes with its warmth and comfort, giving new strength and energy. And, just from the interior decoration of the house depends on the appropriate mood and disposition for relaxation.

Windows in the room always occupy a special place in interior design. That is why it is necessary to pay maximum attention to the choice of textiles. In our article we will talk about the use of automatic curtains, their installation and photos.

Advantages of curtains

The decor of windows depends on the tastes and preferences of the owners of the houses, the general interior of the room. And, since our life is closely intertwined with new technologies, it has recently become very popular to use electronic curtains. They are designed for convenience and saving time and effort, which is very important in today's world.

Such curtains are well fenced off from the light and in a matter of seconds create the necessary atmosphere of privacy in the room. Moreover, such a device automatically controls the level of lighting in the room, which is important when the owners are away for a long time.


Automatic roller blinds

Among the variety of models of curtains, Roman and roll ones have become the most popular. Although vertical, pleated or horizontal bamboo curtains are well suited for room decor.

Getting more and more popular roller blinds with electric drive. Their price depends on the material, size, installation complexity, drive and control.

The advantages of such curtains include the rapid darkening of the room or the creation of a comfortable twilight while sitting on the couch. Any windows are suitable for these models, as they are installed on all types of frames. But it would be more expedient to make out large openings or panoramic and bay windows to the floor.

For houses with high windows or a large number of them, for example, in offices, car dealerships, shops, clubs and private high-rise dwellings, the proposed option is simply irreplaceable.

There are two groups of curtains with automation:

  • for outdoor use (rafshtora and roller blinds on the facade of the building). They are installed on windows and doors in order to protect against unauthorized entry.
  • interior models that decorate windows inside the premises.


Electric curtain rods

Such cornices are regulated using remote controls or special switches. Their feature is the ability to repeat any form of walls. Automatic curtain rods are becoming more and more popular and may soon become a worthy replacement for conventional curtain rods. They have a wide range of benefits. For example, the presence of a timer makes it possible to control curtains at a set time.

Some cornices have a built-in light sensor to react to the bright sun, which allows, if necessary, to close the curtains automatically.

Another positive qualities of curtain control systems include the possibility of attaching textiles with any weight, size and structure; silent smooth operation, which is important during the night and rest; long service life with regular proper maintenance.

DIY automatic curtains

If you have the desire and the appropriate materials, you can easily and quickly make all the automation yourself.


First, install the electric drive for the eaves. It must be selected in such a way that it can withstand the weight and amount of fabric. The drive can be covered or left in plain sight - we choose any suitable place.

We organize control through a remote control or a button, for this you need wires. It is also appropriate to set a timer for ease of regulation.

When choosing a drive, you need to take into account its power and reliability due to temperature differences in cold and hot weather. An automotive power window drive is best suited.

We mount on a strong and thin textolite plate. For ease of use of the rope, we fix a corner with openings on the plate.

To the right of the corner we install limit switches. It is necessary to install a pair of plastic tubes on the rope at the point where they will press the switch when they reach the end position.

After that, we do the installation of the drive, putting on it a roller with a drilled groove for the turns of the rope. Then we install metal racks (3 pieces) on the board in order to mount the cover. The drive is fixed with furniture corners.

On the other side of the drive, you need to fix an independent roller, put a rope on it. The opposite ends of the curtains are connected so that they open and close with the help of a motor.


After this, you need to connect the power supply using the power supply to the drive motor. The regulation is done with a relay. It is necessary to install stabilizers to check the power supply of the regulated part of the electronics.

The display of the drive operation is set using red and green LEDs. In the event of an error, the red light starts blinking, and if voltage is applied to the engine, the green light will turn on.

The entire electronic structure is placed in a plastic container with openings for switches and LEDs. The function of the first switch is to convert to automatic mode, the second switch is to turn off the power. For the LED, you need to pick up a white cap, this will increase its visibility from anywhere in the room.

Photo of automatic curtains

Curtains with electric drive and remote control have long ceased to be a luxury. They are found not only in public institutions - cafes, offices, cinemas, where simultaneous control of a large number of windows is necessary, but also in houses and apartments.

In this article, automation for curtains is considered in detail. You will learn what types, how the remote control of the curtain takes place and what advantages and disadvantages such mechanisms have.

General information about curtains with remote control

Curtains on the control panel - products, the adjustment of the position of the panels of which occurs in automatic mode due to the electric drive built into the eaves and the remote control with which the user sends commands to the motor.

The mechanized curtain control system is a functional element that significantly increases the comfort of using a window curtain. Such designs are not necessary when decorating windows in small rooms with standard openings, however, there are cases when electric curtain rods are necessary. Let's highlight the main ones:

  • When designing bay windows and panoramic windows, it is problematic to control the curtain on which manually due to its size;
  • At high window openings;
  • With difficult access to windows due to furniture or features of the layout of the room.

Electric curtain rods are appropriate in rooms with several windows - they are connected to a common control panel and all curtains are opened by pressing one button. Controlling curtains from the remote control is the hallmark of a smart home, so if you plan to add modern technologies, it makes sense to start with the installation of electric curtain rods.

All electric curtains on the remote, depending on design features eaves, are divided into two groups - sliding (horizontal) and lifting (vertical).

The group of lifting structures includes the following types of curtains:

  • Pleated blinds;
  • Roman curtains;
  • Roll products.

Standard functionality remote controls have 4 buttons:

  1. Deployment (opening) of the canvas;
  2. Collapse (closing);
  3. Stop moving the curtain;
  4. A programmable button that allows you to remember the position of the curtain and move it to a predetermined position with one touch.

Many people have a prejudice that such mechanisms break down quickly and have a short service life. In fact, the situation is the opposite - the products are designed taking into account the maximum possible number of cycles of work, with proper operation, they work for 5 years or more.

The advantages of electric curtains include:


httpv://youtu.be/KoCTniq7ZE0

We also note an increase in the service life of curtains equipped with an electric curtain rod - you do not have to touch the fabric with your hands, it will not get dirty and will retain visual appeal for a longer time.

When buying a quality product from a trusted manufacturer, you will not encounter any shortcomings, however, cheap Chinese automatic curtains often “please” their owners with their unwillingness to work normally and unexpected breakdowns.

So when choosing automation, do not save money - give preference to a reliable and high-quality electric cornice and the result will fully satisfy you.


close