CO Alarm

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.

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.

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.

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.

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

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.

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.

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

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.

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.

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:

        NC o    o NO => to horn, other wire to ground (only triggered by ard)
            \
             o <==12V (common)
(Ard) coil o====o coil (ground)
           --|<|--  (diode)

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.

Btw, it is kinda hard to see the information in the pictures even when double clicked. Their blurry

To me it appears it is a dual outlet... in my mind the diagram indicates that if the horn is connected to either 85 or 86 and the Arduino to 87a (center prong) then when the relay receives the 5 volts from the Arduino it will pull the contact closed to complete the circuit for the coil on either 85 or 86. Just when I think I see what is going on I start looking at it from a different viewpoint ... I think I will splurge a few bucks on a couple of optoisolators that way I will know for a fact that I am keeping the 5v side completely away from the 12v side so I can afford a few screw ups and maybe learn something in the process. I've been doing ok with the Arduino sketches that lead me through step-by-step like a recipe but venturing into something like this is all new to me. Thank you guys for being so patient.

Sorry about the picture quality... my daughters took my AA batteries out of the good camera (without telling me of course lol) so I had to use my cell phone.

The coil is what changes where the output is going. Wire it the same way I showed in my crudely made drawing. The output pin from the arduino is going to change the output from the relay to normally closed => normally open when a current is applied to the coil. The horn does NOT get wired to the coil contacts.

Can someone else post a video or better picture then mine that is wired with something like an LED.

87a is NC (not used)
87 is NO (horn)
30 is common (12v power supply for horn)
85 (ARD)
86 (ground)

Your relay:

___ (either 87 or 87a check)

(86) | ___ |(85)

|(30)

Hope this helps you understand your relay connections.

87 |

| 86 87a| 85 |

30 |

87a (Center Prong) Reads 2 1/2 ohms with DMM.

Thanks Hazard, I found this YouTube video -

It actually matches my relay exactly and makes me see your previous explanation... it totally clicks now (pun intended) :slight_smile: Do I connect a ground wire from ARD AND the Horn to neg on the coil?

Yes