Você está na página 1de 9

Food

Living

Outside

Play

Technology

Workshop

A solar tracking automatic motorized window blind retrofit using Arduino


by nickzibin on January 26, 2014

Table of Contents
A solar tracking automatic motorized window blind retrofit using Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Intro: A solar tracking automatic motorized window blind retrofit using Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Step 1: What is 'good' shade position? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Step 2: List of Supplies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Step 3: Assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Step 4: Code Explanation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Step 5: Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

http://www.instructables.com/id/A-solar-tracking-automatic-motorized-window-blind-/

Intro: A solar tracking automatic motorized window blind retrofit using Arduino
Buildings account for 20-40% of total energy use in developed countries. Window shades (or blinds) can help to reduce building energy use and improve visual comfort
(i.e., reducing glare and increasing daylighting). A recent study showed that occupants are fairly inactive when operating manual roller shades (OBrien et al. 2013)
which could lead to increased visual discomfort and increased heating and cooling energy use. With aspirations to address issues associated with human inactivity I
created an automatic motorized roller shade.
The motor moves the shade position depending on the of the location of the sun and the illuminance (i.e., amount of light) hitting a workplane (e.g., your office desk or
kitchen table).
One of the best parts of this instructable is that you do not need to purchase a brand new roller shade to make this work. I will demonstrate how to retrofit an existing
manual roller shade into an automatic motorized one using Arduino. The project used Arduino with the Adafruit motor shield to control the interaction between a stepper
motor and a digital luminosity sensor.
This Instructable is structured:
1.
2.
3.
4.
5.

Introduction: What is 'good' shade position?


Required supplies
Assembly
Code explanation
Summary

Step 1: What is 'good' shade position?


As the sun moves across the sky during the day, where should the shade be positioned? What if it is a very sunny day and there is too much light entering a space
causing glare? What if it is an overcast day? This step tries to answer these questions by asking: What is 'good' shade position?
In general, we want the shade position to let in as much light as possible without cause any visual discomfort (i.e., maximize daylighting and minimize glare).
The picture above was taken sitting down at my office desk. It was an example of 'good' shade position because the shade was positioned so it was blocking direct
sunlight yet was still allowing maximum diffuse sunlight to enter into my workspace.
Sunlight can be broken into essentially two components: direct and diffuse. The direct component comes straight from the sun whereas the diffuse component is created
when a portion of direct sunlight scatters due to molecules in the atmosphere.
This project aims to control shade position to always block direct sunlight when present and maximize the diffuse component entering the workspace.

http://www.instructables.com/id/A-solar-tracking-automatic-motorized-window-blind-/

Step 2: List of Supplies


Arduino Hardware:
1. Arduino Uno (http://www.arduino.cc/)
2. Adafruit motor shield (http://www.adafruit.com/products/1438) $19.95
1. Headers (http://www.adafruit.com/products/85) $1.95
3. Digital Luminosity Sensor (http://www.adafruit.com/products/439) $5.95
Stepper Motor:
1. Stepper motor with planetary gear box $33.95 (http://www.omc-stepperonline.com/nema-17-stepper-m...)
2. Power supply - 12V (May be required if motor cannot produce enough torque through a USB port)
Some notes on the stepper motor. You do not need to use this stepper motor and it may be possible to find a cheaper one. But you must consider torque and speed. This
stepper motor easily produced enough torque to raise and lower the shade. It moved at a slow, yet smooth (stepping angle of 0.067), speed because it had a gearbox.
You can control the speed of the stepper motor via the code provided but up to a certain point; however, this could create discontinuous motion which could potentially
cause the ball chain to skip some gears. High torque and low speed motors work well for this project.
3D printed gear:
1. 3D printed gear via Shapeways.com ~$15-30 (Discussed in step 2)
2. Elastic Band (The thick ones found when buying broccoli work great)
Lets discuss the design of the ball chain gear. I searched online to see if I could just the gear that comes with a generic roller shade but I could not find one anywhere. It
seems to get one you must buy an entire roller shade.
Luckily John Abella created a parametric CAD file of a ball chain gear. The file should be opened with OpenSCAD software.
Parametric 3D ball chain gear CAD file by John Abella: http://www.thingiverse.com/thing:12403/#files
OpenSCAD software: http://www.thingiverse.com/thing:12403/#files
The parametric file requires the following inputs that you should measure with digital callipers in mm:
Motor shaft diameter
Ball diameter
Ball count (This is one of the inputs to determine gear radius)
Ball spacing

http://www.instructables.com/id/A-solar-tracking-automatic-motorized-window-blind-/

Link diameter
John Abella has also added code so that different shaft options can be used. The code outputs total height and diameter. Shapeways has limits to the size of the printed
piece. I used shaft type #3 to match the stepper motor shaft. I designed the flat spot diameter so that force fit was required to fit the gear onto the shaft. It was difficult to
fit the ball chain to the gear correctly even with precise measurements using a calliper. I suggest making the gear diameter large so that you maximize the number of
grooves in contact with the ball chain.
Attaching a rubber band around the gear increased friction between the ball chain and gear. This should help reduce slippage. Once you are happy with the design
'compile and render' the file to type .stl and upload it to shapeways.com or use your own 3D printer for manufacturing. I used the default white nylon material - Strong &
Flexible.
Tools for assembly:
1.
2.
3.
4.
5.
6.
7.

Soldering iron (To assemble Adafruit motor shield)


Clamps (I used quick release clamps)
Spare wood/platform
Wires for prototyping
Electronic breadboard
Ruler
Digital Calipers

Image Notes
1. Shaft type
2. Inputs
3. Outputs

Step 3: Assembly
Arduino
First assemble the Arduino Motor Shield following the steps in this tutorial: http://learn.adafruit.com/adafruit-motor-shield-v2... Don't forget to download the Adafruit motor
shield code
The wiring schematic and wire colour placement in the above two figures should serve as a reference point to connect your motor.
Digital Luminosity Sensor
The wiring diagrams and code can be found here:
http://learn.adafruit.com/tsl2561/overview
Download both Adafruit libraries: Adafruit_TSL2561 V2 and Adafruit_Sensor

http://www.instructables.com/id/A-solar-tracking-automatic-motorized-window-blind-/

Other software: Arduino Time Library


Download here: http://playground.arduino.cc/Code/time
Bringing it all together
The pictures show the fully connected motor and luminosity sensor.

http://www.instructables.com/id/A-solar-tracking-automatic-motorized-window-blind-/

Step 4: Code Explanation


The control strategy used a very similar strategy to Tzempelikos et al. (2013; SC-III) where the shade height was controlled based on the calculated position of the sun
and the measured workplane illuminance. Their algorithm was based on open loop procedures which moved shade height to the position where it just blocks direct
sunlight from falling on the workplane. The code in this project adopted their open loop aspects and added closed loop control during certain conditions.
The position of the sun is known in terms of its solar altitude (?) and solar surface azimuth (?). The solar altitude is the angle between the horizon and the sun. The solar
surface azimuth is the angle between the outward normal of a surface (e.g., vertical window) and the sun.
My code calculated ? and ? based on your location:
Latitude
Longitude
Altitude
Angle from south to your outward normal of your vertical surface (surface azimuth)
The code operates during three periods of conditions depending on these angles:
1. The sun is incident on the window surface: ? > 0 &|?| < 90
If the sun is incident on the window surface the first mode of operation is to follow open-loop control to position the shade height calculated using ? and ?. If the day has
high sky illuminance the workplane illuminance may be greater greater than 2000 lx (lumens/area) when following open loop control. If the workplane illuminance exceeds
2000 lx the roller shade position will enter into closed loop control and overshoot mode will be initiated. This will first cause the shade to lower 2 cm until the workplane
illuminance is less than 2000 lx. If the day is overcast, during this scenario, and the workplane illuminance is less than 250 lx and the time is after 9 am the shades will
enter into overshoot mode. First the shade will move up 2 cm until the shade height overshoots 2000 lx, then will lower 2 cm so the workplane illuminance is below 200 lx.
This is a primitive way to estimate if the day is overcast. Model predictive control could create a smarter control strategy in the future. Once overshoot is triggered the
shade will be in closed loop mode for the rest of the day.
2. The sun is not incident on the window surface: ? > 0 &? > 90
In this mode the sun is not incident on the window surface so all the light entering the space is diffuse horizontal and ground reflected. The occupants are no longer
concerned with blocking direct sunlight and the daylight entering the space should be maximized without causing visual discomfort. The control algorithm adjusts the
shade height up or down so that the light level entering the space is always less than 2000 lx.
3. The sun is below the horizontal ? < 0
In this scenario the sun has gone below the horizontal. The blind will fully close for two main reasons: (1) to slightly increase the thermal resistance of the windows and
(2) to increase the workplane illuminance when the lights are on because the blinds have a higher reflectivity than the window.
To translate the number of motor step to shade movement you must input properties of your gear:
Gear ratio
Motor step angle (degrees)
Gear radius
The control strategy program iterated every 10 minutes. This was intended to reduce distractions caused by constantly having the blinds move. The same strategy was
adopted by Tzempelikos (2012).
Download the code below:

File Downloads

Zibin_ARS_v8.ino (12 KB)


[NOTE: When saving, if you see .tmp as the file ext, rename it to 'Zibin_ARS_v8.ino']

http://www.instructables.com/id/A-solar-tracking-automatic-motorized-window-blind-/

Step 5: Conclusion
Developing prototypes using Arduino specific to building technology has large potential to substantially reduce energy use in buildings. This project focused on reducing
energy in buildings for the lighting and heating/cooling aspect using automatic motorized shades. A manual roller shade was retrofitted into an automatic motorized one
that adjusted the shade height based on the position of the sun and/or on the workplane illuminance using open and closed loop control.
Future Work
The project could be easily integrated with a lighting system. In the future the system could also be integrated with an HVAC system in order to minimize cooling and
heating loads.
If you enjoyed this instructable please share it with your friends and improve upon it if you wish.
If you have any constructive comments, questions, or suggestions feel free to comment.
Nick Zibin
References
Abella, J. 2010. Ball-Chain Pulley for Polargraph. MakerBot Thingverse. Retrieved from
http://www.thingiverse.com/thing:12403
Fried, L. 2012. TSL2561 Luminosity Sensor. Adafruit. Retrieved from
http://learn.adafruit.com/tsl2561
Fried, L. 2013. Adafruit Motor Shield V2 for Arduino. Adafruit. Retrieved from
http://learn.adafruit.com/adafruit-motor-shield-v2...
OBrien, W., K. Kapsis, & A. K. Athienitis. 2013. Manually-operated window shade patterns in office buildings: a critical review. Building and Environment 60:319-38.
Tzempelikos, A & A. K. Athienitis, 2007. The impact of shading design and control on building cooling and lighting demand. Solar Energy, 81:369-82.
Tzempelikos, A. 2012. Development and Implementation of Lighting and Shading Control Algorithms in an Airport Building. Journal of Architectural Engineering
18(3):242-50
Tzempelikos, A., & H. Shen. 2013. Comparative control strategies for roller shades with respect to daylighting and energy performance. Building and Environment,
60:179-92.

Related Instructables

Automatic
Window Blinds
Controller
(PICAXE) by
biochemtronics

Portable Solar
Tracker Project
- Circuit Design
and
Breadboarding
by DrRhodes

Work, Power,
and the
Conservation of
Energy through
Roller Coasters
by
CitizenScientist

A Strong Simple
Sun Tracker by
Mud Stuffin

Solar phone
charging
system
featuring sun
tracking by
h2osteam

The Easter
Solar Engine by
TinkerJim

http://www.instructables.com/id/A-solar-tracking-automatic-motorized-window-blind-/

Advertisements

Comments
21 comments Add Comment

Akin Yildiz says:

May 4, 2014. 7:39 PM REPLY

this is just too incredible...

Circadius says:

Apr 7, 2014. 10:04 AM REPLY

Hey Nick!
Nice project - I'm doing something similar with my own (venetian) blinds. Instead of using a Luminosirty Sensor I'm using a cheap LDR sensor. Infact,
"cheap" is one of my main concerns as I want to do all my windows. Right now my setup cost me roughly eight dollars per window (not including the motor scavenged from an old printer) - it checks outdoor light levels, indoor temp and adjusts blinds according to predefined thresholds. It has a handy IR remote to
override the blinds too! :) I'm currently testing the setup running on solar, but it has increased the costs significantly - roughly $20 for battery and panel.
Anyway, would it be possible to take a peak at your code and see if I can borrow a few ideas from it? Looks like it works wonderfully!

nickzibin says:

Apr 8, 2014. 10:32 AM REPLY

Scroll down to bottom of Step 4 and you can download the code there. I hope it helps and good luck with your project.

wangjunling says:

Mar 30, 2014. 1:14 AM REPLY

??????????????????????????????????

wangjunling says:

Mar 30, 2014. 1:14 AM REPLY

??????????????????????????????????

wangjunling says:

Mar 30, 2014. 1:14 AM REPLY

??????????????????????????????????

raleman1 says:

Mar 24, 2014. 10:08 PM REPLY

This article reads just like some robotics papers I've read, except it's even more clear. Good job!

Mr.Hyde says:

Mar 18, 2014. 2:08 AM REPLY


Nicely done! Do you know: if you want the heat of the sun out by using blinds, the blinds should be reflective and outside of the building. with these black
ones inside the room what will happen is this: the solar irradiation is absorbed by the black material and is then sent out from the blind in the form of infrared
radiation, causing the room to heat up.

nickzibin says:

Mar 23, 2014. 8:04 AM REPLY


You are right, the thermal aspects of blinds are also important but this was outside of this projects scope. An ideal placement for a window blind is
actually outside the window (as opposed to inside the window in this project). This reduces the solar heat gain entering the room but there are design
aspects that cause issues with placing blinds outside of windows (e.g., weather effects such as wind etc.).

Son of a Beach says:

Mar 16, 2014. 10:57 AM REPLY


I have always wanted to get a system like this up and running! I have tried on one occasion before but I could not find a motor that had enough torque that
could lift my blinds. My blinds are about 7 foot long and using a baggage scales requires about 2-3kg of force to pull up from completely drawn. Any advice
on the size/torque required? How did you figure out the torque needed?

nickzibin says:

Mar 16, 2014. 5:28 PM REPLY


I would suggest having a motor torque of 1.5 Nm based on really rough calculations. The motor I used had a torque of 3 Nm and could easily lift the roller
shade. This spread sheet provided by Somfy could help in your calculations: (https://www.somfypro.com/documents/531668/3408119/Roller+Shade)
Note: this link will download an excel spreadsheet.

Build_it_Bob says:

Mar 16, 2014. 10:18 AM REPLY


This is a very impressive solution to natural lighting control . You have made a great project that I am sure will be utilized in smart buildings in the very near
future.
Thanks for sharing!
Build_it_Bob

http://www.instructables.com/id/A-solar-tracking-automatic-motorized-window-blind-/

nickzibin says:

Mar 16, 2014. 4:51 PM REPLY

Very kind words. Thank you.

kes2 says:

Mar 16, 2014. 10:16 AM REPLY

Hi! nice job:) for venetians check out http://www.indiegogo.com/projects/jalousier-adds-your-blinds-to-the-iot/x/4462109

nickzibin says:

Mar 16, 2014. 4:48 PM REPLY

Impressive.

palestinian-warrior says:

Mar 14, 2014. 8:24 AM REPLY

nice , the 3D printed gear idea is amazing


i wanted to make a project like yours but i was wondering of a method to control the shade, now i got one! thank you.
but i dont have a 3D printer so im going to do with wood

charliesyvertsen says:

Mar 16, 2014. 8:49 AM REPLY

how?

Eirinn says:

Mar 16, 2014. 2:56 PM REPLY

Probably something like this? : wood cylinder, drill shallow holes for balls, file between holes?

t0mm0t says:

Mar 16, 2014. 11:59 AM REPLY

great project!!
i really liked the part with the broccoli. ^^

aryan_123 says:

Danger is my middle name says:


Nice, I made a simple version of this a few years ago. This is way better, thanks for sharing!

http://www.instructables.com/id/A-solar-tracking-automatic-motorized-window-blind-/

Mar 13, 2014. 8:45 PM REPLY

Mar 13, 2014. 11:02 AM REPLY

Você também pode gostar