Introduction: Roller Blind Controlled Via Web Browser With CORE2 and RPi
Make my roller blind move
We think it is boring to open and close again and again roller blinds. It is simple to add some motor to make it move, but we want to control it via internet, so we decided to use Core2, because it provides IoT features in easy way. We wanted to create user-friendly DIY mechanism for roller blind, so we designed 3D printed elements.
Step 1: Assembly
The elements of the enclosures are 3D printable and available on github here. The other components are listed above. When assembling mechanism to your roller blind window, follow this instructions:
1. Put DC motor in the "Roller_Motor_Enclosure" part and tighten it with two M3x6 screws.
2. Close the motor with "Roller_Motor_Enclosure_Bottom", make sure that the wires are outside the box and tighten it with two M3x10 screws
3. Attach "Roller_Shaft" on the motor's shaft and tighten it with M3x6 screw.
4. Wrap a string of a roller blind on the shaft and cover it with "Roller_Shaft_Enclosure", then tighten it with two M3x30 screws.
5. Put microswitch in the "Roller_Endstop_Enclosure" and cover it with "Roller_Endstop_Enclosure_Top".
6. Solder some wires to the "C" and "NC" connectors of the microswitch, make sure you can plug it to the CORE2 hSens1.
7. Close the loop of the string and attach motor mechanism, so the string is tight. Then attach the endstop mechanism on the top of the frame of the window. The glue or the tape is the best option. Optionally you can cover screws with "Roller_Hiding_Screw" elements.
Step 2: Circuit Diagram
Everything we need to program the device via Husarion Cloud is described on the Husarion's webpage:
We have chosen option with Raspberry Pi 2, because we have one. It is also possible to connect Core2 with popular ESP8266 as you can see on their site.
1. Connect Raspberry Pi to the RPi connector as described on the documentation here.
2. Connect microswitch to the hSens1 port: normally closed pin ("NC") to the pin 1 and common pin ("C") to the GND (hSensor description).
3. Connect DC motor to the hMotC port following documentation from Husarion's webpage (hMotor description).
Step 3: Program
It is unusual, how programming CORE2 is convenient with its Husarion Cloud. We can leave any USB cables, it is programmed and then could be controlled through wifi, and we were surprised, how easy it is.
2. Use our code and web user interface, it is open-sourced. Modify power of the motor, direction, length of the window or anything you need as you want.
3. Program CORE2 using Husarion Cloud and control it via web browser.
The code is available here on github.
Step 4: Results
Finally you can check if it works. We present to you our roller blind on rough and ready window and attached mechanism controlled via web browser in a phone.
We think about expanding our app with weather informations and connecting more roller blinds. Every time you turn on the device (or reset) it calibrate itself autonomously: roller blind goes up to the endstop.