Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. My Project
  3. DIY Blind Control Motor

DIY Blind Control Motor

Scheduled Pinned Locked Moved My Project
49 Posts 9 Posters 44.5k Views 8 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    naveen
    wrote on last edited by
    #38

    For the next part of my project I'm looking to have two interlocking gears which grab and pull the string in order to slide the vines of the blinds to one side.

    I can attach one gear to the servo, but the other gear would require some sort of bearing? Does anyone have any idea what type of bearing I can use? If there's a name I can search for them on eBay (I assume they are available there).

    1 Reply Last reply
    0
    • korttomaK korttoma

      I really did not put much thought in to the physical setup, I just squeezed it in to as small a box I could. Here is some pictures. Still waiting for some parts to get it mounted.

      I forgot to mention that the "sleep" pin of the driver board is also connected to the arduino to enable the motor to spin freely when it is not being controlled from the arduino. I want it to be possible to use the original cord to open/close the blinds also (WAF).

      WP_20140606_001.jpg

      WP_20140606_002.jpg

      N Offline
      N Offline
      naveen
      wrote on last edited by
      #39

      @korttoma , did you ever try using the accelstepper run() command instead of runToPosition(). From my understanding the run() command is non-blocking and you put it in your main-loop. That way, if Vera sends a new commands you can set it to stop immediately using:

      stop();
      runToPosition();
      

      I gave it a shot and the motor didn't seem to move at all - I'm not sure if you ever experimented with it, thought I'd ask.

      korttomaK 1 Reply Last reply
      0
      • N naveen

        @korttoma , did you ever try using the accelstepper run() command instead of runToPosition(). From my understanding the run() command is non-blocking and you put it in your main-loop. That way, if Vera sends a new commands you can set it to stop immediately using:

        stop();
        runToPosition();
        

        I gave it a shot and the motor didn't seem to move at all - I'm not sure if you ever experimented with it, thought I'd ask.

        korttomaK Offline
        korttomaK Offline
        korttoma
        Hero Member
        wrote on last edited by korttoma
        #40

        @naveen

        Sorry, I have not experimented with other functions than the once I have in my current sketch since it is working according to my needs except for the problem with position updates to Vera I'm having.
        I guess some people would like it if it was possible to use up/down/stop if it is possible with the run() function but I have schedules running my blinds 95% of the time.
        I managed to workaround the position updates to vera problem by using the up/down instead of open/close, I will look in to it when I find some time and then I could check out the run() function too.

        • Tomas
        N 1 Reply Last reply
        0
        • korttomaK korttoma

          @naveen

          Sorry, I have not experimented with other functions than the once I have in my current sketch since it is working according to my needs except for the problem with position updates to Vera I'm having.
          I guess some people would like it if it was possible to use up/down/stop if it is possible with the run() function but I have schedules running my blinds 95% of the time.
          I managed to workaround the position updates to vera problem by using the up/down instead of open/close, I will look in to it when I find some time and then I could check out the run() function too.

          N Offline
          N Offline
          naveen
          wrote on last edited by
          #41

          @korttoma

          I don't know what I was doing wrong before, but I got the non-block run feature working with your code. I have my blinds controlled by XBMC as well, so if I start and stop a movie in quick succession, I want to make sure the blinds end up in the right spot. I've attached the relevant snippets of code below

          void loop(){
          
           if (gw.messageAvailable()) {
            //Serial.print("New message from GW"); 
            // ot new messsage from gw
            message_s message = gw.getMessage(); 
            setRelayStatus(message);
          }
          
          stepper1.run();
          }
          

          and then when you get the message:

          if (message.header.type==V_DIMMER) { // 
               float IncomingControl = atoi(message.data);
           //Serial.print("Message: ");
           //Serial.println(IncomingControl);
           //Serial.println((100-IncomingControl)/100*-1*fullOpenSteps);
           delay(5);
           
           
           float incomingNewPosition = (100-IncomingControl)/100*-1*fullOpenSteps;
          
           stepper1.stop();
           stepper1.runToPosition();
           
           stepper1.moveTo(incomingNewPosition);
           
           
           int IncomingControlSend = IncomingControl;
           gw.sendVariable(CHILD_ID, V_DIMMER, IncomingControlSend);  
            
          }
          
          1 Reply Last reply
          0
          • hekH hek

            @naveen

            Yes, it is possible! You have a couple of options.

            ##Poll configuration data from node

            • Select one of V_VAR1, V_VAR2, V_VAR3, V_VAR4, V_VAR5 to use for your configuration;
              choose from your root or child nodes. You can use all five parameters per each of your root and child device. It is up to you how to design this;
            • Program your sketch to fetch variable from vera using gw.request(). You will have to take care to get reply later by yourself using in your callback method initialized in gw.setup(). See RelayActuator sketch for an example on how to handle incoming messages.
            • First run of your modified sketch to request parameters. Be prepared that you will receive an empty string because at this time we have just created empty variables at vera side;
            • Refresh your vera and go to particular child into Advanced Tab. You should be able to see your new variables named Variable1...Variable5. Variable1 corresponds to V_VAR1 inside your sketch etc.;
              fill free to change empty field on vera side to the value your needed, Save changes; forcase1.jpg
            • Check with you Arduino, it should receive correct data at this point;
            • You free to use whatever design you want. You can pull/request data at each start of you node or you can pull each 30 minutes like many z-wave devices do if they operate from battery. Other example can be if you need for your to nodes to communicate to each other and you need to tell a radio ID to one/both nodes to establish their communication. But for this one you probably want to use Push...

            ##Push configuration data from Vera to node

            Example: You need to push data from vera on event or using schedule and it should be initiated instantly by vera, not by node. For example you want your clock to show external temperature received by vera from the Weather plugin or from other sensor.

            forcase2.JPG

            • Choose from V_VAR1, V_VAR2, V_VAR3, V_VAR4, V_VAR5 to be used for data push

            • Design your sketch to listen for incoming messages with desired variable. See RelayActuator for an example on how to handle incoming data.

            • Create a new scene on vera side. The scene should be run according to your goal. For example each 10 minutes;

            • Use Lua tab while editing scene to provide data for the push. For example this Lua is taking current temperature from Weather (vera id = 61) plugin and pushing it to the node (vera id for root device = 372) using VAR_5:

              local temp = luup.variable_get("urn:upnp-org:serviceId:TemperatureSensor1","CurrentTemperature", 61)
              temp = temp*10.0
              luup.call_action("urn:upnp-arduino-cc:serviceId:arduino1", "SendCommand", {radioId="4;255", variableId="VAR_5", value=temp}, 372)

            SendCommand will push a message to your node. You can also call it with static values (without programming) using the Advanced tab in the scene editor.

            (This post was updated to 1.4 from from @axillent old tips page on micasaverde)

            N Offline
            N Offline
            naveen
            wrote on last edited by
            #42

            @hek said:

            @naveen

            Yes, it is possible! You have a couple of options.

            ##Poll configuration data from node

            • Select one of V_VAR1, V_VAR2, V_VAR3, V_VAR4, V_VAR5 to use for your configuration;
              choose from your root or child nodes. You can use all five parameters per each of your root and child device. It is up to you how to design this;
            • Program your sketch to fetch variable from vera using gw.request(). You will have to take care to get reply later by yourself using in your callback method initialized in gw.setup(). See RelayActuator sketch for an example on how to handle incoming messages.
            • First run of your modified sketch to request parameters. Be prepared that you will receive an empty string because at this time we have just created empty variables at vera side;
            • Refresh your vera and go to particular child into Advanced Tab. You should be able to see your new variables named Variable1...Variable5. Variable1 corresponds to V_VAR1 inside your sketch etc.;
              fill free to change empty field on vera side to the value your needed, Save changes; forcase1.jpg
            • Check with you Arduino, it should receive correct data at this point;
            • You free to use whatever design you want. You can pull/request data at each start of you node or you can pull each 30 minutes like many z-wave devices do if they operate from battery. Other example can be if you need for your to nodes to communicate to each other and you need to tell a radio ID to one/both nodes to establish their communication. But for this one you probably want to use Push...

            ##Push configuration data from Vera to node

            Example: You need to push data from vera on event or using schedule and it should be initiated instantly by vera, not by node. For example you want your clock to show external temperature received by vera from the Weather plugin or from other sensor.

            forcase2.JPG

            • Choose from V_VAR1, V_VAR2, V_VAR3, V_VAR4, V_VAR5 to be used for data push

            • Design your sketch to listen for incoming messages with desired variable. See RelayActuator for an example on how to handle incoming data.

            • Create a new scene on vera side. The scene should be run according to your goal. For example each 10 minutes;

            • Use Lua tab while editing scene to provide data for the push. For example this Lua is taking current temperature from Weather (vera id = 61) plugin and pushing it to the node (vera id for root device = 372) using VAR_5:

              local temp = luup.variable_get("urn:upnp-org:serviceId:TemperatureSensor1","CurrentTemperature", 61)
              temp = temp*10.0
              luup.call_action("urn:upnp-arduino-cc:serviceId:arduino1", "SendCommand", {radioId="4;255", variableId="VAR_5", value=temp}, 372)

            SendCommand will push a message to your node. You can also call it with static values (without programming) using the Advanced tab in the scene editor.

            (This post was updated to 1.4 from from @axillent old tips page on micasaverde)

            I'm moving on to add another stepper and I need a few more custom variables (4) - is there any way to add new variables? Or is he maximum 5?

            korttomaK 1 Reply Last reply
            0
            • N naveen

              @hek said:

              @naveen

              Yes, it is possible! You have a couple of options.

              ##Poll configuration data from node

              • Select one of V_VAR1, V_VAR2, V_VAR3, V_VAR4, V_VAR5 to use for your configuration;
                choose from your root or child nodes. You can use all five parameters per each of your root and child device. It is up to you how to design this;
              • Program your sketch to fetch variable from vera using gw.request(). You will have to take care to get reply later by yourself using in your callback method initialized in gw.setup(). See RelayActuator sketch for an example on how to handle incoming messages.
              • First run of your modified sketch to request parameters. Be prepared that you will receive an empty string because at this time we have just created empty variables at vera side;
              • Refresh your vera and go to particular child into Advanced Tab. You should be able to see your new variables named Variable1...Variable5. Variable1 corresponds to V_VAR1 inside your sketch etc.;
                fill free to change empty field on vera side to the value your needed, Save changes; forcase1.jpg
              • Check with you Arduino, it should receive correct data at this point;
              • You free to use whatever design you want. You can pull/request data at each start of you node or you can pull each 30 minutes like many z-wave devices do if they operate from battery. Other example can be if you need for your to nodes to communicate to each other and you need to tell a radio ID to one/both nodes to establish their communication. But for this one you probably want to use Push...

              ##Push configuration data from Vera to node

              Example: You need to push data from vera on event or using schedule and it should be initiated instantly by vera, not by node. For example you want your clock to show external temperature received by vera from the Weather plugin or from other sensor.

              forcase2.JPG

              • Choose from V_VAR1, V_VAR2, V_VAR3, V_VAR4, V_VAR5 to be used for data push

              • Design your sketch to listen for incoming messages with desired variable. See RelayActuator for an example on how to handle incoming data.

              • Create a new scene on vera side. The scene should be run according to your goal. For example each 10 minutes;

              • Use Lua tab while editing scene to provide data for the push. For example this Lua is taking current temperature from Weather (vera id = 61) plugin and pushing it to the node (vera id for root device = 372) using VAR_5:

                local temp = luup.variable_get("urn:upnp-org:serviceId:TemperatureSensor1","CurrentTemperature", 61)
                temp = temp*10.0
                luup.call_action("urn:upnp-arduino-cc:serviceId:arduino1", "SendCommand", {radioId="4;255", variableId="VAR_5", value=temp}, 372)

              SendCommand will push a message to your node. You can also call it with static values (without programming) using the Advanced tab in the scene editor.

              (This post was updated to 1.4 from from @axillent old tips page on micasaverde)

              I'm moving on to add another stepper and I need a few more custom variables (4) - is there any way to add new variables? Or is he maximum 5?

              korttomaK Offline
              korttomaK Offline
              korttoma
              Hero Member
              wrote on last edited by
              #43

              @naveen said:

              I'm moving on to add another stepper and I need a few more custom variables (4) - is there any way to add new variables? Or is he maximum 5?

              If you add another stepper to a node you will add another window cover device in Vera right? So shouldn't there be 5 more Variables for this new device right?

              • Tomas
              N 1 Reply Last reply
              0
              • korttomaK korttoma

                @naveen said:

                I'm moving on to add another stepper and I need a few more custom variables (4) - is there any way to add new variables? Or is he maximum 5?

                If you add another stepper to a node you will add another window cover device in Vera right? So shouldn't there be 5 more Variables for this new device right?

                N Offline
                N Offline
                naveen
                wrote on last edited by
                #44

                @korttoma said:

                @naveen said:

                I'm moving on to add another stepper and I need a few more custom variables (4) - is there any way to add new variables? Or is he maximum 5?

                If you add another stepper to a node you will add another window cover device in Vera right? So shouldn't there be 5 more Variables for this new device right?

                I wasn't planning on adding another device. I was planning on implementing the UP/DOWN functionality to control the sliding of the vertical blinds. While the V_DIMMER slider would control the 'tilt'

                1 Reply Last reply
                0
                • korttomaK Offline
                  korttomaK Offline
                  korttoma
                  Hero Member
                  wrote on last edited by
                  #45

                  Ahh, I see. Maybe it is an option for you to add another (dummy) device of some type just to get more variables.

                  • Tomas
                  N 1 Reply Last reply
                  0
                  • korttomaK korttoma

                    Ahh, I see. Maybe it is an option for you to add another (dummy) device of some type just to get more variables.

                    N Offline
                    N Offline
                    naveen
                    wrote on last edited by
                    #46

                    @korttoma said:

                    Ahh, I see. Maybe it is an option for you to add another (dummy) device of some type just to get more variables.

                    That's actually not a bad idea. Seems like a pretty simple solution. Thanks!

                    1 Reply Last reply
                    0
                    • Ø Offline
                      Ø Offline
                      Øyvind A. Espnes
                      wrote on last edited by
                      #47

                      Old thread, but is it possible to clean up enough to make a tutorial on this? All the info is quite confusing to a person who's not as good as you guys :-)
                      Is it also possible to adapt this method into making a door lock?

                      1 Reply Last reply
                      0
                      • N naveen

                        Finally finished my setup, here is a picture. Works pretty well, it is slightly louder than I would have hoped but if you run it at 1/16th microsteps its almost silent. The only issue is that it won't run very fast at 1/16 microsteps.IMG_1795-2.jpg

                        L Offline
                        L Offline
                        LastSamurai
                        Hardware Contributor
                        wrote on last edited by
                        #48

                        @naveen said in DIY Blind Control Motor:

                        Finally finished my setup, here is a picture. Works pretty well, it is slightly louder than I would have hoped but if you run it at 1/16th microsteps its almost silent. The only issue is that it won't run very fast at 1/16 microsteps.IMG_1795-2.jpg

                        Sorry, I know this topic is quite old, but where did you get that wheel (that translates motor force to the chain)? I was thinking about building something similar and thats my main problem.

                        Looks 3D printed as well as the holder (I really have to get a 3D printer ;) )..

                        1 Reply Last reply
                        0
                        • N Offline
                          N Offline
                          naveen
                          wrote on last edited by
                          #49

                          Yep, both were 3D printed back then. The Toronto library actually has 3D printers so I built a CAD model and had it printed there. There are also have a lot of web-based companies who will print and ship out parts.

                          Since then I've built my own 3D printer, it comes in handy and they're getting pretty cheap.

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          14

                          Online

                          11.7k

                          Users

                          11.2k

                          Topics

                          113.0k

                          Posts


                          Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • MySensors
                          • OpenHardware.io
                          • Categories
                          • Recent
                          • Tags
                          • Popular