Pages: 1 [2]   Go Down
Author Topic: Scrap what I've got - lets get the right stuff.  (Read 1599 times)
0 Members and 1 Guest are viewing this topic.
South Africa
Offline Offline
Sr. Member
****
Karma: 0
Posts: 356
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What I plan is a series of magnetic contacts on the doors and windows of each room ( we live in a high crime country, and robbery & murder is, well, lets just say we don't get surprised any more ).

So I have 12V+ to a resistor and an LED showing the circuit is alive. Each closed contact in the room connected in series to the - contact on the LED. My logic is that any broken contact results in the LED going off ( as would any wires cut in the ceiling ) and the current stops flowing. It is at this point that the input pin on my board needs to detect that the current has stopped.

Due to the length of the cables, and the noise ( we on a hill - had 4 lightning strikes within 75m of the house in the last 6 months during storms ), I think I could use a 12V relay powered by the contacts circuit, with the relay contact connected to the boards ground and input pin. However, I would like it to be silent, and got the impression on the forum that an optocoupler ( same as an optoisolators ? ) would be the better option.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16523
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
However, I would like it to be silent, and got the impression on the forum that an optocoupler ( same as an optoisolators ? ) would be the better option.

Sounds like optoisolators would be a better option as they are silent and still offer electrical isolation. They are generally a 4 terminal device. Two of the pins are the input side of the opto and they are an internal led, so it would wire in series with your existing led. You may have to lower the series current limiting resistor so that the same led current flows with the now two series leds in each circuit. The two output pins of most simple optoisolators are just a simple npn transistor without the base connection. The emitter wires to your arduino ground pin and the collector can wire directly to a digital input pin. You must provide a pull-up resistor between the pin and the arduino's +5vdc pin, but that can be done by just enabling the internal pull-up for the pin with software. A low reading for the digital input pin means there is current flowing in the external led circuit and a high reading means there is no current flowing. Note that you can get optoisolator ICs that have one, two, or four independent isolators in one package if desired.

http://en.wikipedia.org/wiki/Opto-isolator

Lefty
Logged

South Africa
Offline Offline
Sr. Member
****
Karma: 0
Posts: 356
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Lefty

Thank You for the great explanation. I didn't even know about the existance of the simple npn transistor types ( without the base ). Sounds like the perfect solution for me to use.

Can you recommend any part numbers for me to use ?  I wouldn't know where to start trying to filter thru the many different ones available.

ps .. is this the sort of thing I need .. ?
http://za.rs-online.com/web/search/searchBrowseAction.html?method=getProduct&R=7085430
« Last Edit: April 10, 2011, 11:51:04 am by DaveO » Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16523
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
ps .. is this the sort of thing I need .. ?

Yes, that should work just fine.

Lefty
Logged

Pages: 1 [2]   Go Up
Jump to: