Navigation

    • Register
    • Login
    • Search
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. slarti
    3. Best
    • Continue chat with slarti
    • Start new chat with slarti
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups

    Best posts made by slarti

    • [contest] Yet another servo blind control project

      Hello all.

      POST UPDATED 13.2.2015

      UPDATE 2: Noticed there's a competition going on and as I think this project qualifies, I'm entering it. So there.

      I've been following this site for a while now and finally decided to register and share my little project.

      I've had a Vera for ages which I've been using for my zwave lights. I really wanted to be able to control my curtains and blinds with it as well, but since it's next to impossible to get moderately priced motors for home automation here in Finland, I started exploring DIY solutions.

      I actually thought I had an original idea about using an Arduino and a servo to tilt my blinds but it turned out I'm late to the party.

      Anyways, here's my project so far and why it isn't finished: (edit: It is now...)

      First of all, blinds in Finland are almost always what the Americans call mini-blinds because we put them between the outer and inner windows and they are almost identical everywhere. This means my solution should work for most Finns... 😉

      THE MECHANICAL PART:

      The blinds are adjusted with a rod directly linked to the shaft that tilts the slats.

      IMG_8043.jpg

      This is removed. (Nevermind the dirt.)

      IMG_8044.jpg

      The little connecting springrod needs to removed as well.

      IMG_8050.jpg

      The D-shaft in the middle is the thing the servo needs to move.

      IMG_8049.jpg

      So we need some way to connect the servo spline to the shaft. There are shaft couplers available for servos but they cost about three times as much as the servos! So I swiped an idea from the guys making sail winch servos. Bobbins!

      IMG_8054.jpg
      IMG_8056.jpg

      Needs a little persuasion.

      IMG_8057.jpg
      IMG_8058.jpg
      IMG_8060.jpg
      IMG_8061.jpg

      Cut the coupler with the little set screw from the little springrod.

      IMG_8062.jpg
      IMG_8064.jpg

      I was going to glue this together but I couldn't find any, so I soldered it. Don't know how well that is going to hold.

      IMG_8065.jpg

      I installed the coupler to the opposite side so that the servo won't interfere with the strings used to pull up the blinds. The D-shaft slides with little force.

      IMG_8067.jpg

      I adjusted the slats to where I think they are closed (slat outer edge down). Some people have different views about the matter but they're just wrong 🙂 I didn't attach the servo just yet.

      IMG_8074.jpg

      The servo lined up perfectly in the housing and with the D-shaft after I de-tabbed it.

      IMG_8069.jpg
      IMG_8070.jpg

      After this, I gently disconnected the wires from the servo extension cable connector so I could thread it back through the rod hole. (The string goes through the lower hole in a spring tunnel)

      IMG_8075.jpg
      IMG_8077.jpg
      IMG_8078.jpg

      I put the connector back on the other side.

      IMG_8087.jpg

      ELECTRICAL PART

      UPDATE The finished sensor

      I really wanted to have a physical button to adjust the blinds so I put one in this temporary box along with a 5v pro mini.

      IMG_8032.jpg
      IMG_8031.jpg
      IMG_8034.jpg

      I spliced in to another servo extension cable 5v from a phone charger. (Note to self: don't cut the wires so damn close to the connector!)

      IMG_8035.jpg

      This makes it easy to connect the button box with the servo cable and both are powered.

      IMG_8040.jpg

      The final version will have a DC socket at the junction so I can just run an easily disconnectable plug to every window. The holes are always on the hinge side so the window can be opened even without unplugging. I'll also wrap everything nicely in white heat shrink tubing and the box will be nicer, too.

      THE CODE PART

      This one was/is the most difficult for me because I had exactly zero experience with C++. Or any C. I've used a bit of python and some simple shell scripts but this was new. Anyways, I managed to write this:

      **UPDATE:**This is just test code for use without the Mysensors stuff. Scroll down for working code.

      link text

      Why this is bit complicated is because I wanted the button to do two things:

      • Press once; toggle open/close

      • Keep pressing the button; sweep back and forth until button is released and stop there.

      At the moment it does just that.

      I connected the servo to the shaft once I figured out with the button which way was closed and which way was open. 180 degrees was exactly the difference between open and closed.

      Now some of you may be thinking, "what the hell has this got to do with mysensors?" That's why the title is tagged [WIP]. I've been waiting for my NRF24L01+ -modules to arrive for a month and finally today they arrived.

      And they're not NRF24L01+ -modules.

      BUY YOUR RADIOS FROM THE MYSENSORS EBAY STORE LINK

      IMG_8093.jpg

      They were sold as NRF24L01+'s but they definitely are not. So now I have to wait again.

      Meanwhile, could someone tell me if they see something horribly wrong with this sketch I've been planning to use once I do get the radios? I can't really test it. (This works well now)

      UPDATE: Code is VERY much refactored and improved (works well)
      link text

      Oh yeah, some video:

      link text

      link text

      Sorry for the long post.

      posted in My Project
      slarti
    • RE: [contest] Yet another servo blind control project

      After soldering three ratsnests like the one in the previous post, I decided there has to be a simpler way to do things. So after a day of watching eagle cad tutorials and messing about with the software I came up with a board of my own.

      top_osh.png
      bot_osh.png

      I didn't want to add any stuff I didn't need except for a pin header for raw input, A0-breakout and a choice of 5V/3.3V output for A0 and D4 with a jumper. I also don't want to solder every pin on the pro mini so I can use them possibly elsewhere.

      Am I shooting a fly with a cannon? Do I need something else on the board? DirtyPCB and other chinese manufacturers are closed at the moment but are there alternatives besides OSHPARK?

      BTW, three arduinos and servos seem to be the maximum simultaneous capacity for the little Nokia charger. They all work but get a bit flaky after a few tests. We'll see what happens when I add the fourth 😉

      posted in My Project
      slarti