Thank you all ahead of time for your expert opinion!
Hello all, I'm really not completely sure if I have posted this in the proper topics so if I need to change it, I can (if possible). I'm hoping you all can help me with some general understanding of some code I have and potentially even a better understanding of if I'm potentially going to end up breaking the stepper motor with the direction I am headed. This code/ project is esphome based utilizing a esp8266 and I originally posted this in the "home assistant" forum. There is an ongoing thread here (with very little conversation-- I think it is more "off the shelf" type conversation over there). Additionally my code is posted at the end of this thread (it is essentially a copy of the reddit link)
I'm hoping you all can help me with the information in the below paragraphs (this is a copy- paste from the home assistant forum) or could lead me to somewhere else that you think this should be posted for some help.
I am a very basic beginner with iot/ home made solutions (I can follow tutorials). So, thank you all for any guidance you can give on hopefully getting my last issue with my blinds corrected. (I have a feeling the solution may already be provided in the code, but I just want to make sure I'm not going to break something by using it)
I pretty much have this working now in terms of it/ they will close fully (I have made 2 now). I am using the slider number input helper now also.–. code updated above in first post
One issue was that I had a bad gear in one of the stepper motors. It was clicking strangely and I had a feeling that was going on. The code above was found at the link at the end of this post and the only thing I added was the input helper so that I could control the rotation more granularly to figure out if I had a gear broke etc. (it told me what I needed to know luckily).
Currently I have 2 of these built now. (One with PCB (printed circuit board) and one kind of frankensteined together using standard wire/ jumpers)
The issue I am having now is that they are both in the fully closed position but one has a stepper motor position in the slider of -197 and the other has a stepper motor postion of -422. (see below)
So I’m essentially now trying to figure out how to standardize the positions at this point (they are the same motor and same blind so I’m fairly certain, this is a problem that can be solved with some slick idea, I just don’t know what the idea is)
I’m noticing in the code (identical to linked code below) there is a “reset dining room blinds” switch—> RESET in original code. It looks like it takes the windows through a full cycle (fully open to fully closed based on the positions of 0 which is fully closed in the down direction and 1500 which is fully closed in the up postion so 750 is at mid and lets the most light in. ----> keep these values in mind with the screenshow above which is my “fully closed down”. Maybe someone smarter than me can help me correct whatever is going on.
The thing I’m concerned about is that if we overtravel them too much and they see a bunch of resistance, will it break a gear inside of the motor? I assume the answer is yes so I feel like its a balance of taking them on a reset to the point of where they begin to see a little resistance to get them both at the 0 position at the bottom. I feel like this only has to be done once and since this code seems to store the stepper position, the only time they would get out of sync was if they were manually messed with or the motor drifted somehow.