Need Help Aligning Blinds


#1

Can someone please walk me step by step through the process of aligning the blinds and keeping them aligned? I’m obviously not “getting it”. I have tried several times and the results are always the same.

Whenever I command the blinds to close, the servo closes the blinds as far as they will go. The servo then strains for a split second as it tries to keep going. Finally, it unwinds back to a point that I would call mostly but definitely not fully closed. When I command the blinds to fully open or anything between open and closed, it’s a crap shoot what I’ll get. The blinds will often end up somewhere between 0% and 75% open but sometimes they’ll act the same as trying to close them.

I first tried this with Mountain firmware v6.8-beta but just tried again with v6.9-beta. The results are still the same.

I am using a pre-assembled kit from Matt so I doubt there are any hardware issues with the controller or servo. Matt’s mount wouldn’t fit my blinds so I’m using the mount I printed myself from https://www.thingiverse.com/thing:2071225. I have tried with both the 16:16 and 14:19 gear ratios. Both work very poorly with the 14:19 ration maybe getting a little closer to fully open, sometimes.


#2

Before you physical connect the blind shaft to the servo motor you need to config the software 1st, by powering up the controller and into AP mode. configure you SSID , password, and MQTT details then save and restart.
You then need to connect to device via your browser using http://deviceipaddress
eg http://192.168.0.40
From the GUI select setup.


You then need to configure futher paramaters. Such as blind speed, the side the motor is installed on, swing direction to close etc. .
ClickSUBMIT
then Save
Save settings and reboot if prompted to.
Re connect to the device using your browser again then select align from the GUI.

This will move the servo to the correct open position based on your configuration paramaters.
You will have 20 seconds then to disconnect power to the device before a reboot happens.
At this point disconnect the power…
With the servo in the correct open position you now need to manually open the blinds to the open position . 0 degree plane. by rotating the blind shaft manually.
As in picture this is zero plane

you must also remove any wand and gears connect to the blinds aswell…
Then you can phicically connect the blind shaft to the servo motor. While trying not to move the blinds themselves. and keeping everything level.
I did mine using a makeshift hanging jig with 2 metal coat hangers 2 ladders and a pole accross the ladders suspending the blind at a workable level.
While the blind is at ground level like this you can make adjustments during testing and aligining the open state.
slow process, but worth it, just take your time setting it up.
Once you have connected the shaft, power back up and test your open and closed position using Openhab or homeassist, or using MQTT software such as MQTTfx. And posting a message
cmnd/devicename/POWER CLOSE to close or 100
cmnd/devicename/POWER OPEN to open or 0
cmnd/devicename/POWER 50 to open 1/2 way or another percentage value 0-100

devicename is your topic

Once everthing looks good, install the blind back up into the window.


#3

Hi Mountain,

Thanks for the very detailed reply. That’s what I was hoping for. Unfortunately, what you described is exactly what I’ve done multiple times including setting up my own jig to hold up the blinds for easier access. I initially tried testing with Home Assistant but ultimately started using MQTT directly to eliminate as many variables as possible.

I also tried setting the servo and blinds to the closed position before connecting them in hopes of preventing the servo from trying to wind past that point. It didn’t help. The servo and blinds quickly got out of sync and stayed that way just like when starting from the open position.

I will try this all again, probably on Monday. I think it might help if I know exactly what to expect. How much servo/shaft rotation should there be between the open and closed positions? Also, what is the expected behavior when the servo tries to turn further than the blinds shaft allows? That condition happens quite frequently me no matter what gear ration I use.


#4

Blinds must be in open position before connection
Servo motor must be in open postion aswell before connection.
Make sure you have configured what side the motor is installed and direction to close.
servo motor only moves 180 degrees NOT 360 degrees, they are not a 360 degree servo motor

Can you send me a pic of motor connected and pic of the internal blind shaft where the gear wand used to be


#5

Thanks for your replies and patience. Stronger than expected side effects from the COVID vaccine this past weekend set me back a couple of days but I finally got this working today. It really helps to know how things are supposed to work, especially when trying to integrate parts from someone else’s design, including multiple gear ratios. There are a are a few issues that still concern me, though.

First, when closing the blinds, the servo tries to wind well past the end of my blind shaft’s intended range. Is that really okay for the servo and the blinds? I know I could partially work around that by setting the closed value to about 50. However, the servo and/or the firmware still appears to reset to the extreme position when opening so I’m not sure that would help all that much.

Second, when setting the speed to fast and moving in the closing direction, the servo always rewinds some seemingly random amount after stopping. That can’t be expected, is it? It makes the fast speed setting useless for me because there is no telling at what position the servo will end up. Using the slow speed setting is the only way I can get reliable behavior.

Third, you and the majority of MK blinds users appear to be OpenHAB users so there is no definitive configuration for Home Assistant. I spent quite a bit of time today checking out some of the configurations posted in the forum, reading the HA docs myself and testing. I think I’ve come up with the minimum configuration to get the job done. I’ll post it to the forum tomorrow or in the next few days after I’ve used it a little more.


#6

I finally found the definitive cause of my first issue. I suspected it before but wasn’t sure. I am now.

The firmware expects the blind shaft to have 360 degrees of motion to move the blind slats from -90 to 90 degrees. Because the servo only has 180 degrees of motion, the firmware uses the servo to only cover the slats range from 0 degrees to 90 degrees. The problem is my blind shaft only has 180 degrees of motion to move the slats through their entire range.

Aligning the servo at position 0 with the slats at 0 degrees, per the instructions, and then moving 180 degrees results in winding my blind shaft past its intended range. I’m going to go back to my original idea of connecting the servo to the shaft while both are in the closed position. I’ll then use a custom position near 50 to use for open to make Home Assistant work correctly.


#7

From open the blind is at 0 plane level. You can swing up to close or swing down to close. the blind it self only will tilt 90 degrees. from open to closed state. But it takes servo 180 degrees to cause a tilt/movement of 90 degrees.
Once you decide the swing direction to close ie up or down then it is set…
You can not swing fully up and then fully down. this requires a servo and firmware for 360 degree movement servo motor
You can buy 360 degree servo motors.
The software will need modification to handle full rotation of 360 degrees

Can you send me a pic of the motor setup with the blind shaft

How it is connected.
It should be direct connected to blind shaft without any gears connected.

This is a slim line blind shown with motor pointing up and out of the housing.
I have cut a slit in my other blinds to lay the motor flat. with the intrusion pointing towards the window. you can not see it.
Matts kits mountings are for wider blind housings.

I noticed from your original post you are using a gear box printed assembly . This will not work with this firmware/servo.

Vertical mounted (this is my testing blind setup)

Sideways flat install with intrusion point towards window

Motors are stuck down by double side thick mounting tape.


#8

You’re going to have to do a better job of explaining your math because it doesn’t add up here. The blind shaft has 180 degrees of motion (closed-open-closed). The servo has 180 degrees of motion and is either literally or effectively directly connected to the blind shaft. How does 180 degrees of servo motion not equate to 180 degrees of shaft motion? I accept that most blinds will have loose tolerances and/or slippage so the useful range will be somewhat less than 180 degrees.

I’ve posted twice already that following your instructions to connect the servo to the shaft when both are in the open position does not work well for me. It results in trying to turn the shaft way past its intended range when closing the blinds. It works in the sense that the blinds do indeed close but it puts unnecessary strain on the blinds and I expect that will lead to premature failure of some parts. I can’t see how many others don’t have this problem too.

A picture of my blinds with servo attached is below. I have what I believe to be a fairly standard, 2-inch blind housing with a center-mounted shaft. The only way to connect the servo and shaft directly would require cutting a hole in the housing. I refuse to irreversibly modify the housing when there is perfectly fine alternative.

You seem to be fixated on the gear ratio aspect of this mount. That is only part of its usefulness. The other part, and main part, in my opinion, is to elegantly shift the axis of rotation from the off-centered servo to the centered shaft. When using a 16:16 (aka 1:1) gear ratio, the only functional difference from mounting the servo directly to the shaft is that the direction of rotation is reversed. That’s easily accounted for by flipping the mount side or close direction when configuring in the GUI.


#9

You are correct 180 is 180, in theory this should work with 1:1 gear box.
Have you tried direct connection to test ?
If direct works then there is a problem with the 1:1 gear box then
If I had the gear box I could test myself the outcome and the recode the firmware to suit this arrangement

In regards to my modification to allow servo to fit in a smaller blind space this is my choice using slim line blinds and retro fitting a controller to suit standard wide blinds as in you case and most installs have wider blinds

If the gear box is a true 1:1 then should work, but question is it true 1:1 ?

This firmware is a 1:1 coding aka direct
The error in the gear box needs to be measured then maybe a software solution can fix, but if it goes past the physical limits of the 180 degree servo then can’t be done

The blinds should be able to swing from 0 plane to up 90 degrees and also 0 plane -90 degree down

So I am looking at Matt’s core code to see if this can be implemented , as my v6 base line uses this codes basics

If this is possible I am looking at option of setting closed position and open position based on servo position.; this could allow for off sets.
And positions saved in config

You could pulse the blind to the closed position the click set.
Then pulse blind to open position then click set.

This would be ideal


#10

It’s funny you should ask. On Monday evening, I was set to chuck the whole thing. I’d even ripped out the servo and gear box and reinstalled the original, manual, tilt mechanism. There were primarily two things frustrating me. First, the blinds would not close as tightly as I wanted. Second, the tilt positioning was difficult to set and would not stay set.

With the original tilt mechanism reinstalled, I was able to get the blinds to close satisfactorily again. Apparently, something had popped out of place slightly in all of the mounting and unmounting. The manual, tilt mechanism was able to apply enough force to pop whatever it was back into place.

The gear box, or technically rather, my blinds were part of the problem of unreliable positioning. The gear box is designed for the the shaft to go completely through the box. That allows it to keep the shaft gear and servo gear sufficiently pressed against each other. It’s not possible to do that with my blinds. Consequently, there was enough play in the shaft gear that it would temporarily lose contact with the servo gear and slip. After that happened, the positioning would be off and remain that way.

After thinking about it overnight, I decided to give direct mounting another try. If it looked like it worked well enough, I would consider cutting the housing to mount it that way permanently. When I did that, lo and behold, the servo fit. I was positive it did not fit when I first got Matt’s kit. The only thing I can think of to explain that is that I tried to fit on the other end of the blinds. Contrary to my earlier belief, the shaft is not truly centered. In fact, it’s off-center just enough that the servo would be offset by about 1/4 to 3/8 inches if flipped over or tried on the other end.

I’m now in the process of refining my own version of Matt’s mount. Matt’s version, even with adequate spacers, twists way too much when the servo experiences resistance. I’m modifying it to fill the interior of the housing so there will be no room to twist. My hopefully last revision is being printed now.

Finely positioning the initial, servo angle to get the open and consequently closed positions just right is still proving to be a tedious process. I am making progress on it though. Your idea of making fine grained adjustments through the web interface would be very useful.

I have some final points regarding the gear ratios. The designer of the gear box provides the STLs for two sets of gears. His original set has a 19t servo gear and a 14t shaft gear. He used that ratio to get full or near-full rotation using a 180-degree servo. His newer set has a 16t servo gear and a 16t shaft gear. He uses that now with a 270-degree servo. I tried both a various times. The 19:14 set was extremely unreliable. I suspect the servo I have isn’t quite powerful enough to run that ratio.


#11

Thanks for the good news,
I am working on a newer version were you can set the open and close limits via software. This could help as I liked you gear box setup.

With regards to mounting, good old fashioned double sided mounting tape works well too.

The new version will have home assistant auto discovery installed too

This new version is about 4 days away, just doing some testing


#12

The ability to fine tune the open and close positions will be useful. Although, I’m actually quite happy with the positioning I have now, even if part of it is by accident.

To get my preferred close position, I connected the servo to the shaft with the blinds about 20-30 degrees past horizontal. To far past horizontal and the blinds wouldn’t close completely. To close to horizontal and the servo would see too much resistance and then “unwind” a little leaving the blinds slightly open.

With this close position, I then got lucky with the resulting open position. As I reported earlier when using the FAST speed in this direction, the servo would go to the end and then always “rewind” about 20-30 degrees even though there wasn’t any resistance. I don’t know if that is intended or not. Regardless, it just turns out that after the rewind, the blinds are within a couple of degrees of horizontal. That’s close enough for me.

Regarding the auto discovery, that would be really nice. I might have a monkey wrench to throw at you, though. The latest, Tasmota integration for HA has yet another, new, Tasmota specific, auto-discovery protocol. I do know this new protocol is preferred for Tasmota devices. I don’t know if it deprecates or even obsoletes the older protocol for non-Tasmota, MQTT devices.


#13

Yes the Tasmota Discovery is a bit different to HA discovery which is already imbedded in the core. You need to install the add on for Tasmota which I have as my other devices are flashed with tasmota, I started looking at the code for tasmota Hmmmm then walked away. Lol
So I am using the guide lines for HA Discovery via MQTT
Generating a JSON payload for HA Discovery, and it is working.

Just setting up the correct fields is a bit tricky at the moment as I am using HA cover example with full, state, tilt position. It has everything.

And I am recoding the firmware to suit this example.
May be it is too much?..?

I am looking at others ymal files for guidance as I don’t use HA yet,
Just got a test server running HA

The other thing I have noticed reading into HA that some processes are reversed such as 0=closed and 100=open
Where as 0=open and 100=closed. Current config of firmware

New firmware will have HA preferred 0=close. And 100=open encoded

Could you upload you ymal config so I can compare


#14

I have not really looked at any HA internals yet. I hope to someday but have too many other projects going on right now. I just knew the Tasmota auto discovery was new and preferred and so I switch my real Tasmota devices over to it this past weekend.

The reversed numbering was a minor nuisance that was mostly and easily worked around. I assumed that was how OpenHAB preferred things so didn’t raise it as an issue.

Here is my current YAML. It’s been pretty solid now for several days.

cover blind:
  - platform: mqtt
    unique_id: "front_blinds"
    name: "Front Blinds"
    device_class: blind
    retain: true
    availability_topic: "tele/front_blinds/LWT"
    payload_available: "Online"
    payload_not_available: "Offline"
    state_topic: "stat/front_blinds/STATE"
    value_template: "{% if value == '100' -%}closed{%- else -%}open{%- endif %}"
    tilt_command_topic: "cmnd/front_blinds/POWER"
    tilt_status_topic: "stat/front_blinds/STATE"
    tilt_closed_value: 100
    tilt_opened_value: 0

The trickiest part is the value_template. The HA cover support is slightly incomplete, IMO. If explicit state support is provided by the device, it is used as the device state. If no explicit state support is provided but position support is provided, then the position is used to determine the device state. If neither explicit state is supported nor position support, then the device state is undefined. IMO, tilt should be used if available to determine state in the last case. The value_template provides the otherwise missing state.


#15

Thanks for this. I would like to use you setup as the base for auto discovery.
Thanks for the knowledge on cover example being incomplete as I have been unable to get their template working, getting errors etc.


#16

I’m happy to help. BTW, one thing I though of if you’re willing to add it is this. A better solution than my value_template would be to have a new or changed topic that reports the expected state values of OPEN or CLOSED.


#17

If we could get a 360-degree firmware, that would be awesome!

How can we “buy you a beer?”!


#18

The new version I am working on has the ability to set open and closed positions.
this could work with 360 servo ?


#19

I was beginning to wonder if you’d forgotten about those features. Just kidding, I know how real life and other things can get in the way. No hurry for me.