Garage door opener working but need help with door status (30v input)

Hi all,

Very new to all of this but have an UNO board with Ethernet shield controlling my garage door via a 5v activated relay to switch the 30v circuit and works a treat.

The other half of this is that I need to read an input for the door status. I put a meter on the existing sensor on the door controller (connected to a reed switch) and it reads 0v when closed and 30v when open. I am at a bit of a loss with how to get this as an input to the arduino.

Would it be ok to use another relay? Trouble is I don't have a relay that is activated with 30v. Is it better to reduce the 30v down to 5v so I can then connect as an input? If so, how to I go about it?

Or, do I get a 5v reed switch and install that on the garage door and ignore the one already present?

Thanks.

Or, do I get a 5v reed switch and install that on the garage door and ignore the one already present?

That would be the best overall solution I would think. Wiring anything to the existing sensor switch, even if made safe for the Arduino may have unintended consequences to the existing controller.

Lefty

Thanks Lefty. I feel that this is the least complicated and dangerous but the downside is another sensor to be affixed (somehow) to the door.

More info on the existing sensor: it is attached to the door controller (actually an Ansa door systems RS-1) to sound an alarm if the door is forced open by a crowbar or similar. Here is some info on it all:

http://www.insulatedrollergaragedoors.co.uk/pdf/AnsaFittingInstructions.pdf

That is the manual for the RS-1 door controller - see page 7, section 8, code AL-12H/W for more detail on the existing reed switch and alarm unit I have with the door.

What I am trying to do is mydooropener.com under the connect door status and they talk about connecting to an alarm on your garage door for door status back to the arduino/iPhone app.

The other half of this is that I need to read an input for the door status. I put a meter on the existing sensor on the door controller (connected to a reed switch) and it reads 0v when closed and 30v when open. I am at a bit of a loss with how to get this as an input to the arduino.

This looks like a good place to use an opto-isolator. You will need a larger than 'normal' resistor for the input, something around 1500 ohms should work.

Edit: I just looked at the manual. If you do not have your alarm module connected to your house alarm system you can use the 'volt free normally closed contacts' mentioned in section 8.6 as an input to your Arduino. They are shown at the upper left corner of Figure 16. Don't forget to use a pull-up resistor.

Don

Thanks Don. I dont have it "optionally connected to house alarm" so maybe but I had noticed that volt free connection but sort of ruled it out as assumed it would only become "open" (from normally closed) when the alarm was actually triggered rather than just when the door is opened or closed normally (without force!).

I dont have it "optionally connected to house alarm" so maybe but I had noticed that volt free connection but sort of ruled it out as assumed it would only become "open" (from normally closed) when the alarm was actually triggered rather than just when the door is opened or closed normally (without force!).

I think you are correct. I guess you are back to the opto-isolator solution.

Don

Many thanks Don.

I have looked for Opto Isolators but not found anything great to be honest. Any pointers? What do i need to look for/ratings? Any help would be greatfully appreciated.

I have done a fair bit of reading - do I just get one off eBay or similar and have a play with a breadboard first? Where does the resistor go that you mention on the input and is that to restrict the voltage?

Thanks,
Si.

You can use just about any opto-isolator since there's no significant current or sensitivity involved here. I got this generic picture from Wikipedia.

For this diagram you connect terminals 1 and 2 as you would any other LED. The resistor I mentioned goes in series between your +30v signal and pin 1, pin 2 goes to common or GND of the door opener circuit. On the output side you would have a pull-up resistor (10K or so) between +5 of the Arduino and pin 3 and pin 4 goes to common or GND of the Arduino. Pin 3 goes to your Arduino digital input pin.

Don

Edit: Just in case that 30 v is ac you should connect a diode (1N4002 etc) or another LED 'backwards' across pins 1 and 2. Cathode to pin 1 and anode to pin 2.

Hm. Many thanks. I just put a multimeter on the door and it reads 0v when closed and 30v DC when open. I then switched the meter to AC and it read 60v?

Any ideas?

It all looks like DC on that side of the door controller and if I include the diode like you suggest, I guess everything will be ok!

Many thanks :slight_smile:

Any ideas?

The readings that you get depend on how the particular meter is designed. A DC meter should read 0 when connected to a sinusoidal (or any other symmetrical) AC signal. An AC meter will have varying results when measuring non-sinusoidal signals (including DC). Those results depend upon the internal configuration of the meter. You really need an oscilloscope to determine what you actually have.

... and if I include the diode like you suggest, I guess everything will be ok!

I think so.

Don

Nice one Don - finally had the time to source an opto isolator, wired it up as you suggested and tested on the bench first just with a 9v battery instead of the 30v signal to the opto isolator. Garage door sketch was then modified to enable the input pin 3 (I had it disabled like I said as only did half the project to start with). 0v (simulating when door closed) gave 1023 on the analog input pin. 9v applied to opto isolator (simulating door open) gave a much lower value on the analog input pin - can't remeber exactly what but close to zero. The sketch seemed to expect it the other way around so I swapped a >= for a <= and thus reported closed/open the other way around - looked good.

The following evening, I put the Arduino back down the garage, put in a 2.2k resistor on the input as I don't have any 1.5k ones as you suggested (I had been using a much lower value with the 9v), connected up and it works a treat :slight_smile:

Analog input pin reads 1023 when door closed and 1 when door open. My sketch seems fine and after my slight mod reports open/closed status now.

Cheers,
Si.