Relay no transistor?

Hey everyone,
I just have a simple question about controling relays with arduino. I have always thought you needed a transistor to drive a relay, but I stumbled upon this project recently and it seemed like they didn't use a transistor for theirs. Could anyone help explain to me how this works?
Here is the project http://www.instructables.com/id/Android-Controlled-Pneumatic-Cannon-Powered-By-Ard/

Thank you!

If the relay coil can be powered with the current a arduino port can deliver, there is no transisitor needed.

But.. be aware that you need a choking diode over the coil to drain the peak voltage that will occur (Lenz law).
I will advise to always use a transistor that drives the relay unless you are really sure you know what you are doing, electronicaly wise.

Cheers

They used a 5VDC reed relay which can be controlled directly from a microcontroller pin, but I still don't think it's a good idea. It might be the case that it works fine for some weeks and then things magically just "stop working". There are some reed relays that take very little current to turn on (e.g., Coto 9007-05-00 only needs 10mA) which are well within the range of what a microcontroller pin can provide. When turning off, the coil may have a small enough amount of energy stored so that the "kickback" can be managed by the microcontroller's ESD diode. No problem.

Or not. The Radio Shack part listed in the Instructable has no useful data associated with it ("tech specs" helpfully include enclosure color but not current). If the coil requires 50mA to turn on then your microcontroller pin will be stressed by this and may eventually fail.

For the price of a transistor and resistor, adding these to drive inductive loads like relays is just always a good idea IMHO.

--
The Basic Motor Driver: simple, inexpensive motor driver for 1 stepper motor or 2 DC motors

It all depends on the relays coil voltage and current requirements are. As a Arduino digital output pin can provide +5vdc output and nominally 30ma or so, any relay with a coil voltage rating of 5vdc and coil resistance value of 170 or more ohms can be directly powered by an arduino digital output pin. There is still a need to wire a diode properly across the relay coil terminals to protect from transient voltage damage.
One also has to pay attention to the voltage and current ratings of the contacts of the relay as that is a separate relay specification that must exceed the voltage and current flow to what the relay is switching on and off.

The relay used in that project from Radio Shack doesn't list the relay coils resistance value, so it's hard to say if is safe to use with a arduino output pin. Here is an example of a 5vdc relay that can be safely used with a output pin. Having 500 oms of coil resistance it will only draw 10ma of current from the pin (less then a typical LED) when turned on and includes internal diode protection. I have used such relays very successfully with some of my arduino projects.

They used a 5VDC reed relay which can be controlled directly from a microcontroller pin, but I still don't think it's a good idea. It might be the case that it works fine for some weeks and then things magically just "stop working".

If a specific relay only requires 10ma and is using proper external diode protection across the coil, why would you think it could magically stop working? I've found such low current relays to be very reliable in my projects without using transistor drivers.

Lefty

retrolefty:

They used a 5VDC reed relay which can be controlled directly from a microcontroller pin, but I still don't think it's a good idea. It might be the case that it works fine for some weeks and then things magically just "stop working".

If a specific relay only requires 10ma and is using proper external diode protection across the coil, why would you think it could magically stop working? I've found such low current relays to be very reliable in my projects without using transistor drivers.

Lefty

For the very reason that specifications were not provided so it is possible that it is not a 10mA relay. If it's a 50mA relay it may work fine for some weeks and then magically stop working.

--
The MegaRAM shield: add 128 kilobytes of external RAM to your Arduino Mega/Mega2560

For the very reason that specifications were not provided so it is possible that it is not a 10mA relay. If it's a 50mA relay it may work fine for some weeks and then magically stop working.

But that's not what I asked. Given a 10ma relay coil with external diode protection, would you still have misgivings about using it without a switching transistor, if so why?

Lefty

retrolefty:

For the very reason that specifications were not provided so it is possible that it is not a 10mA relay. If it's a 50mA relay it may work fine for some weeks and then magically stop working.

But that's not what I asked. Given a 10ma relay coil with external diode protection, would you still have misgivings about using it without a switching transistor, if so why?

Lefty

No, that should be fine (what I meant when I said "No problem"). I just prefer to always use a transistor and have one less thing to worry about in my mind.

--
BeatVox: inexpensive sound shield for Arduino, 3.5mm stereo output, 512Kbyte FLASH

Yes, reed relays are generally 15mA or less for the coil, but just don't go trying to switch high voltages or current. Generally speaking, theses are low power switching devices.

Great if you need some isolation from the circuit you are switching or cannot share a ground and dont want to use an optoisolator.

eBay has millions of them at low cost - these once ran the worlds telephone system, so there are lots left over!

A normal (PN) diode may allow the voltage on the pin to raise a little above Vcc + 0.5V which is AVR's maximum absolute limits. So for maximum reliability, I would at least use a schottky diode or an extra diode from the pin to the relay.