Arduino board, motor shield, DC motor and powers used for the board and motor. This is very simple.

Blinds controller using AllJoyn, Arduino, Linino

Long ago I had thought about having blinds that would open in the morning to let sun in and close at night to block the outside spotlights. It would also be nice if the blind behind behind my TV would close when I started watching a movie. Since there is not much necessary need for it, I had never worked on it. Recently I started looking into smart home and internet of everything, and this looked like a good starting project. So I did it in September, and the first part has been working since!

While it works perfectly fine, I am still improving it. So expect some updates on this page in a month or so.

Project goals

  1. Open blinds everyday in the morning, and close them every night.
  2. Allow controlling the blinds from any phone or tablet at home (with proper app installed).
  3. Ultimately, wanted to add this to controller I had written for my WeMo light switches.

Why not just buy a on-the-counter solution?

The solutions I found had some problems. First, most of them required completely replacing the blinds or at least the rod that rotates it.  Second, they had a dedicated cable based controller, or some IR remote. Controlling from your phone would require interfacing that part anyway by some hack. Third, it was a fun learning project!

Parts used

Arduino Yún

It has WiFi embedded, and is capable of running AllJoyn and other services. If you update the firmware to Linino, AllJoyn service is pre-installed! For $70, I say that’s a good deal.

Arduino Motor Shield

It made my life easier, and it makes final controller simpler and less cluttered. But in retrospect it made sense to just use a small breadboard with the proper circuit. The actual circuit you need to control a DC motor is not that complicated.

12V DC Motor + Planetary Gearbox

The DC motor I used is just a regular one you find in RC shops. The planetary gearbox is to convert high RPM of the DC motor to high torque required to rotate the blinds rod. In retrospect, I should have just gotten a high torque DC motor, and just made sure it is strong enough (with low RPM) to rotate the blinds. Right now I have the entire set used so ratio is 400:1.

Power Supply

As I read in some articles, DC motors demand a high amp at peak. And batteries would pretty quickly die on it after few uses. So I used the general rule of power supplies: the heavier the better! This was concerning as I was worried about an overheating power supplier that might start a fire in my absence. So far, this power supplier has been a reliable one with not too much heating.

6mm to 8mm Shaft Coupler

This was probably the hardest to track. As you will see below, there is a rod in my blind that rotating is done through that. I initially wanted to use a step motor or servo to rotate the blinds, but this setup of using a central rod blocked me. I did not know the name of the “connector” that would bridge shaft of the motor and the blinds rod. Turns out it is just called a “shaft coupler” or “coupler” as in here. As simple as that!

Assembly and bring up

[code to be posted once finalized]

The overall hardware setup is extremely pretty simple, as shown in the following photo:

Simple overview setup, see below for details.

Arduino board, motor shield, DC motor and separate powers used for the board and motor. See below photos for the details.

  • AllJoyn side is extension of Control Panel application and is running on Linino
    • AllJoyn can write to a file that a request has come to open/close.
  • Arduino sketch uses files to talk available to Linino
    • It periodically reads the files and sees if there is a new command to pick.
  • If there is a new command for the sketch, it turns on the DC motor for periods of time depending on the direction.

What remains to be done?

  • As the photos show, the housing is still temporary.
  • Antenna cables for dish receivers are relatively low key, and are not visible from most angles. But still there should be better solutions.
    • this would be the only positive of using batteries.
  • I have two scripts that can be called (by AllJoyn receiver or through crontab) to turn the blinds. However, I have not made it such that the combination of them work smoothly.
    • Easy fix, just need to keep a state. But who has the time?

Lessons learned so far

  • Best home solutions are the ones you set up once and almost completely forget about!
    • Using crantab for timing made life easier!
    • Batteries can go out fairly fast with this setup, and changing them is just one added chore!
  • DC motor is not just right
    • Can a solution be found to make less noise?
    • I want to add another window, so will get a high torque (like this) and get rid of the planetary gear. Will update once I do that.
    • Just do the math and make sure it’s not too fast!
  • Have a separate power source for the Arduino board.
    • The Arduino motor shield allows cutting a jumper and having a dedicated power source just for the DC motor. I did that after awhile as people report that sometimes motor activity impacts the Arduino board working.
  • A good-for-all solution is hard. The physical aspects such as blind control mechanism mean many interfaces need to be provided for this ideal solution. And even with that, connecting the interface to actual blinds is a hard task by itself that probably needs professional installers.
  • AllJoyn was a good choice.
    • Since the controllee and controller are not directly bundled together, any machine in my network with AllJoyn controller can send instructions.
    • Low latency means you don’t have to wait a minute for your command to go to and come back from the cloud.
    • Also, later I can program a scene that is triggered, for example by motion. It can automatically adjust lights, close blinds, etc.
    • Since AllJoyn is OS agnostic, the controller can be iOS, Android, Linux or even Windows.
    • There is an implementation of AllJoyn on Arduino itself with no need for Linino. But I figured it would be easier to have an OS so other future changes are easier to script.
    • I have not used HomeKit, I sure hope they cover the above as well.

Update 2016-04-23:

So the automated blinds have been working for me for the past year and a half. I have used crontab to open/close them by schedule, or the AlljoynOn app for occasional changes out of the schedule (you can also physically draw them). But today I added a script, thoughtfully written by Chris , so that I can control it using my Amazon Echo!

If you don’t want to go through all these programming and scripting, you might want to contemplate combination of WeMo Maker + the DC motor + Echo like reported here.

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.