I'm working on a project to control my garage door opener with my smartphone.
The basic stuff is fairly simple, just use a DPDT relay to close a circuit. But I would like to add some other stuff.
The garage door opener has a bunch of connectors, but there are 4 that are interesting to me: J, J', F, F'.
The F-couple triggers the motor, F has normally +/- 21 vdc on it and F' is a permanent ground for F.
The J-couple is more interesting:
J always has 21 vdc on it, but J' connected to a ground when the garage door is open, but not when it is closed.
The schematics for wiring up a additional receiver tell me to take power from J, and ground from F' to power the receiver, which used a relay to close F to F' when activated.
Same works for the arduino: drop the 21 vdc from J to 9 vdc using a voltage regulator, to feed to Vin and connect F' to GND. And connect F to COM and F' to NO of the relay.
Now I would like to detect if the garage door is open or not, (is J' connected to ground?) but I have no idea how to do this.
If You can make the smartphone controll th DPDT You're almost home already.
Why not convert from 21 volt to 5 and get a much more rigid digital world if that will be the future?
At what distance do You want to detect that open door?
I suggest you interface with the door mechanism thru the normal control so you don't bypass any incorporated safety features. You might look at the wifi shields so you can have a wireless web server that your phone can connect to. Then you can have s simple static web page on your phone to control the door.
There is currently a 2 wire (F and F') cable from the opener to a switch next to the garage door (on the inside), the length of the cable is probably around 3-3.5 meters, pushing the buttons connect the 2 and activates the motor.
And I would like to mount the arduino to the wall about the same place.
So the basic idea was a 4 wire cable (J, J', F and F') so distance should make too much difference.
Just need to know how I can determine if J-J' is a closed circuit (aka. if J' is connected to ground).
What would the benefit be of going down to 5vdc instead of 9vdc, 9vdc would be well in range of the voltages accepted for the Vin-pin. I do know that going down to 5vdc instead of to 9vdc does have a disadvantage, they voltage regulator will produce more heat to shed the excess voltage.
zoomkat:
I suggest you interface with the door mechanism thru the normal control so you don't bypass any incorporated safety features. You might look at the wifi shields so you can have a wireless web server that your phone can connect to. Then you can have s simple static web page on your phone to control the door.
I was considering just using a HC-06 Bluetooth module, and use a bluetooth terminal or a custom app (web and mobile apps are my daytime job) to control the arduino.
What is the desired minimum distance between the garage and the smartphone for this project?
A buckkonverter reducing 21 volt to 5 volt will preserve the poor onboard regulator from that heat and additional communication devices like Bluetooth, RF etc might be powered from the same 5 volt source which will not be favourable using line 9 volt.
For distance, 9m / 30' (Bluetooth range) is more that enough.
The main idea was to replace an externally mounted keypad:
Because they are battery operated (hence the batteries can die)
They are accessible to everyone, so they could be messed with.
Beside the pincode the app could also send the UUID of the smartphone that was used, and possible use a different pincode for different users/smartphones.
That way one could keep a log of who enters at what times ..
Jurgen
PS. I don't think I can power the relay directly from the power supply, as I don't plan to use an arduino relay module but a 8 pin dpdt relay (5v, 30mA coil), so I would go directly from a digital pin to the relay.
If I'm not mistaking those digital pins can provide up to 40mA so it should be enough to trigger the relay, no?
The first thing you might do is get the Bluetooth module and the Arduino and get your phone communicating with them. The remaining mechanical/electrical interfacing stuff should be pretty straight forward.
JurgenP:
There is currently a 2 wire (F and F') cable from the opener to a switch next to the garage door (on the inside), the length of the cable is probably around 3-3.5 meters, pushing the buttons connect the 2 and activates the motor.
Would seem a simple approach to wire a n/o set of relay contacts across this ( as mentioned above....retaining safety features etc.).
No idea why you think you need a dpdt relay.
Coil for the relay can then be energised by whatever of a million alternatives.
bluejets:
Would seem a simple approach to wire a n/o set of relay contacts across this ( as mentioned above....retaining safety features etc.).
No idea why you think you need a dpdt relay.
Coil for the relay can then be energised by whatever of a million alternatives.
It is simple enough, I want to keep the NC-sides of both poles to extend the wires to the manual switch which is already in place, and connect the NO-sides.
That way when the relay is not activated, the wires go to the manual switch ...
But this being said ... We covered a lot of topics, except my initial question:
Is there any way to detect whether of not J' is connected to ground at a certain moment (ascertaining whether the garage door is open or closed)
"Is there any way to detect whether of not J' is connected to ground at a certain moment (ascertaining whether the garage door is open or closed)"
for things like that I would just us some micro switches connected to the Arduino and stay separated from the door electronics. What you would be getting from the J' would probably be closed/not closed with no open detection indication.
JurgenP:
It is simple enough, I want to keep the NC-sides of both poles to extend the wires to the manual switch which is already in place, and connect the NO-sides.
That way when the relay is not activated, the wires go to the manual switch ...
Completely unnecessary. You can (short of absurdity) connect as many switches or N/O relay contacts as you like, in parallel - it makes no difference whatsoever.
JurgenP:
But this being said ... We covered a lot of topics, except my initial question:
Is there any way to detect whether of not J' is connected to ground at a certain moment (ascertaining whether the garage door is open or closed)
If you have an output (pair) that generates enough voltage (and current) to light a LED with a current limiting resistor, than you connect that and the current limit resistor (calculated for 4 mA) to the LED side of an opto-coupler and connect the output phototransistor to an Arduino input and ground, setting it to INPUT_PULLUP.
J is always 21 volts
J' at ground when the door is open.
AC or DC ?
assuming AC because there would not be any reason to have 21V DC on such a device
Create a voltage rectifier with 4 diodes.
connect a voltage divider to bring it to 5 volts so you do not damage an input pin.
10K and 3K would work.
bring that to a digial pin and read it.
if you prefer, get an opto-isolator, it will work just like an LED, so calculate current for between 10 and 20mA
as a note, if you put a magnet on the top of the door and a Hall switch on teh door jamb to detect when it is down, you can know if it is closed. remember, anyone can stop the door movement part way.
Since WiFi is so simple these days, I would considder adding a way to send a txt to your phone if/when it is open when it should not be.
dave-in-nj:
J is always 21 volts
J' at ground when the door is open.
AC or DC ?
20.9 V DC ... on the J, but it is the J' (the ground) that is switched on/off.
Had it been J it had been simple, but it is the ground one (J') and I don't think arduino likes negative voltages very much ...
dave-in-nj:
Since WiFi is so simple these days, I would considder adding a way to send a txt to your phone if/when it is open when it should not be.
The garage is semi-detached from the house, I would need to check if there is WiFi-reception in there.
But is a feature that might be worth implementing. And as I'm considering transferring the finished circuit from an Arduino Uno / HC-06 to an ESP32 (as I would like to have the entire solution on a single PCB) I would already have the necessary hardware as well ...
Using the J.. signals has the advantage of telling what the "opinion" of the door logic is. Micro switches will not tell that.
Using an opto coupler, a diode and a resistor is a safe way to tap that signal into an Arduino.
"Using the J.. signals has the advantage of telling what the "opinion" of the door logic is"
Maybe you can explain the "opinion" part. Sounds a little "subjective". In a lot of applications, like large motor operated valves and such, definitive position indication is usually derived from two limit switches, one indicating open/not open, and the other indicating closed/not closed. A single two state condition voltage/no voltage will usually indicate only one binary sate.
Okey. The important thing is what the door logic and machinary is doing. If, for example, the door logic is trying to close the door but it doesn.'t get a confirmation that the door is cloosed it will consider the door as "not cloosed". Then it might be fighting to close the door, burning the motor down etc.... Suppose something, a branch of a tree or some stuff in the garage has fallen and is blocking the door cloosing?
External sencing devices suggested here might tell a different story.
So, for safety, use the "door cloosed" signal from the existing installation. Got it now?
"So, for safety, use the "door cloosed" signal from the existing installation. Got it now?"
Oh, I've known that. It just seems some may have loosely used a single digital input to determine if the door is closed/open instead of closed/not closed. There is a difference.
Railroader:
Using the J.. signals has the advantage of telling what the "opinion" of the door logic is. Micro switches will not tell that.
Using an opto coupler, a diode and a resistor is a safe way to tap that signal into an Arduino.
Thank you, for this answer. Though I still will need to find out exactly what components I'll need for that.
I would assume that the "dst-1r4p-n" board would work, but it is a 4 channel.
Would it be possible to build a simplified version (lose the LEDs and the resisters that protect them) of this oneself?
Like I said before, I would like to keep everything on a single PCB.
Why noy use a simple logic MOSFET and maybe a little relay to do the same as the existing button? One question using a digital and fast processor is how long does the button press need to be? Search the technical documentation or try Yourself testing very short button pressings making them longer in time untill it works.
Or, do You need to keep the button pressed until the door is closed?