

Arduino based curtain automation - DavidWanjiru
http://www.jwz.org/curtain/

======
harrytuttle
That's funny, only because my cousin did this back in the 1980's.

Unfortunately, he used reed relays to determine when the runner was at the
end. After a few days the magnet fell off thanks to it being stuck with the
wrong glue and the motor ran past the end and jammed with power applied.
Inevitably the armature caught fire after a couple of minutes [1] and set fire
to the curtains.

Cue visit one evening by the fire bridgade and his entire bedroom being burned
out and angry parents and insurers...

[1] motors = dangerous ...
[http://www.youtube.com/watch?v=0o0SdmAwA7o](http://www.youtube.com/watch?v=0o0SdmAwA7o)

Edit: other misadventures we produced together (really need to put these on a
web site as we have photos): lawn mower to stand up personal hovercraft (two
broken fingers), radio controlled hovercraft bodged from above (sunk in middle
of lake), rocket propelled grenade launcher (got bollocking from the police),
RC plane missile launcher (set fire to grass), portable BBC micro (electric
shock + fire), coil gun (remove metal swarf from finger at hospital) + more I
can't remember off the top of my head.

Probably be in prison if we did it now. Hardware hacker culture has been going
for a while now...

~~~
toomuchtodo
Would you not put a timer on the runner circuit and say "Do NOT run more than
X seconds runner motor, otherwise we consider you drunk and you must go home"?

~~~
harrytuttle
Probably a good idea. Unfortunately great ideas like that only happen after
experience. He was 14 at the time.

He's now a lab manager for a pharma research company so some of the hard
lessons about safety must have stuck.

~~~
toomuchtodo
Please forgive my comment if it sounded snarky. I was just thinking out loud.

Props to anyone who tinkers; young, old, and anywhere in between.

~~~
harrytuttle
No worries. Didn't take it as snarky at all. Valid idea!

------
networked
_> [S]omething that seems like it should be a simple hack made mostly of a
handful of $1 components turns into a huge and expensive clown-car mess unless
you already have a fully stocked workshop. People who tell you how easy this
crap is are invariably people who already have a drawer full of every
resistor, capacitor and relay known to man, instead of having to spend days
waiting for the turnaround on ordering the components they need. So yeah,
projects like this probably are simple and only a couple of bucks if you've
already spent twenty grand building out your electronics workshop!_

Sounds like a pretty good argument for hackerspaces.

~~~
harrytuttle
Back in the 80's and early 90's we had "junk shops" in the UK which were
basically scrap dealers selling all sorts of weird shit. We'd go in our local
one and be covered for bits in minutes.

We could even get small cannons (which were awesome when using firework
gunpowder and marbles) in our local one for £2 a pop.

We need them back!

~~~
smacktoward
They still exist, at least in Ohio -- see Mendelson's
([http://www.meci.com/](http://www.meci.com/)), which is basically a giant
warehouse filled from floor to ceiling with all sorts of weird bits and bobs.
It's great fun to visit, or at least it was as of a few years ago when I last
got the chance to swing by.

~~~
doctoboggan
Mendelson's is incredible, I always try to visit when visiting family in Ohio.
I've never seen a other store like it

------
dbecker
I've long wanted thermostat control on my windows, so they could read the
outdoor temperature and decide whether to use AC or just open the windows.

The software part seems manageable, but I've been intimidated by the hardware
component.

~~~
bliti
The hardware for this trinket is not an issue. You'd need something like an
arduino, a temperature sensor, and the related motors to open/close the
windows. Of course, a fair amount of wiring, unless you use something like the
xbee.

The hardest part would be mounting the electric motors to the windows. I don't
know what type of windows you have, but if they are single pane windows, a
linear actuator will do the trick. Mounting a linear actuator is very simple,
and mostly requires two brackets (one at each end). Other potential issue I
can foresee is the window lock. But you could use a strong servo to actuate
the mechanism.

One big, big issue about your system would be security. In case of a fire, the
system might not allow for windows to be used an escape route. Though this
only counts if you live in a one or two story house.

Why don't you take pictures of the windows and shoot them over to my email
address? I can help you figure out the hardware side of things. (:

------
chrissnell
There's a simpler way to do it than using a bunch of relays to reverse
polarity. What you're looking for is an H-bridge. It lets you use logic pins
to reverse the polarity.

I did a similar project to control a motorized ham radio antenna mount on my
truck. The mount came with this really silly-looking [0] controller switch
that looks like a Hello Kitty product. I didn't want to velcro that crap on
the dash of my ex-British military Land Rover so I built this board [1] to
control the motor. It uses the SN754410 H-bridge and a Atmel ATTiny2313 that I
flashed with Arduino code. I'd be happy to share the source and PCB with you
if you want, jwz.

[0]
[http://www.flickr.com/photos/69697531@N00/6236671758/in/phot...](http://www.flickr.com/photos/69697531@N00/6236671758/in/photolist-
av7zeq)

[1]
[http://www.flickr.com/photos/69697531@N00/6643770831/in/phot...](http://www.flickr.com/photos/69697531@N00/6643770831/in/photolist-b864AX)

~~~
wiredfool
The relay setup there _is_ an hbridge, just done in relays instead of silicon.

------
PanMan
Why replace the control box, instead of controlling that? In the article it
says: " _but the power has to be off for more than a second to have an effect.
Not quite as simple as simulating a momentary switch._ " With an arduino and
one relay, this sounds really easy, right?

~~~
HeyLaughingBoy
Sure. And there are even simpler ways of accomplishing that.

But first you have to know that you can use an Arduino (pretty obvious). Then
you need to know that you need a relay and what kind. And you need tools,
connectors, enclosures, etc.

I agreed with some of what he said: getting started in hardware hacking can be
expensive and complicated. But this is a side effect of how people get started
these days. Jumping into hardware by building small radios (me at age 11) cost
a few dollars and some scrounged parts and I slowly amassed tools and
equipment over years. Jumping in by starting with microcontroller development
immediately requires more money and equipment.

------
joshwa
$82 for a motor and a microcontroller?

[http://www.amazon.com/Add-A-Motor-D80-Drapery-Motor-
Existing...](http://www.amazon.com/Add-A-Motor-D80-Drapery-Motor-
Existing/dp/B003YVJ472/)

~~~
jarek
That's what happens when you buy it as an add-on to a "home automation
system," also known as license to pull money out of non-technical people's
pockets.

Then again seeing how the hardware part jwz did do went for him, it's probably
better he did get a purpose-built motor and microcontroller in a casing.

------
ejt
Everyone has to start somewhere! Keep up the good work.

I'm excited about seeing support for this beginner to intermediate level
project on here. Hopefully this will encourage more people to try their hand
at hardware and share the results with the community. Maybe I'll start sharing
some of my smaller hardware projects on here...

~~~
unwind
I believe this is mainly considered note-worthy because the source is jwz, who
is an Interesting Person.

Of course the actual project is pretty cool too, but if it were by someone
less known I don't think it would be frontpage material quite as easily.

Also, it's from January 2012.

------
bdamm
I'd like to do a similar thing but controlling external shutters via an
internal temperature or light sensor. The sensor part is trivial (pi, arduino,
simple circuit, etc) but the tricky part for me is the motor controlled
shutters. If anyone has a source on a set of shutters that can be motor
controlled I would be most grateful!

It's because I have a house with an upstairs room that faces the sun in the
afternoon, and closing the internal blinds helps but is not nearly as
effective as external blinds, if there were any. However, since the room is
not anywhere near reachable, my only option would be to have a hand-crank that
goes through the wall. Ugh. Electronics to the rescue!

------
joshu
He's such a whiner. For $80 or whatever you can buy an ethernet box with
multiple relays and DHCP.

~~~
fr0sty
Care to provide some links for the less savvy?

~~~
BetaCygni
Raspberry Pi

~~~
joshu
Uh, no.

~~~
bronson
[http://www.mcmelectronics.com/product/28-17913&scode=GS401&C...](http://www.mcmelectronics.com/product/28-17913&scode=GS401&CAWELAID=530004080000111908?catargetid=1545764029&cagpspn=pla&gclid=CPO6l5_rvrkCFU5xQgodi0MA-A)

[http://elinux.org/RPi_Expansion_Boards](http://elinux.org/RPi_Expansion_Boards)
(search for relay)

I've done it on an RC car, works great.

And what's with your attitude?

~~~
joshu
My point was that you can get an assembled kit to do the thing he wanted
without building stuff from parts.

You just posted a list of parts. No shit?

------
chengsun
Humorous and related:
[https://www.youtube.com/watch?v=rKhbUjVyKIc](https://www.youtube.com/watch?v=rKhbUjVyKIc)

------
kilroy123
Thanks for this, I was planning out a home automation project just this
weekend, and was pondering how to handle the blinds and/or curtains.

------
graup
So cool! To do the same was the original reason why I bought an Arduino a year
ago, but I never really finished the project.

------
mhb
It's a joy reading this in colors other than green on black!

