Skip to content

Motorized Window Blinds – Phase 1

February 24, 2014

Feb, 2014

When the house was built, we had a pair of Hunter Douglas roman shades installed over a French Door leading to the patio in the back of the house.  These literally fell apart 3 times over the 7+ years we’ve lived in the house due to poor material rotting after repeated direct sunlight (I mean, seriously!?  Isn’t that the POINT of a window shade?).  With the warranty expiring, we were facing a rather large repair bill.  So, I began an investigation of replacing these blinds with motorized blinds.

Selecting a Vendor

My first reaction was:  Wow, blinds (in general) are really expensive!  My second reaction was:  Wow, adding motors into blinds is really, really expensive!  If I was going to invest a lot of money, I wanted to make sure it was going to suit my needs.  I found 2 main options:  Bali (with Somfy motors) and Hunter Douglas.  My wife leaned toward the Bali option based on the selection of fabric material on their web site.

After much research, I concluded that there was no easy way to interface the Bali/Somfy solution into my home automation system.  The best I would be able to do is crack open a remote control and wire relay wires to the buttons to trigger the movement of the window blinds.  The device was RF, so didn’t need to be ‘line of sight’ with the blinds like IR solutions.

My research of the Hunter Douglas system had different results.  At first, I learned that the HD devices use a combination RF/IR remote and hacking attempts by others did not have good results.  Then I learned HD has recently released some very interesting components designed specifically to interface with home automation systems.  They even had integrated web server options to allow control from a mobile device.  All that was great, but drove the cost up considerably.  Then I discovered something called the Connection Interface.  It offered a basic dry-contact interface for controlling the blinds and was inexpensive compared to the other interface options.  Eureka!  Exactly what I was looking for.

I went online to find stores that carried the brands in my area so I could evaluate them in a showroom.  Home Depot caries Bali and does sell the Somfy motor options but had nothing to demonstrate.  I found a local store that carried the HD brand and did have a demo unit in their showroom.  I visited the store and inspected the device, confirming it would suit my needs.  I inquired about the Connection Interface and got blank looks.  Then they told me “We’ve been installing Hunter Douglas blinds for over 20 years and I’ve never even heard of this thing.”  I shared all my research and they pretty much told me I was on my own.  They promised to install the blinds and confirm the motors were working via the manual switch, but anything beyond that was my problem.  I agreed.  After convincing my wife to compromise on the blind fabric, we were good to go.  We placed the order, and I got to work building the bridge to interface the blinds to the home automation system.

Wireless Bridge Interface

I wanted to make the device small and wireless.  I had an extra Arduino Fio left over from an earlier project, so decided to use that as the base of my solution.  Next, I purchased an Xbee S6B to allow the Fio to participate on the house WiFi network.  Finally, I purchased some 3V Reed Relays from Meder Electronics.  I used 4 pins on the Fio to drive 4 relays on a small perf board.  I cut holes for wires in a left over project box from Hammond Manufacturing that fits the Fio perfectly.

I had several issues with this board:  As I did last time, I had to install a 220 uF electrolytic capacitor to make the Xbee work properly on the Fio.  Next, it took some time to configure the Xbee S6B to work properly with my home WiFi – lots of trial-and-error to get it to work properly.  For example, to set the communication port to 8888, I learned after many attempts that I had to convert it to hex (22B8) to make it work.  My next challenge was getting the reed relays to work properly.  The spec sheet on these says that there is a polarity diode on the inside pins.  I tested one to determine the proper polarity and soldered all four the same way.  Frustratingly, only 1 of the 4 worked.  As it turned out, the polarity is different for each one because they print the label on different sides.  I had to un-solder, flip and re-solder 3 of the 4 relays.  I guess, I deserve that for assuming, but Meder goes to the bottom of my ‘reliable vendor’ list.

In order to avoid the use of wires, I planned to power the Fio off of a battery.  3 x AA battery pack provides about 1700 mAh @ 4.5V.  However, I discovered that the Fio consumes about 100mA.  According to the battery life calculator, that means that my Fio will be powered for only 12 hours.  Hmm, that’s not going to work.  I investigated battery options with more capacity, but they were bigger and more difficult to conceal.  Next, I researched some options for putting the Fio into sleep mode.  I wired 2 Digital IO pins to the Xbee sleep pins, uploaded a simple sleep script and took some measurements.  Wow, the current drops to less than 10 mA.  Assuming I sleep most of the time and wake up periodically to check for a move command, this would extend my battery live 10x to about 4 days.  While that is moving in the right direction, it still requires me to change the battery far more often than I’d like.  I’m still exploring options on this issue, but suspect I’ll surrender and just go with a wall wart for power and try to hide the wire.

Next, I wrote a quick software app to send the commands to the Fio.  I went through 3 major versions of this code before getting a stable build.  The latest version includes liberal amounts of error checking and retry logic because the idle connection to the S6B only stays active for a few minutes (still not sure why).  Like some of my other projects, I leverage a publish-subscribe interface using the Watchdog database as the repository of the current state and location where other apps could request changes.  I used slider controls in the app to set the height of the blinds which makes the app more intuitive.  In addition to a manual control option, I also added some functionality to allow the app to control the blinds autonomously.  Some of the rules I included:

  • At sunrise, raise the blinds to let in light
  • At sunset, lower the blinds to provide privacy
  • If the room gets too warm, lower the blinds to 50% to provide some shade
  • When the room returns to a target temperature, raise the blinds again to let light in.
  • When the house is unoccupied, lower the blinds for privacy

I already have a sunlight sensor configured to trigger the interior stair lights.  I also already have a temperature sensor in each room and house occupancy sensors, so writing the rules was a simple matter of tapping into those database tables and grabbing the current state to determine if the blinds should move.

Additionally, I created a quick HTML5 interface similar to the others I created to allow me to manually over-ride the blinds from any mobile device connected to the house WiFi.  I wanted to use a slider control for this interface as well, but quickly learned this control was not available.  After much research, I found an AJAX slider extender that fit my needs.  This was my first time using AJAX, so I learned quite a bit.

Installation

After several weeks of waiting, the binds arrived.  The installer re-iterates several times that he’s never seen anything like this and has no idea.  I’ve done lots of research and pretty much showed him what to do.  The only snag we hit was that HD did not provide the power cable that goes from the battery bar (male barrel jack to a bare pair of wires to connect to the screw terms) to the Connection Interface.  I dug into my stash of old wall warts and cut the ends off of 2 of them to use.  The Connection Interface plugs in-line with the power and a 6-wire connector connects with the motor to allow control.  We had to almost completely take apart the blind casing to get to the 6-wire port – it made the installer really nervous, but I kept pointing to the documentation showing exactly where the connector was located.  He reluctantly complied and everything worked out fine.

After the blinds were installed and wired, the last remaining task was to tune the app to control the blinds.  The blinds could be used to simply send an “up” or “down” signal to raise them to the top or bottom.  Optionally, they can be stopped anywhere in the middle by sending another command.  I quickly learned that the motors on the two shades did not run at the same speed.  I had to tweak my software app to get the timing right to allow it to stop at the desired level.  Unfortunately, the blinds do not have feedback control, so I have to “guess” how long to wait between pulses.  So far, I haven’t cracked the formula for stopping the blinds at the same spot consistently.  There is a way to set an intermediate stop, but it requires a remote control which I opted not to buy.

March, 2014 Update:

In practice, I discovered that the battery life was much longer than I calculated (3-4 days instead of 12 hours) due to the fact that the Xbee drops the active connection after an idle period.  Even so, this was still far too frequent to be practical.  So, I addressed the power problem by making an exception and running a power wire to the top of the door frame.  I bought some inexpensive, white wire conduit to hide the cable and keep it looking nice.  I was really reluctant to do this since my goal was to keep it wire-free, but since providing wall power, the whole system has been totally maintenance free.

 

Please click here for the continuing saga of the Motorized Window Blind project – Phase 2 

 

Arduino Fio Source Code

Video:

Pictures:

DSCN0244

WiFi Bridge for controlling the blinds

DSCN0246

The Arduino Fio with Xbee S6B and Reed Relays

DSCN0248

The finished result with the control wires temporarily placed on top.  Lots of room to hide them behind the blinds once I’m done testing.

HD Connection Interface

The mysterious Hunter Douglas Connection Interface

WDBlindControl

A screen shot of the Blind Control software

From → Home Automation

9 Comments
  1. true permalink

    So…you basically did an overcomplicated thing because you didn’t know about the Somfy URTSII – http://www.smarthome.com/31813/Somfy-1810872-Universal-RTS-Interface-II-16-Channel/p.aspx

    Granted, Somfy wants a ton of money for it, but it can be had cheaper. In the hacker spirit, you could have also hacked a 5-channel Telis remote – under $100 if you look – and interface your MCU with the remote buttons and detect what channel is selected based on voltage from the LEDs. This would allow you the option to use the same interface, and give you more channels for future expandability.

    Another option, if you want to remain complicated and keep costs down, would be sending IR from your MCU – HD shades often come with the IR receiver by default. This would eliminate the need for the dry contact adapter. Did yours come with IR modules?

    There’s also QMotion which has been pushing hard to get more marketshare and has been slashing prices for dealers, meaning a deal could have been had there too. Installed a few and they’re pretty nice, and a plus is that they don’t actually require a remote for basic operation. The shades have more preset position options than the competitors though.

    Props for the hack, but based on your writeup you still have issues, it is over- (under?-) engineered and it is over-complicated. (But don’t let me stop you from doing more…)

    • Thanks so much for your comment. Price was the main driver for the direction I took – based on all the options I researched (including most of the ones you mention in your comment), the option I selected was the best combination of low cost and highest probability of success. The current approach is working flawlessly. .

      My new HD shades did come with both IR and RF remote options – I bought neither. In my research, I learned that the HD remotes use a combination of these 2 technologies and attempting to use a universal remote to send just the IR signals did not work because it first needed an RF signal to come out of ‘sleep’ mode. So, I did not bother proceeding further with that option.

      QMotion did come up early in my research. I liked them a lot based on their web site, but did not have a dealer near by to let me ask questions or investigate further. For the amount of money I had to hand over, I wanted a guaranteed interface.

      I’m currently in the process of retro-fitting my HD Silhouette shades with Somfy motors. I just bought my first one over the weekend and will be prototyping it when it arrives. My biggest fear is that the motor will add width to the blinds and they won’t fit inside the window frame as they do now. I like the Somfy Universal RTS interface II option, but as you said – it’s expensive. For my prototype, I’m using the Somfy RTS Dry Contact Interface which only gives me 1 channel, but will at least let me prove the concept. If everything works well and I proceed, I’ll probably bite the bullet and go for the Universal RTS Interface II option. Any suggestions where I can get it for less cost would be welcome.

  2. bobbyv permalink

    Now you need to reverse engineer the interface between the motor and the connection interface.

  3. Shademaster permalink

    QMotion is pure crap, they are too new and still going through growing pains and trying to de-China-fy their product to bring up the quality. At least HD has a product that has been on the market for years and evolved to what it is today. And sure you could have purchased an overpriced URTSI, but when the RTS signal fails you’re stuck putting on a tin-foil hat to improve reception, Zigbee is more robust. I agree that going with standardized parts Somfy motors and components from a internet retailer wouldn’t be that much more, but that takes away from doing it yourself and learning. Motorized shades can be expensive and there are too many possibilities to list with styles, motors, wiring, control, etc.

  4. Can you share the Arduino code you use to communicate through the xbee s6b?

    • Yes. I’ve just updated the post with a link to the source code (just above the video). I’ve been meaning to do that for all of my projects. Thanks for reminding me!

Trackbacks & Pingbacks

  1. HTML5 Web Interfaces | Bithead's Blog
  2. Hacking Window Blinds to Interface with Home Automation System
  3. Hacking Window Blinds to Interface with Home Automation System | Hack The Planet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: