How to wire a relay
By fritsl
2008-04-29 06:44
2008-04-29 06:44

Hi,
I bought some relays, just to see what could be done - perhaps sometimes an alternative to a H-bridge.. or perhaps make a light-show or something, they are very cheap, so I thought "hey, let's see".
I got some of these AZ8222, and the documentation is thorough.. but look in the bottom of the manual - what on earth is supposed to be hooked up with what?
It is 2 poles that gets current, and then current flows through something else, no? But which to be hooked up to what? Strange numbers!
Got other relays as well - same strange documentation! What am I missing?
Thanks :)
/ Fritsl
Ah, relays are fun :) I've
Ah, relays are fun :) I've only played with them a little bit, so my understanding is hazy, but the way I understand it, what you've got is a double pole, double throw relay. That means that when there's no current across pins 1 - 16, then pin 4 is connected to pin 6 and pin 13 is connected to pin 11 (it's labelled as 1 but following the pattern, I think it must be 11).
When you apply current across pins 1 - 16, then it's just like physically flipping two switches at the same time -- pin 4 gets connected to pin 8 and pin 13 gets connected to pin 9. Unlike a transistor, the relay doesn't care what voltage you've got on each of those switched pins -- it's just physically opening or closing circuits.
What I don't know is whether or not it matters what direction the current goes across pins 1-16. Since it's just an electromagnet inside, I think maybe it doesn't? You can just tie pin 1 to ground and pin 16 to an I/O pin that you set high, or the other way around (pin 16 to ground and pin 1 to I/O pin) should work too. But you should probably just try it and see, because I don't know what I'm talking about :)
One thing I DO know is that a relay CAN be used to reverse motor direction -- the circuit diagram that I used to build my Feivel robot does just that, when the bumper switch is activated. Check out my picture of a relay on my Feivel page to see how it was wired up to reverse the connections when the switch is triggered. It's that funky X-shaped pattern. Here's another view that I didn't include on the robot page.
Dan
Use a transistor to drive
About what i see in wiring
About what i see in wiring diagram is:
- when u apply current to pin 1 and 16, it becomes on:
- ping 4 connect to 8
- pin 13 connect to 9
but as they told.. nothing better then test it.. just use a multimeter, and see if it confirms.Better then use a transistor to atack the relay, is to use the transistor that is activated by ligth, encapsulated with a led, so you can keep the microcontroler away from high power, and don't get a glitch to your microcontroler..
I will search for it, and when i find it, i post =P