LowPowerLab Forum

Hardware support => Projects => Topic started by: snorp on May 20, 2016, 10:30:13 AM

Title: DIY motorized blinds using Moteino, for $40
Post by: snorp on May 20, 2016, 10:30:13 AM
I'm using the Moteino to automate my tilt blinds, and posted about it here: http://snorp.net/2016/05/20/blinds-controller.html

Thanks a lot to TomWS, perky, and others on this board who helped me out. I've had a lot of fun, and can't wait to do something else with the Moteino!

(http://i.imgur.com/aK5LqnUl.png)

(http://i.imgur.com/asrs8x3l.jpg)

(http://i.imgur.com/LEehhZgl.jpg)

Title: Re: Motorized Blinds
Post by: snorp on May 20, 2016, 10:39:33 AM
One thing I don't talk about in that post that folks here might be interested in is a library I created to abstract away much of the boilerplate associated with creating a new "node" -- https://github.com/snorp/Node

Included in this library is a (basic) common message format, automatic waking of sleeping nodes, battery monitoring, and remote node address reassignment.
Title: Re: Motorized Blinds
Post by: Felix on May 20, 2016, 10:42:13 AM
Such a nice implementation, I will try to post this on the blog when I find the time.
Thanks very much for sharing it with the forum!
Title: Re: Motorized Blinds
Post by: TomWS on May 20, 2016, 03:04:23 PM
Good job!  And nice posting!  Well documented, including your learning, EXCELLENT!

Tom
BTW, I'm using that motor on a project that I hope to be posting soon (if it works  :D
As I said when you first pointed it out, the Actuator bargain of the Century!

Tom
Title: Re: Motorized Blinds
Post by: luisr320 on May 21, 2016, 05:54:25 AM
Nice project. Thanks for sharing.
Title: Re: Motorized Blinds
Post by: joelucid on May 21, 2016, 07:15:21 AM
Well done!  :)
Title: Re: Motorized Blinds
Post by: Roger2016 on October 26, 2016, 09:53:45 AM
Very nice project!  Thanks for sharing!  If nothing else your link introduced me to the Moteino for which I have a lot of uses. 
I'm starting work on this project now for my house.  I have about 10 blinds I want to control all similar to the ones you have.  Do you find those tiny stepper motors have enough grunt to reliably control those blinds?  I was loosing steps on my initial test, but I could have speed and acceleration values incorrect.  Unless I'm missing something and this is probably a dumb newbie question.  I see you have posted a library, but I don't see an .INO file.  How do I use your library?

Thanks!
Title: Re: Motorized Blinds
Post by: snorp on October 26, 2016, 01:29:01 PM
I'm starting work on this project now for my house.  I have about 10 blinds I want to control all similar to the ones you have.  Do you find those tiny stepper motors have enough grunt to reliably control those blinds?

It can't close the blinds as tightly as the manual worm gear mechanism, but I find it does well enough. If I ran across a cheap worm gear actuator that was small enough to fit in a 2" rail, I'd probably give it a try. One thing you could try first is to convert the 28BYJ motors into a bipolar motor. There are some instructions for how to do that here: http://www.jangeox.be/2013/10/change-unipolar-28byj-48-to-bipolar.html (http://www.jangeox.be/2013/10/change-unipolar-28byj-48-to-bipolar.html). The author there claims about double the torque after this modification.

For my issue (closing the blinds tighter), I don't think it will work, because the 'braking' force of the motor when at rest would not change. The worm gear excels at this by providing a mechanical solution.

Quote
I was loosing steps on my initial test, but I could have speed and acceleration values incorrect.  Unless I'm missing something and this is probably a dumb newbie question.  I see you have posted a library, but I don't see an .INO file.  How do I use your library?

I'm using platformio instead of the (shitty) Arduino IDE. Just put the Node and RFM69_WL checkouts into ~/.platformio/lib if you are on Mac/Linux. No idea on Windows, but there will be some documented path for platformio libs to go.
Title: Re: Motorized Blinds
Post by: Roger2016 on October 26, 2016, 02:34:41 PM
Thanks Snorp!

I already had the bi-polar conversion on my radar.  We could also add a second motor on the other end of the shaft running synchronized but opposite rotation.  That would double the breaking as well as the torque.  Of course we could add a physical spring loaded brake where we release the brake then rotate the shaft.  The spring will hold the brake a motor or solenoid would release the brake so it would only take power momentarily to release the brake.
Title: Re: Motorized Blinds
Post by: snorp on October 26, 2016, 02:39:49 PM
Thanks Snorp!

I already had the bi-polar conversion on my radar.  We could also add a second motor on the other end of the shaft running synchronized but opposite rotation.  That would double the breaking as well as the torque.  Of course we could add a physical spring loaded brake where we release the brake then rotate the shaft.  The spring will hold the brake a motor or solenoid would release the brake so it would only take power momentarily to release the brake.

All good points! The spring-loaded brake is a good idea. I'm not great with the mechanical bits, so I didn't try anything clever there. I really think a worm gear would solve all of the problems -- more torque, and built-in braking -- but I just haven't run across anything that looks viable. Most of the coupled motor/gear things aren't steppers either so you'd need to have some encoding on the shaft. Not impossible, of course, but adds more complexity.
Title: Re: DIY motorized blinds using Moteino, for $40
Post by: ramshaklez on April 08, 2017, 03:32:52 PM
Looking to use your basic solution to control a motor with a Moteino except rather than opening/closing slats I want to raise/lower the entire blind. I am not sure if I should get a DC motor or a Stepper for this. I realize I'll need a lot of torque.

Also, I am not really sure how to get the motor to automatically stop when the blinds are fully open/closed. Any thoughts are appreciated!!

Title: Re: DIY motorized blinds using Moteino, for $40
Post by: ChemE on April 08, 2017, 07:39:39 PM
Also, I am not really sure how to get the motor to automatically stop when the blinds are fully open/closed. Any thoughts are appreciated!!

Limit switches are the standard way to limit the travel/swing of mechanical operators like this.
Title: Re: DIY motorized blinds using Moteino, for $40
Post by: TomWS on April 08, 2017, 08:40:41 PM
Joe Lucid turned me on to this motor:
https://solarbotics.com/product/gm3/

Lots of torque, inexpensive, runs on 3-4V, and, although a bit fast for control applications, can be PWM'd down to 1-2 RPM at the shaft.  It's also relatively quiet.

Easy to drive unipolar if you don't need to reverse direction or with an inexpensive H-Bridge if you do.

Tom
Title: Re: DIY motorized blinds using Moteino, for $40
Post by: perky on April 09, 2017, 09:09:02 AM
Thanks for that link Tom, I've got a project that uses a servo as an actuator requiring a movement of about 13mm with several kg force, I'd have to put end stop switches and an H-bridge but this could reduce the cost by quite a bit ;)

Mark.
Title: Re: DIY motorized blinds using Moteino, for $40
Post by: WhiteHare on April 09, 2017, 10:24:41 AM
Also, I am not really sure how to get the motor to automatically stop when the blinds are fully open/closed. Any thoughts are appreciated!!

Perhaps you can identify it by monitoring for a signature change in the current flow.
Title: Re: DIY motorized blinds using Moteino, for $40
Post by: TomWS on April 09, 2017, 05:19:34 PM
Thanks for that link Tom, I've got a project that uses a servo as an actuator requiring a movement of about 13mm with several kg force, I'd have to put end stop switches and an H-bridge but this could reduce the cost by quite a bit ;)

Mark.
The LB1930MC-AH should work nicely to drive this since the voltage is well within the 10V limit of the H-Bridge.  This device is handy since it has the gate drivers internally and will dynamically brake the motor with the right control combination.  It's also small.

The gearing on the motor also has a slip clutch to keep you from breaking it (in theory)...  ;)  Note that it matters which shaft you connect to your load - you want to use the double flat shaft.

Tom
Title: Re: DIY motorized blinds using Moteino, for $40
Post by: perky on April 09, 2017, 07:41:21 PM
Nice, that looks just the job, thanks!

Mark.
Title: Re: DIY motorized blinds using Moteino, for $40
Post by: geman220 on May 15, 2017, 08:25:17 PM
Sorry, I am new to this and confused.  I assumed I would just have to upload the code to my Moteino but I keep getting:

"BlindsControl.ino:159:18: error: 'DEBUG_INIT' was not declared in this scope" or "BlindsControl.ino:170:61: error: 'DEBUG' was not declared in this scope"

What am I missing? TIA
Title: Re: DIY motorized blinds using Moteino, for $40
Post by: Felix on May 16, 2017, 09:36:15 AM
You need the whole library installed, from his github.
Title: Re: DIY motorized blinds using Moteino, for $40
Post by: geman220 on May 16, 2017, 04:27:52 PM
I believe I have the libraries installed.

From his github I have installed:


Along with other libraries like Accelstepper etc.

On my "blind" Moteino I uploaded the .ino from here (with included .h/.cpp files)  https://github.com/snorp/BlindsControl/tree/master/src
On my "gateway" Moteino I changed the .cpp to .ino and uploaded with the Arduino IDE from https://github.com/snorp/BlindsGateway/tree/master/src

Now the uploads seem to work, not sure what changed.  I only get the following WARN:

"WARNING: library Node claims to run on (atmelavr) architecture(s) and may be incompatible with your current board which runs on (avr) architecture(s)."

But I'm not sure how to verify that they can communicate.  I read these instructions (https://lowpowerlab.com/guide/gateway/) and have the gateway running on my rpi3, but I don't see any nodes. I've verified my gateway Moteino is in ttyUSB0 and I have that configured in the settings.  I've been watching
but I'm not sure if the node should just automatically show up on the frontend, or if I need to do something to have it appear.

I appreciate the help!
Title: Re: DIY motorized blinds using Moteino, for $40
Post by: Felix on May 17, 2017, 08:52:29 AM
If it works then you're good, that warning may have to do with the target board you chose (lol, isnt avr == atmelavr), the Arduino IDE is not the greatest tool and they've been messing it up every version, that's why I stick with one that works, 1.0.6.

This thread is about blinds, please post your gateway questions in the Gateway forum.