Automatic Blinds on Arduino



    The idea of ​​automating blinds was born in my head for a long time. This was particularly promoted by the specific arrangement of the windows of my room: after lunch, bright sunlight shines through my windows, interfering with computer work and discouraging any desire to engage in productive activities. At the same time, being in a room with closed shutters is a dubious pleasure, in my opinion. I wanted to get a system that allows you to automatically change the angle of rotation of the wings, depending on the intensity of sunlight, as well as having the ability to manually control from a remote control.

    The first task was to automate the flaps themselves. A turning motor and a sensor are needed that will show in what position the shutter flaps themselves are.


    The main obstacle to installing the engine was a regular worm drive for changing the angle of rotation of the wings. Its presence blocked the possibility of internal installation of the motor, while placing the engine outside, in place of the standard handle, was also very difficult. In the end, it was decided to completely dismantle the manual mechanism and install the motor in the inner part of the blinds.

    The engine was used GM12-N20VA Micro Geared Motor gear motor:

    This engine has the following characteristics:
    • Operating voltage: 2 - 5 V
    • Rated voltage: 5 V
    • Gear Ratio: 100: 1
    • No load speed: 145 rpm
    • No load current: 40 mA
    • Speed ​​under load: 100 rpm
    • Current under load: at least 150 mA
    • Torque under load: 0.2 kg / cm
    • Lock Current: 520 mA
    • Torque: 0.78 kg / cm
    • Size (L x W x H): 24 x 12 x 10 mm
    • Output shaft: D-shaped, d = 3 mm, length 10 mm.


    The motor output shaft itself turned out to be slightly smaller than the hole in the blinds mechanism, therefore, to ensure a tight connection, heat shrinkage was soldered to the shaft.


    To control the motor, I used a fairly common, and long-established, L293D dual-channel engine driver chip.


    A motor is connected to the outputs Output 1 and Output 2 of the microcircuit, depending on the signals on the legs of Input 1 and Input 2, the motor rotates in one or the other direction, similarly for the second channel.

    With the position sensor, everything was not as simple as I had previously expected. Of all the options for its design, I settled on a potentiometer mounted on the same axis as the motor, which was subsequently connected to the ADC of the controller.


    To my surprise, there were fewer problems with the light sensor. I used a solar panel removed from an inexpensive LED flashlight purchased at a hardware store. The flashlight cover itself served as a good case.


    For remote control, I used the TSOP31236 IR receiver with a remote control from the Master KIT kit, but in this case, you can use any other.


    The whole scheme is as follows:


    Depending on the data received on the ADC from the light sensor, the shutter louvers move to one position or another, while the current position of the shutters is controlled by a sensor, which is a potentiometer connected to the Adruino analog input.

    To work with the IR remote control, I did not invent a bicycle and used the already-prepared IRremote library .

    Here is the actual video illustrating the work:


    Due to the lack of sunny weather, the sensitivity of the sensor has been reduced.

    In the future, I would like to transfer the system to a more “serious” microcontroller, place all the elements compactly, on one printed circuit board and hide it in the case.

    Also popular now: