Diode for reed relay coil when not using a transistor?

I have a project that needs a reed relay with a 5V / 10mA coil. I do not wish to use a transistor, but rather an Arduino pin directly.

I have read this:

http://forum.arduino.cc/index.php?topic=59131.0

in an attempt to understand if the flyback/flywheel diode is still necessary. My understanding of a transistor-switched relay coil is that the transistor alternates between ON (connected to ground) and OFF (high impedance, not connected to anything) -- nowhere for the collapsing magnetic field's induced current to go, so that's why you need the diode to give it a place to go (back into the coil). So far so good?

When using an Arduino pin, it alternates between ON (LOW or connected to ground) and OFF (HIGH or connected to VCC). This is a rather different situation than that with the transistor. I'm happy to use a diode, but: I wonder if it would provide more protection to the Arduino pin to put the diode in series with the coil rather than in parallel (I saw this arrangement on a random schematic while doing some Googling).

I also wonder if it is better to use the Arduino pin on the high side (sourcing current to the coil) rather than on the low side (sinking current from the coil).

Thoughts?

As far as the relay coil is concerned, there will still be a sudden field collapse resulting in a back EMF, so to dissipate this you still need to incorporate a free-wheel diode across the the coil to protect your Arduino and anything thing else from a harmful spike

Agreed, I don't want to zap my Arduino.

Is there any merit to the attached schematic?

This is a rather different situation than that with the transistor

If the AVR's output stage isn't a transistor, what is it?
And if it is a transistor, how is the situation different?

AWOL:

This is a rather different situation than that with the transistor

If the AVR's output stage isn't a transistor, what is it?

I understand an output pin consists of several transistors and protection diodes. That's not what I meant by my questions.

And if it is a transistor, how is the situation different?

External transistors alternate between connecting to ground and connecting to nothing. Output pins alternate between connecting to ground and connecting to VCC.

tylernt:
Agreed, I don't want to zap my Arduino.

Is there any merit to the attached schematic?

what is the breakdown voltage of the diode ?
the problem is that the collapse of the magnetic field creates a voltage spike. this does not give it a place to go, it only trys to block it.

on the other hand, the power in your coil is pretty small. I think you might be able to try to measure the spike.

dave-in-nj:
what is the breakdown voltage of the diode ?
the problem is that the collapse of the magnetic field creates a voltage spike. this does not give it a place to go, it only trys to block it.

I've got an assortment of 1N400X. I could use a 1N4007?

tylernt:
Is there any merit to the attached schematic?

No. None.

See attached.

reedredone.JPG

The diode should be a schottky so it conducts before the protection diodes on
the microcontroller.

tylernt:
Is there any merit to the attached schematic?

Absolutely none - you are not understanding the problem - the current will continue to flow in the forward direction - which is the direction that the diode is already permitting. You have to provide an alternate path to permit it to flow, you cannot "prevent" it.

In fact, the nature of the Arduino outputs is such that they will actually "snub" the relay to a certain extent themselves as the FET which is in parallel with the coil switches on; as long as it is switched on, it will actually conduct current to a certain extent (in either direction), though you should not depend on this - you should use the external diode.

MarkT:
The diode should be a Schottky so it conducts before the protection diodes on the microcontroller.

Note that Schottky diodes are used because of their lower voltage drop, not in the expectation that they will switch on faster than a silicon diode as they simply do not.

It is a common misunderstanding that diodes vary in their switch-on times; it is their switch-off times that differs.

tylernt:
I've got an assortment of 1N400X. I could use a 1N4007?

You certainly could. Given that it has a lower impedance than the internal protection diodes, it should protect them.

Actually diodes do vary in their switch-on waveforms, and its never quoted in the
datasheets because its so much faster than turn off. It can be a real issue here where
a sluggish diode will mean the protection diode takes the brunt of the current.

The normal circuit with a transistor the diode only has to prevent the transistor
collector from rising to its breakdown voltage, typically 60V or so, here we have
to worry about the Arduino pin circuitry which is much more delicate:

Hopefully to clarify: The current in an inductor continues to flow in the same direction when the transistor (or Arduino) turns off. This is due to the now collapsing magnetic field. The voltage reverses polarity when this happens and will go up in value sufficient to force the same current to continue to flow, dropping in current and voltage as the magnetic field collapses.

So the way you had the diode, current will continue to flow through that diode in series as the coil polarity reverses and goes negative enough to keep the diode forward biased. The output transistors in the Arduino will now be switched to -sink- current, but the coil will be trying to source current out of the Arduino pin. Since the transistor that could source current is off, the voltage will go more negative until the ESD protection diode inside the Arduino becomes forward biased.

So every time you switch the drive to the coil off, that ESD diode is stressed with a rather higher energy pulse than it would normally get from a static discharge, which is generally very short.

Thank you polymorph for taking the time to explain. I "get it" now. :slight_smile: