I'd like to figure out the role/purpose of each pin. I have a pretty good idea how relays work after a little research, but I'm a novice. I've looked all over the internet for a clear diagram, and I only come across the following one. But I'm still not sure how to read it.
I see that on the left is the switch. So I assume that I can hook those up to the circuit I want to open and close. And I suspect that on the right is where I connect the 5-volt power supply (positive and negative). But I'm not sure what the middle pins connected to the coil would be for. But maybe those are where the main 5V power supply is connected?
The following applies only to the Multicomp datasheet you provided, your relay may be different.
With your relay sitting pins up in front of you as shown in the diagram with the group of four pins to your left.
top left is the Normally Closed contact
top middle is one side of the coil
top right and bottom right are the Common contact
bottom middle is the other side of the coil
bottom left is the Normally Open contact
With no current through the coil the Common contact and Normally Closed contact are closed.
With current flowing through the coil (ie. connected to +5 and ground) the Common contact and Normally Open are closed.
Normally you would not just connect the coil straight to +5 and ground, usually one side of the coil is connected to +5V and the other side to a driving transistor that will supply ground to the coil when switched on by an Arduino, for example. Note that it is extremely important to connect a diode across the coil contacts such that the diode cathode is connected to the +5V end. This protects the transistor from the inductive kickback generated when the current through a coil is interrupted.
Do you have a DMM to check the pins of the relay and the diagram you have posted?
But I'm not sure what the middle pins connected to the coil would be for.
Do you know how a relay works?
The coil is the part that when activated will switch the common from the NC (Normally Closed) contacts to the NO (Normally Open) contacts.
Thanks Due_unto and all, this is making more sense. I have been researching relays. There are just a few things I don't quite understand yet.
For example, why are the common pins needed at all? If my transistor sends current to the coil pin to do the switching (thus switching/connecting the NC and NO pins) what are the Common pins doing? I see that in most diagrams the NC is connected to the Common pins when NC and NO are open, but why does it matter that NC connects to the Common pins ever? If NC needs 5V when NC/NO is open, couldn't it just be connected to the Coil positive instead?
Below is a diagram that I am using (hopefully the relay in this example is six pin?). What I want to do is allow the relay to complete a circuit which will be connected to my digital camera's shutter. The shutter will automatically be triggered (take a photo) when the remote switch circuit is closed/activated. The camera remote shutter doesn't need any current; when the circuit is closed, it will fire the camera shutter (so I hope this relay won't send current to the camera when the coil is either off or on?).
Here is the breadboard diagram I'm planning to use and the schematic that I think Due_unto has described.
I realize this is rotated 180 degress in the breadboard diagram.
I see that in the Arduino diagram I'm using that the Arduino 5V positive is jumped from the Common pin to the Coil pin. So, it seems like the Common pin isn't necessary there. Therefore, it looks like the only reason the common pins are being used here is to facilitate that diode. But if the diode is connected to the positive current, couldn't it simply be connected to the coil's positive side? Are these extra pins there simply for convenience?
Lastly, the breadboard diagram above shows that the LED is receiving power from the NC pin (though I'm not sure if the diagram I'm showing NC means it's getting power when the switch/coil is activated or when it isn't). In my case, since don't need to add power at any point to the camera shutter circuit I want to open/close, am I using the wrong relay? It seems like this one will allow 5V to flow to the camera if the coil is either off or on (I'm not sure which).
@forestkelly:" I see that in the Arduino diagram I'm using that the Arduino 5V positive is jumped from the Common pin to the Coil pin. So, it seems like the Common pin isn't necessary there. Therefore, it looks like the only reason the common pins are being used here is to facilitate that diode."
A relay is just an electrically operated switch, using an electromagnet to move the COMMON contact. The Common pins have nothing to do with coil or the diode. It just happens in this circuit that the designer just extended the 5V from the Common pin to the coil pin for convenience.
A problem with the fritzy diagram; the black wire from the left pin of the transistor (Emitter) is jumpered to an open rail. The black wire from the Arduino should be jumpered to the blue power rail and another black jumper from the blue power rail to LED cathode. Also, it appears that the LED is hooked up to the NC side of the relay.
I'm going to assume (yeah, I know!) that you have two wires coming from your camera which you want this circuit to close to operate the shutter? If that is the case then remove the short blue jumper under the relay and move the red jumper over to where the other end of the short blue jumper was. This will remove the 5 Volts from the Common pin and leave the 5 Volts connected to the relay coil.
Also remove the LED, resistor and ground wire at the right end, making sure that the black jumper from the Arduino still goes to the blue power rail.
Now just connect the remote shutter wires to the two outermost top pins of the relay, Common and Normally Open. Remember, you stated that the relay diagram and the fritzy image are 180 out. Looks like the LED was on the NC side of the relay. You should now have fully isolated the relay contacts so that this circuit will not push any current into your camera.
(edit)
Thinking about the position of the NO and NC pins the LED circuit may be on the correct side, so instead of using the two top outermost pins I think you will want to use the two bottom outermost pins. If you have a meter use the two that show an open circuit.
@Due_unto, I think I've got it here. I made a breadboard diagram of what I think you were describing. And I also made a new image of the relay I have in what I think is the correct orientation.
For one, I didn't realize which direction the relay switch moved. I thought that when the coil was actuated that NO and NC were connected. I see now that that makes no sense and that, when actuated, NO and Common are connected, and when closed, NC and Common are connected.
I realize that the relay I'm showing in this diagram may be an 8-pin, but I'm imagining it's a 6-pin with the same schematic as the relay image example here.
I've included the two wires coming from the camera (right side of the diagram: purple and brown wires) which I do want this circuit to close/connect so the shutter will operate. When the relay is actuated, it should complete that circuit by connecting NO and Common.
@Wawa do you think I could use a 4-pin optocoupler or is there some reason I'd need a 6-pin, as is the example in your link? The Gikfun DIP-4 PC817C is affordable. LINK
forestkelley: @Wawa do you think I could use a 4-pin optocoupler or is there some reason I'd need a 6-pin, as is the example in your link?
Older optocouplers used a 6-pin package to allow access to the base of the photo-transistor.
In practice, there is virtually never any reason to control the base in any way, so that pin is quite superfluous and a 4-pin package is more economical.
The only reason for a 6-pin package is where there is an integrated amplifier and logic level buffer to provide greater CTR and faster response, so you have ground, Vcc and the output pin in a row on the output side,