Pages: [1] 2   Go Down
Author Topic: Home Alarm - please check my diagrams  (Read 3187 times)
0 Members and 1 Guest are viewing this topic.
South Africa
Offline Offline
Sr. Member
****
Karma: 2
Posts: 416
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Would appreciate any comments or suggestions on the following circuit diagrams for a home alarm system.

Living out of a big city and in Africa, deliveries are slow, so I need to complete my 'shopping list' right the first time.

Diagram 1 is for the output via an optocoupler to power a 12V siren and strobe light.


Diagram 2 is same as diagram 1, but using a MOSFET to power the devices. Which would be the better option to use ?


Diagram 3 is for INPUT of an alarm activation by breaking the magnetic door or window contacts.
When armed, pin 5 registers LOW. When the contact is broken, the optocoupler is inactive and the 10K pull up makes pin 5 detect HIGH.


Diagram 5 is a passive infra-red motion detector. runs on 12V and has a built in relay (N/O) which will change to N/C when motion is detected. The program will look for the input pin to be LOW to detect the motion trigger.


Diagram 6 connects multiple DS18B20 temperature sensors to a single pin.

Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 217
Posts: 13734
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Schematics look OK to me, but I am no electric engineer.
With the delivery modus you mention I can only advice you to order enough spare parts, mistakes happen, malfunction devices happen, and you will allways have the possibilty to extend your system .
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Offline Offline
Jr. Member
**
Karma: 0
Posts: 89
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hi
You need 2 resistor in the gate(voltage divisor 68k> 48 k> to ground) in the MOSFET.
Logged

Montreal
Offline Offline
Faraday Member
**
Karma: 29
Posts: 2591
Per aspera ad astra.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Schematic 1 - wrong, not enough current optocouple could supply, driver required.
Schematic 2 - wrong, as already pointed out resistor missing.
Schematic 3,5 - wrong, output transistor of the optocouple is inverted
(collector must be connected to V+ rail).
 
Logged

nr Bundaberg, Australia
Online Online
Tesla Member
***
Karma: 129
Posts: 8524
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

3,5, the opto LED is wrong way around as well, just flip the whole component.
2, wouldn't you have a resistor pulling the gate to 12v?
2, is that a logic-level MosFET? If not it may not fully turn on.

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

South Africa
Offline Offline
Sr. Member
****
Karma: 2
Posts: 416
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Many Thanks for the responses.

OK. Let's see if I understand the feedback.

So drawing 1 must be deleted as the optocoupler is not capable of powering any external devices without something like a MOSFET or Relay to boost the power to the device.

Drawing 2. Are you saying that I should, on the optocoupler, have the transistors collector to 12V+, and the transistors emitter to 2 resistors to reduce the power to the MOSFET, (and a pull down resistor to prevent any floating of the gate pin ?) ?

I am not sure if this is a logic-level MosFET. The data sheet is :
http://docs-europe.electrocomponents.com/webdocs/0e52/0900766b80e525f1.pdf
Advice needed please.

Drawing 3 and 5. So it should be orientated as follows : (?)
Also, it would be safe to remove the LED from the drawing ?

Logged

South Africa
Offline Offline
Sr. Member
****
Karma: 2
Posts: 416
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Alternatively, would it be better to replace drawing 5 with drawing 7 so that the long wires to the sensor are carrying Gnd instead of 12V+ ?

Logged

nr Bundaberg, Australia
Online Online
Tesla Member
***
Karma: 129
Posts: 8524
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The link is to the opto, but never mind I googled the FET.

It has a typical Vgs(th) (threshold voltage) of 1.5v so that means it will be well turned on by 5v. Apart from that the second bullet point on the data sheet says "logic level gate drive".

Quote
Also, it would be safe to remove the LED from the drawing ?
Yes, just look at the current-limiting resistor, that will need to be upped.

3 and 5 are now right.

2, I'm not a FET expert, but I think as you are actively pulling the gate down (off) this needs a pull up resistor on the gate to ensure it turns on when the opto is not active. Now that we've determined this is a logic level FET I guess that pull up could go to either 5v or 12v. In this situation I don't think you need a series resistor on the gate, the small and infrequent inrush current will not harm the opto.

Quote
So drawing 1 must be deleted as the optocoupler is not capable of powering any external devices without something like a MOSFET or Relay to boost the power to the device.
Correct.

______
Rob

Logged

Rob Gray aka the GRAYnomad www.robgray.com

nr Bundaberg, Australia
Online Online
Tesla Member
***
Karma: 129
Posts: 8524
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Another thing to think about is the line length and environment for the wires on the FET. FETs are quite prone to ESD so while this is OK on paper it is not a good design I think for the real world.

I'd either use a transistor instead or have the FET throw a small (onboard) relay that in turn operates the remote siren etc.

If you do this you can ditch the opto as you get isolation with the relay.

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

South Africa
Offline Offline
Sr. Member
****
Karma: 2
Posts: 416
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The link is to the opto, but never mind I googled the FET.

It has a typical Vgs(th) (threshold voltage) of 1.5v so that means it will be well turned on by 5v. Apart from that the second bullet point on the data sheet says "logic level gate drive".

Thanks Rob. Explains why I could not see the wood from the trees.

2, I'm not a FET expert, but I think as you are actively pulling the gate down (off) this needs a pull up resistor on the gate to ensure it turns on when the opto is not active. Now that we've determined this is a logic level FET I guess that pull up could go to either 5v or 12v. In this situation I don't think you need a series resistor on the gate, the small and infrequent inrush current will not harm the opto.

So if I convert drawing 2 to drawing 8, then the MosFET will remain in a Off - non-conductive state until I power the optocoupler from the boards Pin.



Another thing to think about is the line length and environment for the wires on the FET. FETs are quite prone to ESD so while this is OK on paper it is not a good design I think for the real world.
I'd either use a transistor instead or have the FET throw a small (onboard) relay that in turn operates the remote siren etc.
If you do this you can ditch the opto as you get isolation with the relay.

Would the ESD affect the D/S line of the MosFET, or only the Gate side ?  The distance from the optocoupler to the Gate will be very short ( centimeters ) whereas the distance from the D terminal to the external device can be between 3 and 40 meters.
Logged

nr Bundaberg, Australia
Online Online
Tesla Member
***
Karma: 129
Posts: 8524
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I think...(pauses for FET expert to step in)...that ESD is a problem on all terminals and that 40 metres is asking for trouble.

If you drive the FET directly from the Arduino and have it drive a small relay then the C and NO terminals of the relay can control the siren and they are immune to everything.

I may not be right about the ESD but at least I'm safe smiley

______
Rob
« Last Edit: April 19, 2011, 02:43:08 am by Graynomad » Logged

Rob Gray aka the GRAYnomad www.robgray.com

South Africa
Offline Offline
Sr. Member
****
Karma: 2
Posts: 416
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think...(pauses for FET expert to step in)...that ESD is a problem on all terminals and that 40 metres is asking for trouble.

If you drive the FET directly from the Arduino and have it drive a small relay then the C and NO terminals of the relay can control the siren and they are immune to everything.

I may not be right about the ESD but at least I'm safe smiley

______
Rob

Thanks again Rob.  
So I can't replace both the opto and the FET with a small 5v relay, as the relay requires 0.2A which, I 'think' is too much for the board output pin.
Also I can't keep the opto and replace the FET with a relay, as the opto can't power the relay.

So would need either :
1. the pin driving a transistor ( like 2N2222A ) driving the relay, or
2. the pin driving a FET driving the relay.

I was hoping for a silent option, that's why I was looking at the MosFET in preference to a relay.

ps .. any comment on drawing 7 ?
« Last Edit: April 19, 2011, 02:53:10 am by DaveO » Logged

nr Bundaberg, Australia
Online Online
Tesla Member
***
Karma: 129
Posts: 8524
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
So would need either :
1. the pin driving a transistor ( like 2N2222A ) driving the relay, or
2. the pin driving a FET driving the relay.
Yes.

Quote
I was hoping for a silent option,
Then I'd replace the FET with a power transistor. That should do the same job and AFIAK normal transistors aren't overly worried about the real world. You would have to look at the heat dissipated though if the siren needs a lot of grunt, OR, use a small transistor with a relay up at the siren.

Drawing 7 is close (and right to have GND on the long wire BTW) but flip the opto transistor so the collector goes to the Arduino and emitter to GND. (The LED side is right.)

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

South Africa
Offline Offline
Sr. Member
****
Karma: 2
Posts: 416
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OK. I think that I can live with the occasional relay noise, so for simplicity, I have changed to the following :

Diagram 9 is for the output to power a 12V siren and strobe light via a 5V relay.


Diagram 11 is for INPUT of an alarm activation by breaking the magnetic door or window contacts.
When armed, pin 5 registers LOW. When the contact is broken, the optocoupler is inactive and the 10K pull up makes the Input pin detect HIGH.


Diagram 10 is a passive infra-red motion detector. runs on 12V and has a built in relay (N/O) which will change to N/C when motion is detected. The program will look for the input pin to be LOW to detect the motion trigger.


Diagram 12 connects multiple DS18B20 temperature sensors to a single pin.


« Last Edit: April 19, 2011, 06:48:51 am by DaveO » Logged

nr Bundaberg, Australia
Online Online
Tesla Member
***
Karma: 129
Posts: 8524
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

No pics.
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Pages: [1] 2   Go Up
Jump to: