Automated Window Blinds - Spark Core

You have it working @keithcroshaw ! Congrats, now you just need to mount and you are ready.

I’ve been watching this thread and I’m pretty excited that people are getting this up and running. It’s not for the average user and takes a decent amount of DIY. It looks like there may be some code I need to redo in both the device type and possibly on the photon/spark side. @hawesg can you branch your changes off and I can fold them back into the main branch after testing. I should be able to dive a little more into making this an end to end piece as well. I would like to put together an app that would open and shut the blinds based on weather conditions from an IFTTT weather button I have created and also based on the time of day (i.e. 3 hours before sunset close the blinds/30 minutes before sunset open the blinds). Sorry I haven’t interacted too much with this thread but life and a home theater build took over. The home theater should have some photon rgb goodness built in that I will post about later.

1 Like

What’s the particular model of the servo you are using and what’s its torque rating?


I’m actually interfacing with the twisting mechanism where the rod typically is so very little torque will be required. But on another not I have used this servo directly rotating the rod in an older project.

Funny you contacted me, I used SmartTiles.click to test this and it wouldn’t issue the “off” command. It’s setup as a switch, any ideas why? (It kept issuing the On command, ST app worked fine.)

Code:
https://github.com/keithcroshaw/repo/blob/master/Particle%20Photon%20Blinds.groovy

2 Likes

No, sorry. I don’t see how “off” is different.

@jjhtpc I forked and created a pull request. I’ve also made up a quick schematic and board.


I’ve made a more permanent prototype I’ll upload a pic at some point.

3 Likes

@hawesg I have merged the pull. Thanks for the code cleanup it was needed.

Oh and for all of those interested. As promised:

1 Like

Oh good, it occurred to me that people style code differently, I wasn’t trying to change your style I just find working on code formatted differently than what I’m used to disorientating. I was going to go through it and add the line breaks but this is easier :smile:

1 Like

I got my Spark Photons and Futaba S3003 servos all hooked up and controlled through SmartThings. Can someone help me with clarifying a few things? In the “edit device” menu on the app, there are a few parameters, namely “Open Threshold”, “Open”, and “Closed”.

Also, how is this related to the Spark code:

int open=0;
int closed=150;

Thanks!

1 Like

All done! Gonna try to get all the other windows up and running this weekend.

3 Likes

Very awesome! If only I could get my butt in gear.
Kudos!

Any shots of the guts?

1 Like

Thanks! I just have the Photons on the breadboard like yours. For the servo mount I will have them 3D printed for my other windows but the one you see in the video is actually built with Legos. Works surprisingly well and can be adjusted to fit the space it has. I will post images when I get home later.

Wow I didn’t think about that but I should totally prototype with legos, drill out where I need stuff to go and hand the final working monstrosity to my friend with a 3D printer.

Good idea!

How did you do servo to shaft coupling?

@625alex I used shaft coupler. But unfortunately the opening for the one I bought was wider than the rod that my blinds used. I hacked it together by placing server and the mount in place and added JB Weld and let it set. Any industrial strength bond would work. It’s definitely strong enough, but for my remaining installations I am still searching for the perfect sized shaft coupler with set screw so that I can tighten it to the rod without the need for any adhesive.

I will post pictures of my setup soon.

1 Like

:))) it is our first ever-ever-ever prototype :slight_smile:

1 Like

I found that the servo torque might not be enough using your method which is why I attached it directly to the rod. Let us know how your method works out.

Here ya go. Legos!

2 Likes

Sorry for the bajillion questions but…

  • Where do you guys get your couplers?
  • Are there ones that fit straight to the square shaft or could one be 3D printed?
  • Are you using the PWM output to control the servo?
  • How much torque does the servo require to be able to turn the blinds reliably without getting ‘jammed’?
  • How noisy are the servos and are there any super quiet ones?

New to all of this! Sorry!

1 Like

I got mine from servocity.com. Have to match the make of the servo.

The only answer I know is it uses the servo library so you don’t have to think about it. I think that does pwn.

And any full size servo should the job. Probably not the micros.

And they’re a tad noisy but they only actuate for what 3 + 3 seconds per day, so I can’t imagine who would be bothered by that for the price.

1 Like

Okay thank you! Looks like the Futaba S3003 has been used which is about $10 from Amazon themselves so I’d be shocked if they were fake and $10 is cheap!