Automated Window Blinds - Spark Core

Cool. Be sure to post. That’s were I’m stuck, mounting.

1 Like

Maybe too much of a hack but the Legos have been working out well. I 3D printed a mount that fits it exactly, but there are so many different blinds out there that there is no one size fits all.



3 Likes

If it Works, it Works! I may actually give this a go if my current mounting ideas prove to be to difficult. No need to overcomplicate mounting when it is all hidden inside the rail.

I’m also on the path of mounting the photon with servo for some of my wood blinds.
I was able to get it to work on my desk, thanks everyone who contributed to this post.
I hope we can update the original spark core code to include some additional improvements.

Some things I was wondering about:

  • Currently torque is maintained on the servo after providing some input to change position. What would be the best way to relieve the torque so that the cords can be used in parallel with the motor?

  • What’s the best route for slowing down the velocity of the servo for going from position open to closed? This would make the noise level much lower.
    For slowing down the servo I used a for loop to slowly increment/decrement the position:

current_state = myservo.read();
if(current_state <= state){
for(pos = current_state; pos < state; pos += 1){  // Goes from current to req. state in steps of 1
    myservo.write(pos);              
    delay(10);
 }
} 
else{
for(pos = current_state; pos > state; pos -= 1){  // Goes from current to req. state in steps of 1
    myservo.write(pos);              
    delay(10);
 }
}

Yeah I also had the same issue with the original code referencing to PIN7.
On the Photon, Servo can be connected to A4, A5, WKP, RX, TX, D0, D1, D2, D3

I have been wondering this as well - but for a different reason: so that the buzzing would stop. @keithcroshaw had a solution for this but it is beyond my limited programming skills:

[quote=“keithcroshaw, post:116, topic:5681, full:true”]
Yea, all you need to do is digitalWrite(HIGH) the control pin when you want to send power through the resistor to the servo then digitalWrite(LOW) when you want it to stop. Maybe put a delay after the position command, try to time it to see how many seconds it takes to go each direction then turn it off.
[/quote].

1 Like

For a software method you can use the detach() [servo1.detach()] method to remove the power to the input pin. The drawback is next time you turn it on the servo starts from position 0 (reset position).

I attached everything to my blinds and gave it a test run but it seems the Futaba S3003 doesn’t have enough torque. The shaft seems to snag in some positions, probably due to the cord mechansim. I tried lubricating that portion with some household oil but it didn’t help too much.

This is too bad because I purchased two shaft couplers already that attach to this motor…

1 Like

Futaba and Hitec both make very nice high torque servos. They are fairly beefy for large scale model aircraft. Make sure you get the ball bearing version.

I’ve been interested in motorizing the tilt of my horizontal binds and integrating it with my SmartThings system. I’ve been following this and other Somfy related threads to get configuration and installation tips and ideas. After reviewing the Somfy solution - purchasing the tilt motor ($200 - one per blind), a remote ($35 - $200 depending on model and the cheapest only controls one motor) and an RTS-Z-Wave interface module ($250+ you only need one), I determined that the total cost to automate my 1st floor alone approached $2500 for the materials alone. Double that amount should I want to motorize the blinds on the 2nd floor. As we stepped back to look at it, the $5K in materials cost (plus installation) to save me the 3 seconds/window it takes to manually tilt the blinds myself seemed - wasteful. For some, it may be a great investment but not for me.

It was this Spark Core/Particle Photon solution that interested me the most. It seems to fit my use case to automate the tilting of the blinds on sunrise/sunset and/or as a result of being triggered by routines or SmartApp commands. The price point per window was also attractive. Finally, I have a passion and interest in DIY and this solution seems to fit that bill!

So, as a proof of concept for my home and use case, I’ve ordered the following for installation/testing on one window:
From ServoCity.com

  1. (FUTM0043) S3010 Servo, QTY: 1 (@frayes mentioned the S3003 doesn’t have enough torque, so I opted for a model with a bit more)
  2. (605136) 170 Point Breadboard, QTY: 1
  3. (525136) Futaba (25T) Servo Set Screw Shaft Coupler (1/4 inch), QTY: 1

From Sparkfun.com (I used them vs. store.particle.io because shipping was cheaper)

  1. Particle Photon (Headers), QTY: 1

The ServoCity order has already shipped, but no word yet from Sparkfun. I hope to receive all the materials by this coming weekend so I can assemble and test my setup. I hope to document well my journey and post successes, failures, and questions as I progress.

I do have one question for this Community:
Because I do not yet understand the capabilities of the Photon, would it be possible for it to control the actions of two servos? I have several windows that are next to each other. It would certainly be helpful if one control device could manage one, if not more servos and hence one Photon could operate two or more blinds.

3 Likes

Yes it is pretty easy in fact. You would just need to have two lines of writes, one for each servo. As long as you do this sequentially you should not have power problems either.

Thanks, @jjhtpc! I"m going to order another servo motor today. I’ll test the one-to-one relationship first then try your suggestion for the one-to-many servo. Let the adventure continue! :smile:

Exciting! Please keep us informed.

1 Like

This is a great idea! This could probably be done using an Arduino and Smartthings shield too.

1 Like

Yes this absolutely could be set up with arduino and a shield. The particle photon is just a cheaper all in one solution. Of course the advantage of the shield would be z-wave which does not introduce the particle stack to the communication path for a command. That said I have rarely had a problem with SmartThings to particle, and between blinds and led strips I have 10 particles in my setup with my 3 more coming soon for kitchen under cabinet lighting. (That project can be seen here: Particle Photon/Spark Core RGB WS2812B
)

1 Like

That’s a good point about the price. The Photon is also smaller too so it would be easier to hide.

Hello All!

First off I want to say thanks to everyone working on this great project! This has inspired me to take a stab at it. I have been working with an Arduino Uno, Smartthings Shield, and a Futaba S3003 servo.

I am very new to this entire code writing thing… This is my first project so I have been doing a lot of reading and watching videos. I have even been on UpWork, hiring people to help me with code writing. So far I can see the shield in my system. I have downloaded some code that someone on Upwork help write. I have also downloaded code to the Arduino… When I hit the switch the servo moves but doesn’t do what i’m wanting…

So I ordered a complete starter kit for the Arduino and Im going to keep experimenting until I get it right.

Since I have read this post, I have also ordered the Photon unit and Im going to give it a try as you all have already created the code.

If there is someone out there that has the time and woudl like to help me with the Arduino/Smarthtings Shield, I would be very grateful.

Hers some photos of what I have.

Hello and welcome! For future reference you can just edit your original post to update it. Have you looked at the code that’s been posted throughout this thread?

They are mostly on the “Spark” platform but the code is similar. Although the SmartThings shield makes it a bit different.

Bottom line. Post what you have if you want help. Get a GitHub account and upload your code there, then link it here.

Thanks!

I have read this entire thread and have looked at the code… But to be completely honest, I have no Idea what im looking at. Its all gibberish to me right now. Im still trying to figure this all out… I have a book and Im going to study up on a few things.

I did order the Photon and it arrived today. So im going to try what you all have already made. Ill let you know how it goes.

I did start a GitHub account. I haven’t messed with it much yet but Ill look around and figure out how to link it here.

Thanks again!