DIY 1" Blind Tilting Sketch
I have finally finished the automation of two blinds to tilt open at sunrise and tilt closed at sunset. I have updated an earlier sketch so it now works with the latest mySensors 1.4b1 beta library. Once the power related issues were worked out (See discussion in http://forum.mysensors.org/topic/182/standard-versus-lna-pa-radio-modules) they have been operating flawlessly for the last several weeks using the 1.4b1 library. Kudos to the MySensors team, you guys have done a great job!
I have attached the sketch, if anyone is interested in it. It’s not perfect and can always be improved, but it was a great learning project and might help someone just starting out with mySensors. The sketch is heavily commented with lots of debug printing, so you see how the processes interact. Be sure to comment out this line #define PDEBUG 1 for a final build. I also attached a snapshot of the process I followed while working on the project.
@lininger Kudos to you! Nice project!
I loved the movie in the other thread (damn, those blinds tilt fast!)
Really nice, thanks!
Yes, nice documented, good to see!
First need to get my lightsensor working and some other things, but this makes me think I should also automate the blinds in my sleeping room so I can use them as a kind of wake-up light in the summer.
How do you control the RF Receiver connected to your Arduino? Do you use the Veralite Z-Wave controller? I am working on a project like yours but am having a hard time getting the Gateway connected to my Veralite.
Yes I use a VeraLite and a mySensors Ethernet Gateway. I also use the Program Logic Event Generator and Day or Night plugins for Vera to control when the blinds open and close. Attached is a snapshot of the PLEG inputs, conditions and actions I have setup for controlling the blinds.
@lininger Great implementation on controlling your blinds ... I see this this is being powered by the use of a barrel plug, would it be* possible to power using a LiPo battery and a solar panel? The solar panel would be* on the window in the corner and have it trickle charge the LiPo battery (Something like this http://www.adafruit.com/product/390) ... would it be possible to power both the arduino mini and a servo?
*Edited at 9/20/2014 for grammatical correction.
I'm curious what kind of z-axis coupler that is? I had a hard time finding them for servos
I don't see why not, as long as you get a servo that doesn't require insane voltages (<8V). You can power the Arduino using a step-up converter (like in the store) to maintain a constant 3.3 or 5V.
@naveen Thanks for the input, I will do a little more research I was thinking of using the Futaba S3305 Standard High-Torque servos (6.0V has 124oz-in torque) figured I go this route to help hide wiring and not run electric into each window.
I would imagine it won't use so much power considering it is moving for such a short time. Keep in mind that sensors and actuators are very different in terms of when they can sleep.
Most of the sensor sketches wake the arduino up only when there is a trigger on the sleep pin, and then sleep after sending the command to vera. With an actuator, there is nothing to wake the Arduino up so you need to keep it listening all the time, or have some intelligent sync system that turns it on at a specific interval and Vera will only try to communicate in this interval.
To get an idea if its feasible try to figure out the power consumption of the Arduino, and see if the sunlight throughout the day is enough to at least power that.
The first blind I put together I used a tinkerkit micro servo along with a Kimbrough Internal Rotary Drive Control System kit. The coupler fit perfect with the servo gear head.
The second blind I put together I used a TowerPro SG90 9G micro servo and had to do some DIY modifications using epoxy to attached the coupler to one of the servo arms as the Kimbrough kit did not mesh with the SG90 teeth.
I am not sure about LiPo and Solar or battery power in general. I had to use two separate 5v power supplies, one for the Arduino and one for the servo. Otherwise the pro mini would reset once the servo kicked in to open/close the blinds. My sketch never sleeps it always listens for commands sent from the Vera, either manually or PLEG commands at dawn and dusk.
1 - Arduino Mini Pro v3.3
1 - 220uF Capacitor (NRF24 across 3v and GND 16v+ rating)
1 - 470uF Capacitor Optional (Servo across 5v and GND 16v+ rating)
1 - Servo (Micro 25.0 oz-in [1.80 kg-cm] minimum) for selectblinds.com 1" Faux Wood Blinds 43"x38"
1 - NRF24L01 Wireless Transceiver Module (flat or antenna version) Beaware of power limitations when using the NRF24L01 antenna with LNA+PA
1 - Kimbrough Internal Rotary Drive Control System 500 NIB - connects servo to blind rod (may differ for you blind type and servo used) http://www.ebay.com/itm/291084936296?ssPageName=STRK:MEWAX:IT&_trksid=p3984.m1423.l2649
1 - DC power supply you may need to step-up or step-down for the servo 5v and 3.3v for the NRF depending on the Arduino board you use
http://www.ebay.com/itm/321408108698?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649 is the one I used to power Arduino and servo separately.
If you are successful with LiPo and Solar combination, let us know, as it would be nice no to have the power wires hanging.
This post is deleted!