Motor on rollerblind

Hey! I am working on a project where I put a stepper motor (28byj-48) on a rollerblind and want to have a physical button but also later might add Google Home to it, I am thinking that it would be good to start of with a good code for the project without Google Home and add it later, I could use a Arduino nano to start with and change to ESP3266 later. So what i want my code to do (singlebutton)

1. First startup calibrate maximum distance (how many steps it can go up and down) and I am thinking about pressing three times and holding the button down until it reaches the maximum level (for ex down) and then up. Storing these to be use until next calibration? Is it possible...? I mean that if your power goes out it can save so it knows where it is and what calibration is done. Just a wonder because that would be really good.

2. Go up or down when button is pressed (depends on where the rollerblind is) and a add on would be to single press and hold to get to a position between up/down since you some times only want to have it slightly down or up.

Is this possible and what should i start with?
I have trying around with the steppermotor example and I have basic understanding of programming but not at this level.

Thanks for help//
Best Regards
this sounds about right. A lot of the motors I did would do what you are saying -- it was automated, but they would run to the extreme positions and figure out what the range is. We even had warnings if this was too low (it probably meant something was physically locked up / broken) and so on. I would advise trying to automate #1 later but its fine to do manually at first. Its also fine to do it once and keep the value at first -- its not likely to change while you are debugging it.

2) sounds fine too. You may want multiple positions, say 0,25,50,100 % jumps. It saves a lot of time if the motor is slow.

if the power goes out you probably lost it all. The safest thing to do is recalibrate if something like that happens. A lot of motors know where they are (but not the extreme ends) ... does yours not have a potentiometer that gives position?

it sounds like you already have done enough to just go for it... start with the basics, I guess.. I would start with getting the input resolved, whatever your input device is, make sure you can read it properly etc.
It is also possible to write information into the flash for program storage, but you do need to be careful about how often you write to the flash to avoid burn out.

One of the first things you will probably want to determine is that the speed of the stepper is adequate, and that the stepper has adequate torque to handle the weight involved, especially since the torque of the motor you plan to use is very low.




modern flash has a LOT of writes before it dies, I would think the motor would wear out first so long as you don't write it every time.
Topic archived. No new replies allowed.