Pages: 1 [2] 3   Go Down
Author Topic: CO Alarm  (Read 2577 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok guys I promise I will stop with the dumb questions... I have a 5 prong relay, I understand where the wires go except for the "trigger" from pin 12 on my Arduino ... using digitalWrite HIGH signal to activate the relay... where do I ground pin 12? To the 12v power supply? It seems if I ground to the Arduino it isn't a complete circuit. Please go easy on me I'm on my first cup of coffee. :-)
 
Logged

Queens, New York
Offline Offline
Faraday Member
**
Karma: 67
Posts: 2944
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Put it to ground with a current limiting resistor, of say 3-5K ohms. If that is too much resistance, drop it to 1K.

Also as stated earlier, make sure you include a diode with that output, so that there is no back flow to the arduino.

DVDdoug also said,
Quote
It needs to have a Peak Reverse Voltage rating above the relay's coil voltage, and a Forward Current rating greater than the coil current.
« Last Edit: November 16, 2012, 11:52:31 am by HazardsMind » Logged

Created Libraries:
NPV2 (NewPasswordV2),  TFT_Extension, OneWireKeypad, SerialServo.
Will provide libraries if asked in PM or forum.

Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks Hazard, I have a diode on the output .... I'll stick a resistor on the neg side... the neg of the external power supply, not the Arduino correct?
Logged

Queens, New York
Offline Offline
Faraday Member
**
Karma: 67
Posts: 2944
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Wait!! If your triggering the relay with one of the pins from the arduino then you need to ground it from the arduino, unless both the external power supply and the arduino have a common ground, then it wont matter. But just in case they dont, ground it to the arduino.
Logged

Created Libraries:
NPV2 (NewPasswordV2),  TFT_Extension, OneWireKeypad, SerialServo.
Will provide libraries if asked in PM or forum.

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 149
Posts: 2790
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Since I am new to this where do you guys prefer to order your parts? I'd like somewhere in the U.S.A. that is priced reasonably with fast shipping and good customer service. Of course I'd pay slightly more providing the last two criteria were exceptional.

I buy most small parts from digikey.com, mouser.com, and jameco.com. All three have inexpensive Priority Mail
shipping that typically takes only 2 days. They also all carry a lot of Arduino stuff nowadays, especially jameco.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OK I think I'm going to hold off on this for a bit until I have a better understanding of what I need to do. This relay I have is rated for 30 amps and the horn specs says it draws up to 18 amps. I think the optoisolator sounds like the best idea so far to avoid frying the Arduino. I just don't know where I can find one that would handle 18 amps. All the ones I'm seeing are rated much much lower than that.
Logged

Queens, New York
Offline Offline
Faraday Member
**
Karma: 67
Posts: 2944
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

As long as the arduino has its own reccomended power supply and the horn has it own power supply AND they both have a common ground; the arduino will not fry.
Logged

Created Libraries:
NPV2 (NewPasswordV2),  TFT_Extension, OneWireKeypad, SerialServo.
Will provide libraries if asked in PM or forum.

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 149
Posts: 2790
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

An 18-amp horn ought to wake up the neighborhood, "shoot, that darn guy is
gassing himself again!"
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

LOL good one... yeah it is VERY loud ... you'd think there was a semi in the house .... my electrical background is very poor it's been ages since school and I'm not even sure I know what a "common ground" is... the relay has 5 pins 30, 85,86, 87 and 87a (in the middle). Every article I read on relays tells me something different and then people post saying that the article is wrong, I have yet to find two articles that agree on which pin is what. From what I gather the 30 in the signal input for the Arudion and 85 and 86 are the coils pos/neg I'm using an old ATX power supply (the yellow and black wires, 12volts) to sound the horn. Don't know where to hook both grounds, one coming from the power supply should go to the horn, would I connect the 5v Arduino ground to the horn also? Forgive me for being so confused, just not sure how everything goes.
Logged

Queens, New York
Offline Offline
Faraday Member
**
Karma: 67
Posts: 2944
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ok a "common ground" is when the ground pin from the arduino is connected to the ground wire on the horn.

Can you post a picture of the relay you have, top and bottom, also any part numbers on top.
Logged

Created Libraries:
NPV2 (NewPasswordV2),  TFT_Extension, OneWireKeypad, SerialServo.
Will provide libraries if asked in PM or forum.

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 149
Posts: 2790
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

5 pins likely means 3 pins for SPST contacts and 2 pins for coil. With a DMM, you can figure out
the connections in 30-sec. 10-20-50 ohms for the coil, short for the NC [normally closed]
contacts.

You will probably need a relay driver to interface with the Arduino,

http://www.google.com/search?num=10&hl=en&safe=off&site=imghp&tbm=isch&source=hp&biw=1012&bih=830&q=npn+relay+driver&oq=npn+relay+driver&gs_l=img.3...1777.5836.0.5961.16.7.0.9.9.0.119.620.6j1.7.0...0.0...1ac.1.eJ74_MOVo-c
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks Hazard, here are pictures of the relay... the horn is nothing special, just a pos/neg post on it. The specs are 18amps/12v.


* 1117122138.jpg (419.12 KB, 2048x1536 - viewed 14 times.)

* 1117122138a.jpg (447.06 KB, 2048x1536 - viewed 16 times.)
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks Dan, I have a DMM and checked the posts... I have 78 ohms between 85 and 86, and 2.5 ohms between 87a(center pin) and 30. 87 pin gives no reading with any combination of the others. So as I suspected 85 and 86 is the coil and I'm guessing 30 would be the 12v pos in and 87 would be the Arduino connection in the NC configuration.. when my code sends a HIGH signal to 87 it will complete the connection? Does this sound right? I take the ground from the ATX PS and connect it to my Arduino ground. I'm starting to understand but just afraid to connect it all and throw some juice into it lol.
Logged

Queens, New York
Offline Offline
Faraday Member
**
Karma: 67
Posts: 2944
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ok on the top of the relay shows you what connections are what. 85 and 86 are the contacts to the coil, connect the diode to those two contacts. the other three are going to be for the horn. 87 and 87a are your SPDT (single pole, double throw) contacts. One is normally open meaning NO connection to the common contact (that is the 3rd contact of the 3 contacts), it should also be numbered (look on top). the other contact is your normally closed contact that IS connected to the relay when the relay is not in use, or not triggered by the coil.

It should say which contact is NO or NC on the top in the picture. You want the horn to only be triggered when you tell it to by the arduino, so you will wire it like this:
Code:
        NC o    o NO => to horn, other wire to ground (only triggered by ard)
            \
             o <==12V (common)
(Ard) coil o====o coil (ground)
           --|<|--  (diode)
« Last Edit: November 18, 2012, 12:58:19 am by HazardsMind » Logged

Created Libraries:
NPV2 (NewPasswordV2),  TFT_Extension, OneWireKeypad, SerialServo.
Will provide libraries if asked in PM or forum.

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 149
Posts: 2790
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry I meant to say SPDT.

You seem to have the relay pinout wrong. It's right there on the case. Coil = 85-86, polarity probably
does not matter. Put the voltage source for the horn on pin 30 and the horn on pin 87.

Appears to take 14V on the coil to pull in the contacts [12V will likely work], and as mentioned last time,
you'll need a transistor driver, so see the link I gave.
Logged

Pages: 1 [2] 3   Go Up
Jump to: