Offline
Newbie
Karma: 0
Posts: 26
|
 |
« Reply #15 on: November 16, 2012, 11:23:07 am » |
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
Edison Member
Karma: 29
Posts: 1563
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
|
 |
« Reply #16 on: November 16, 2012, 11:42:43 am » |
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, 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
|
UNO, MEGA, NANO, 4x4 keypad, micro servos, RF transceivers, bluetooth, ultrasonic sensor, 20x4 I2C LCD, 3.2 TFT touch screen, L298N Dual motor driver, Voice Recognition 15W, Gameduino
Arduino Tutorials, coming soon.
"If your doing nothing, it does not mean your lazy, it just means your open for anything that suits you" - Unknown
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 26
|
 |
« Reply #17 on: November 16, 2012, 12:19:02 pm » |
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
Edison Member
Karma: 29
Posts: 1563
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
|
 |
« Reply #18 on: November 16, 2012, 12:22:31 pm » |
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
|
UNO, MEGA, NANO, 4x4 keypad, micro servos, RF transceivers, bluetooth, ultrasonic sensor, 20x4 I2C LCD, 3.2 TFT touch screen, L298N Dual motor driver, Voice Recognition 15W, Gameduino
Arduino Tutorials, coming soon.
"If your doing nothing, it does not mean your lazy, it just means your open for anything that suits you" - Unknown
|
|
|
|
the land of sun+snow
Offline
Edison Member
Karma: 81
Posts: 2123
|
 |
« Reply #19 on: November 16, 2012, 12:40:51 pm » |
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
Newbie
Karma: 0
Posts: 26
|
 |
« Reply #20 on: November 17, 2012, 08:37:57 pm » |
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
Edison Member
Karma: 29
Posts: 1563
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
|
 |
« Reply #21 on: November 17, 2012, 08:45:35 pm » |
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
|
UNO, MEGA, NANO, 4x4 keypad, micro servos, RF transceivers, bluetooth, ultrasonic sensor, 20x4 I2C LCD, 3.2 TFT touch screen, L298N Dual motor driver, Voice Recognition 15W, Gameduino
Arduino Tutorials, coming soon.
"If your doing nothing, it does not mean your lazy, it just means your open for anything that suits you" - Unknown
|
|
|
|
the land of sun+snow
Offline
Edison Member
Karma: 81
Posts: 2123
|
 |
« Reply #22 on: November 17, 2012, 09:06:23 pm » |
An 18-amp horn ought to wake up the neighborhood, "shoot, that darn guy is gassing himself again!"
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 26
|
 |
« Reply #23 on: November 17, 2012, 09:32:31 pm » |
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
Edison Member
Karma: 29
Posts: 1563
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
|
 |
« Reply #24 on: November 17, 2012, 09:48:38 pm » |
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
|
UNO, MEGA, NANO, 4x4 keypad, micro servos, RF transceivers, bluetooth, ultrasonic sensor, 20x4 I2C LCD, 3.2 TFT touch screen, L298N Dual motor driver, Voice Recognition 15W, Gameduino
Arduino Tutorials, coming soon.
"If your doing nothing, it does not mean your lazy, it just means your open for anything that suits you" - Unknown
|
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 26
|
 |
« Reply #26 on: November 17, 2012, 10:47:08 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 26
|
 |
« Reply #27 on: November 17, 2012, 11:38:50 pm » |
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
Edison Member
Karma: 29
Posts: 1563
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
|
 |
« Reply #28 on: November 18, 2012, 12:22:13 am » |
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)
|
|
|
|
« Last Edit: November 18, 2012, 12:58:19 am by HazardsMind »
|
Logged
|
UNO, MEGA, NANO, 4x4 keypad, micro servos, RF transceivers, bluetooth, ultrasonic sensor, 20x4 I2C LCD, 3.2 TFT touch screen, L298N Dual motor driver, Voice Recognition 15W, Gameduino
Arduino Tutorials, coming soon.
"If your doing nothing, it does not mean your lazy, it just means your open for anything that suits you" - Unknown
|
|
|
|
the land of sun+snow
Offline
Edison Member
Karma: 81
Posts: 2123
|
 |
« Reply #29 on: November 18, 2012, 12:33:09 am » |
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
|
|
|
|
|
|