Just get the curtains to open and close first - I would use a motor and pulley - attach magnets to the cord so you can detect open or closed , or maybe try to sense motor current .
Then move onto trying the more complex bits - if you try and sort it all
Out at step one , you probably won’t get started .
Have a look at some of the commercial kit too, for ideas .
Sens force to do detect crashes or end position while running normally.
Use force generated by user while motor is idle to start motor. (I.e. i want to pull it open manually) Would be nice if force direction can be sensed.
These are two very different things.
You can certainly measure the current flowing into the motor to determine when an end-stop causes the motor to stall.
But when a motor is idle it won't present any resistance to the user so the motor current cannot be used to determine the user input. You could perhaps have a motion sensor (such as an encoder on the motor shaft) to detect when the pull by the user causes the motor to start rotating OR you could have a force sensor on the pull cord.
Thanks a lot for your answers. @JCA34F and @Robin2 I thought, that turning a motor actively causes it to act as a generator and therefore I expected a current.
Anyways, the motion sensor idea sounds better and easier.
Therefore, I will go for a driver with current limiter as proposed by DrDiettrich and a motion sensor (optical or hall based).
One last question. Assuming someone pulls the curtains with force. How do I prevent damages to the electronic?
There is certainly a mechanical approach as here. But any simpler/more elegant ideas are welcome.
Robin2:
But when a motor is idle it won't present any resistance to the user so the motor current cannot be used to determine the user input.
That is not true. When a motor is not powered its inertia and inertia of its gearing will present some resistance to the user. If they overcome this the motor will generate voltage and/or current. If the speed is low the voltage will be small but I think it can be easily sensed - maybe more easily than when being driven.
Smajdalf:
That is not true. When a motor is not powered its inertia and inertia of its gearing will present some resistance to the user. If they overcome this the motor will generate voltage and/or current. If the speed is low the voltage will be small but I think it can be easily sensed - maybe more easily than when being driven.
I agree. But in the context of the OP's project and his experience I don't think it is practical and that was the basis for my Reply #4
Idle behaviour depends on the motor driver settings. In brake (shorted) state the motor generator produces most inertia, not so in disabled state (open circuit).
Thanks for the clarification. I was thinking about the shorted state. Therefore @Smajdalfs point is exactly what I intended first. But a current limiting driver (set to open circuit if not in use) and a rotary encoder should serve my purpose.
You all are awesome. I wouldn't have expected that many and good inputs.
There should be many automated curtain setups available if you search. I'd suggest you find/develop a motor setup that can move your curtains as needed, then work on the various ways to control it.