Relay actuator as pulse
-
For my garagedoor I would like to build a relay actuator with a slightly different functionality.
My Hörmann garagedoor motor works with pulse contact to activate up or down.
Two relays are needed, one for up and one for down.
When making a short contact (say using relay 1) the door starts to go up. Again making a short contact would stop the door (for intervention). When making contact again it will continue to go up, as a cycle until the door is completely open or the second contact is activated to close it. The second contact is used to close the door having the same procedure.
So the relay should make contact for 1-2 seconds and then release again.How can I arrange this?
-
Use the relay example, but change the digitalWrite part to something similar to
DigitalWrite(... ON);
gw.wait(1000); // wait 1 second
DigitalWrite(... OFF);I'm only on mobile now and it seems impossible to copy code from the Codebender examples but I hope you get the idea.
-
I'm using a similar approach to control my lights and shutter. I'm storing the value of the relay and the time of the last change. If the value is 1 (on) I check the time: lastChange + duration the relay should stay on is checked against Millis(). If it is smaller the relay is shut off.
I could post an example tomorrow, it is a bit hard with my mobile. ;-)
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login