User avatar
phaze3131
Posts: 45
Joined: Thu Apr 30, 2015 3:50 am

MQTT Question - detecting/knowing curtain state

Sun Jan 17, 2016 11:40 pm

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!

DirkS
Posts: 10363
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: MQTT Question - detecting/knowing curtain state

Mon Jan 18, 2016 12:23 am

Hmmmm, what does this have to do with Pi and MQTT?

stderr
Posts: 2178
Joined: Sat Dec 01, 2012 11:29 pm

Re: MQTT Question - detecting/knowing curtain state

Mon Jan 18, 2016 2:31 am

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.

User avatar
rpdom
Posts: 17174
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: MQTT Question - detecting/knowing curtain state

Mon Jan 18, 2016 7:37 am

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.

User avatar
phaze3131
Posts: 45
Joined: Thu Apr 30, 2015 3:50 am

Re: MQTT Question - detecting/knowing curtain state

Wed Jan 20, 2016 9:42 pm

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!

User avatar
rpdom
Posts: 17174
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: MQTT Question - detecting/knowing curtain state

Thu Jan 21, 2016 8:47 am

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.

Return to “Off topic discussion”