Page 1 of 1
MQTT Question - detecting/knowing curtain state
Posted: Sun Jan 17, 2016 11:40 pm
by phaze3131
Hey guys, I'm running an Arduino that has a Stepper Motor attached and acts as an mqtt client of a RPI that is the broker.
My question is sort of general and related to what is possible with how I can tell what length the curtains are drawn down.
Will my arduino be able to know what state the curtains are in?
Will it know that the curtains are fully drawn or when they are half drawn?
If the arduino cannot tell what state the curtains are in, would or could I use several door sensors along the sides to detect when the curtains pass next to the sensors.
Thanks for all the help!
Re: MQTT Question - detecting/knowing curtain state
Posted: Mon Jan 18, 2016 12:23 am
by DirkS
Hmmmm, what does this have to do with Pi and MQTT?
Re: MQTT Question - detecting/knowing curtain state
Posted: Mon Jan 18, 2016 2:31 am
by stderr
phaze3131 wrote:My question is sort of general and related to what is possible with how I can tell what length the curtains are drawn down. Will my arduino be able to know what state the curtains are in? Will it know that the curtains are fully drawn or when they are half drawn?
How are you telling the stepper motor to step? Couldn't you keep track of that and just assume that it was doing what it was told?
I guess you could make sure by taking a picture of the drapes and the turning it into edges and then seeing where the edge on the bottom of the drapes was.
Re: MQTT Question - detecting/knowing curtain state
Posted: Mon Jan 18, 2016 7:37 am
by rpdom
stderr wrote:[How are you telling the stepper motor to step? Couldn't you keep track of that and just assume that it was doing what it was told?
This is a reasonable way to do it, but add a limit switch at the limits of travel to prevent it going too far. This can also be used to recalibrate if the current position is lost or in doubt for any reason. Just open the curtain until the switch is triggered and you now know the absolute position is 0. Then you can step back to the desired position.
Re: MQTT Question - detecting/knowing curtain state
Posted: Wed Jan 20, 2016 9:42 pm
by phaze3131
wow thanks so much for the replies, about the limit switch can you post a link to the limit switch device that you are talking about please?
I would attach them to the actual curtain itself right or to the wall where the curtain passes by?
thanks so much, really a big help!
Re: MQTT Question - detecting/knowing curtain state
Posted: Thu Jan 21, 2016 8:47 am
by rpdom
phaze3131 wrote:wow thanks so much for the replies, about the limit switch can you post a link to the limit switch device that you are talking about please?
I didn't have any particular switch in mind. I'd just poke around my spares bin and see what I had. Probably a microswitch, rigged so that the switch gets pressed when the curtain reaches the end of its travel.