Hi guys, Ive setup a garage open and close sketch on my arduino and it works great.
I have the open door connection connected to relay 1
I have the close door connection connected to relay 2
The only drama i have is when the connection is on "NC" with a blackout the relay closes the circuit when the power comes on and opens the garage door. If the connection is on "NO" with a blackout the relay closes the circuit when the power turns off and opens the garage door.
The relay is one of those cheap Chinese ones so that could be the issue, I just want to check with you guys for options first.
You're probably not using just a relay but a relay module. Please provide a link.
But you probably need to add a pull resistor in the right direction to keep the relay in the state you like. And it would make sense to make that the OFF state of the relay and to use the NO contact on the relay to control stuff.
Hmm, now that you mention it, possibly seeing the old problem with the active-low opto-coupled relay modules where you set the control pin to OUTPUT before writing it HIGH and it briefly "glitches".
Please read the first post in any forum entitled how to use this forum. http://forum.arduino.cc/index.php/topic,148850.0.html . Then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
Thanks guys, I have no idea about the schematics. The relay is a relay module (attached)
Relay 1 running off pin 3
Relay 2 running off pin 6
and the sketch running is also attached. Perhaps there is something in the code that I can amend.
The android plugin im running is autoarduino which calls pins High and Low using tasker.
But as I said the issue is a blackout fault and only happens turning on and off of the arduino and relay module.
On my garage motor controller i have up only and down only buttons. I just ran the positive and negative of the buttons back to the relay modules. Previously it was setup just to the garage door button which was either up or down and you never new which direction it was going. As far as getting any more advanced than that, I would require help on here.