Automate an ikea blind

Automate an ikea blind

thingiverse

I have an IKEA roller blind that I wanted to automate. This is my (so far) final version and works really well. I'm not providing all the info, but what I don't supply is easy to work out. Remove all the insides from the roll-up mechanism - its a long coiled spring about 35 cm long. Print the parts (not the gearbox) Glue the sleeve onto the motor (you will find it on eBay etc, I went for a 60rpm version, but there are other options - they are about £8 (UKP) At the back of a sleeve, is a place to glue a hall effect sensor, this is optional but will allow you to integrate the system with your home assistant using the code below. You will need to glue a small magnet inside the roller blind, the one I used was 5mm diameter and 0.5mm thick. I use some ethernet cable to wire the three connections from the hall effect sensor and two motor connections. I used a 12v power supply with a L298N motor driver and a D1 Mini Arduino board. I used esphome to upload the following code. The wiring is obvious and straightforward (please contact me if you have any questions) I've uploaded the basics in case anyone wants to give it a go - its a rough and ready upload - I've got more playing to do and don't want to spend all day editing a post! Code: (havent used markdown, but copy and paste into a code editor and it should be obvious) esphome: name: office_blind platform: ESP8266 board: d1_mini_lite wifi: ssid: "your wifi" password: "your password" # Enable logging logger: # Enable Home Assistant API api: ota: globals: - id: counter type: int restore_value: no initial_value: '0' - id: direction type: int restore_value: no initial_value: '0' - id: length type: int restore_value: no initial_value: '15' binary_sensor: - platform: gpio pin: number: D2 mode: INPUT_PULLUP inverted: yes id: pulse_r1 internal: true on_press: - lambda: !lambda |- if(id(direction) == -1) { id(counter) -= 1; id(mtr_1).turn_off(); id(mtr_2).turn_off(); id(direction) = 0; } if(id(direction) == 1) { id(counter) += 1; id(mtr_1).turn_off(); id(mtr_2).turn_off(); id(direction) = 0; } if(id(direction) == -2) { id(counter) -= 1; if(id(counter) <= 1) { id(direction) = 0; id(mtr_1).turn_off(); id(mtr_2).turn_off(); ESP_LOGD("main", "Reached the top."); } } if(id(direction) == 2) { id(counter) += 1; if(id(counter) >= id(length)) { id(direction) = 0; id(mtr_1).turn_off(); id(mtr_2).turn_off(); ESP_LOGD("main", "Reached the bottom."); } } ESP_LOGD("main", "Counter = %d", id(counter)); switch: - platform: gpio pin: number: D3 id: mtr_1 interlock: [mtr_2] - platform: gpio pin: number: D4 id: mtr_2 interlock: [mtr_1] - platform: template name: "Down" icon: "mdi:axis-z-rotate-clockwise" turn_on_action: - lambda: !lambda |- if(id(counter) < id(length)) { id(mtr_1).turn_on(); id(direction) = 1; ESP_LOGD("main", "Rotating clockwise"); } - platform: template name: "Up" icon: "mdi:axis-z-rotate-counterclockwise" turn_on_action: - lambda: !lambda |- if(id(counter) < 0) { id(counter) = 0; } id(mtr_2).turn_on(); id(direction) = -1; ESP_LOGD("main", "Rotating anti-clockwise"); - platform: template name: "Top" icon: "mdi:arrow-up-bold" turn_on_action: - lambda: !lambda |- if(id(counter) >= 0) { id(mtr_2).turn_on(); id(direction) = -2; ESP_LOGD("main", "Moving to the top."); } - platform: template name: "Bottom" icon: "mdi:arrow-down-bold" turn_on_action: - lambda: !lambda |- if(id(counter) < id(length)) { id(mtr_1).turn_on(); id(direction) = 2; ESP_LOGD("main", "Moving to the bottom."); }

Download Model from thingiverse

With this file you will be able to print Automate an ikea blind with your 3D printer. Click on the button and save the file on your computer to work, edit or customize your design. You can also find more 3D designs for printers on Automate an ikea blind.