12v relay playground schematic

Hi,

I'm new to this whole thing here and I'm trying to work my way through the relay schematic in the playground (http://playground.arduino.cc/uploads/Main/relays.pdf)

I'm trying to connect my Arduino to a 12v DC relay.

There's only one part I don't get and it's the rectangle with the oblique line that looks like it's getting bypassed by the 1N4004 diode.

I have looked through picture indexes of common electrical symbols but I can't seem to find this one.

Thanks in advance.

Sorry for the newbie question.

That is the coil of the relay - pass current thru that to create the magnetic field that moves the relay arm to the other pin. An internal spring pulls it back.

OK. Why is the diode bypassing the coil? Is the coil one way as well?

When the coil is energized, a magnetic field is created. Whne the coil is de-energized, the field collapses, creating a current pulse. The diode dissipates that pulse instead of letting it turn into a potentially large voltage spike that could damage the drive transistor.

Ha gotcha. Is that how the Arduino is protected from getting fried? Or is the transistor after the resistor how the board is protected?

The diode keeps anything from getting fried. The transistor provides more drive current and can handle higher voltages than the arduino output transistors can.

Rats - was gonna cheer myself at post 20202, missed it going by!

The Arduino cannot source or sink enough current to drive the relay, so the transistor, in this case, acts as a switch which can control a much larger current than that supplied by the Arduino.

The diode is protecting the transistor.

Ha I see. So the relay needs it's own power source then is what I understand here? I thought the arduino's power was what was feeding it.

No, the relay does not need its own power source. It is just that the Arduino cannot -control- as much current as the relay requires. There is some confusion because we often refer to "Arduino" as if it were a monolithic thing.

The AVR microcontroller chip on the Arduino board is rated at a maximum of 40mA source or sink per pin. The voltage regulator on the Arduino board is rated at something like 500mA, subject to exactly which board it is and if it is running on USB or some other power source.

polymorph: No, the relay does not need its own power source. It is just that the Arduino cannot -control- as much current as the relay requires. There is some confusion because we often refer to "Arduino" as if it were a monolithic thing.

The AVR microcontroller chip on the Arduino board is rated at a maximum of 40mA source or sink per pin. The voltage regulator on the Arduino board is rated at something like 500mA, subject to exactly which board it is and if it is running on USB or some other power source.

I'm lost. OK so there's 5v of power coming out of the digital output on the Arduino and it goes into a 2.2k resistor which reduces the power correct?

Then the power goes into the transistor base. The power from the base actuates the power of the collector side. That's where I'm lost. I see the collector line coming out, going into the relay coil / diode, and then into the relay power. But where's that relay power coming from?

Oops, sorry. I forgot you were asking about using a 12V relay. Yes, in that case, the relay will require a power supply. You can connect 12V to the Arduino’s barrel power jack, and use the same 12V to power the relay. Or just get a 5V relay.

The other side of the coil can be +5 (on the header pin), +12 (Vin pin if using 12V at the barrel jack connector), or 5 or 12 or whatever from another source. Arduino output pin puts some current into the NPN base to turn it on, allowing greater current to flow between collector and emitter, sinking the current from the coil to energize it.

I'm trying to unlock a electric door strike which needs 12v DC to unlock. Therefore I'm gonna need a 12v relay right?

Wait... is the relay a stand-in for the door strike coil? Or is the relay switching 12V to the door strike coil?

If the relay is switching 12V to the door strike, then the relay -coil- can be 5V. The contacts must be rated at 2x the current required (more is better) and the voltage rating of the -contacts- should be about 3x the door strike voltage. Generally, most relay contacts are rated for at least 50V.

And the door strike coil should -also- have a diode across it to protect the relay contacts.

Isn't the door strike the equivalent of the relay in this case? So you don't need another relay.

Good point.

I'm not sure I understand what you guys are going on about right now.

The way I understood it, I need to power the electric door strike with a 12v DC power source. Now I only want the electric strike to unlock when I tell the Arduino to unlock it. Therefore I need some kind of switch in that power source so that I can activate and deactivate the power to the door strike right? That's the point of a relay is it not? Send the 5v current from the Arduino digital out to the relay so I can close the relay and activate the power to the door strike?

Unless I got this completely wrong (which is not unlikely lol).

You need a transistor to control the 12V source - you're suggesting a transistor to control a relay to control the source. We're saying skip the relay, control the 12V directly to control the door strike - which is really a relay by itself (a solenoid, technically, but still just controlling current thru a coil.).

OK. So would it be the same schematic as in the original post except replace the relay with the electric door strike? Where would the diode go in that case?

Yes. Diode still goes across the coil. Cathode to the +supply, anode to the -supply; thus any voltage generated out the - lead gets dissipated back to the + lead.

Do you have a spec/drawing/link to that part?