https://sifter.org/~simon/journal/20240718.html
[<< | Prev | Index | Next | >>]
Thursday, July 18, 2024
$30 Homebrew Automated Blinds Opener
[closeup]
In the spirit of my thermostat and dishwasher controller, I
managed to cobble together a decent blinds opener in a short
weekend almost entirely from spare parts on hand. This design is
very much what I could do quickly with what I had, so probably
not worth copying, but perhaps it can be an inspiration.
It is intentionally the world's slowest blinds opener: It's
purpose is to open the blinds very gradually (and silently!) in
the morning (because at this latitude, natural sunrise is wayy
too early this time of year). Right now it takes about 8 minutes
running at full speed, and can easily be slowed down just by
running for, say, 30 seconds at a time between pauses.
One key component is the silicone(?) motor mount, which I had
previously salvaged from a dead Phillips water flosser and
happened to be close enough to the right size for the geared
motor I bought. That's the one hard-to-find component, and not
included in the cost breakdown. The rest I very-quickly threw
together in freecad and 3d printed for negligible cost. Only the
magnet cuff required two takes (magnet was too loose) -- the rest
I lucked out and got right on the first go. So the whole thing
came together in a day and a half including software (helped that
it only took minutes to integrate into my home automation system
).
In the order I designed/printed things:
The cuff (and cap) that holds the magnet to the motor's butt
(note this does not rotate with the motor shaft--it only measures
the small rotation of the whole motor within the silicone mount
shown below, from which we can infer the torque and detect when
the blinds are closed). Ignore the other water flosser guts in
the background:
[cuff]
The mount that holds the motor and encoder. Chose to solder the
wires on the encoder so I didn't have to worry about
push-connectors vibrating loose:
[mount]
Two double-throw relays. The motor terminals go to the center,
and +5v and ground go to the NO and NC respectively. In that
config, one relay runs the motor forward, and the other reverse.
And if you accidentally have both on at the same time, it just
connects both motor terminals to 5v, which is harmless:
[relays]
The mount above has an extra ridge (not really visible) which
slots into this wall bracket:
[bracket]
I tossed a box over the electronics until I have the time to make
a more aesthetic cover for the whole shebang:
[installed]
The whole design ended up shockingly simple. I thought I might
need more components, but the 12v motor runs fine (and quietly!)
on 5v and only draws about 50mA, and the encoder has pull-up
resistors (for I2C) built in, and the relays work fine w/3.3v
signals on 5v power, so it was truly just a matter of wiring
everything together using the 5v and 3.3v pins of the ESP to tap
power from the USB.
Motor w/gearbox: $15
Magnetic angle encoder: $2
Relays x2: <$4
ESP8266: ~$5
Spare USB power supply and cable: $?
Wires and ferrules: trivial
I connected the motor to the blinds wand with some surgical
tubing (and some other random flexy tubing I had to pad the motor
shaft up a bit) which mostly worked (and helps maintain vibration
isolation for noise), but it's not quite strong enough to really
cinch the blinds tight at the end so I wrapped a few turns of
silicone tape over that and then some blue tape just to cover up
the sticky. Probably this would have been better solved with one
more layer of a larger diameter tubing, but I didn't have any on
hand.
The other issue is, not surprisingly, the motor doesn't just
rotate around its axis within its mount, it twists in various
ways which move the magnet off-center from the encoder, which the
encoder really doesn't like. The result is very non-monotonic
(bad) and path-dependent (surprising, and very bad), but there
was enough signal coming through I was still able to ballpark the
torque and get it to shut off when the blinds are the right
amount of tight. (And for opening them it's easy -- just run for
8 minutes and that puts them pretty reliably at mid position.)
Here at 7000 seconds, the blinds are cinched closed, and then I
opened them a bit:
[chart]
So I would not recommend the magnetic encoder approach. I just
used it because I bought a 5 pack a while back and never used
them. But I do like the torque as the main feedback mechanism,
since it's the most important thing to know: You really do want
it to stop if the torque goes high, no matter the reason. And
once you have that, you can detect the closed position (in either
direction) by "feel", and can find intermediate positions well
enough just with timing. Not sure how else I could (so easily)
measure the torque, though--if you have any suggestions, let me
know.
With the soft mount, the motor vibration is totally isolated, and
it all runs nearly silently. The relays are a bit loud, but the
box muffles them pretty well, and right now there's just one
faint click when it first turns on. The blinds themselves creak a
bit when they're turned this slow, but quieter than typical rain
sounds. Right now the occasional creaking of the blinds is the
only way I even know it's running--it's that quiet!
So now I just send a target percent-open to my blinds on my HA
network (or push the open or close button I added to my phone
panel), and there they go. (And by default they close at dusk and
open at desired-dawn.)
Not bad for a short-weekend project. (Though just gathering the
photos, links, and writing this entry has extended that into a
long-weekend. Ugh.)
[<< | Prev | Index | Next | >>]
---------------------------------------------------------------------
Simon Funk / simonfunk@gmail.com
---------------------------------------------------------------------