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?


  • Mod

    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.


  • Hero Member

    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. 😉



  • Thank!
    I'll give it a try.
    I'm new in the Arduino world and hoping to learn from more experienced users.


Log in to reply
 

Suggested Topics

25
Online

11.2k
Users

11.1k
Topics

112.5k
Posts