6
\$\begingroup\$

I destroyed* an 5V 16Mhz Arduino Pro Mini and a PCF8574 I2C port extender and I wonder how. Obviously it can be many things (ESD, overvoltage, etc.). But I suspect the problem lies in my driving a 24V relay, so in order to keep this topic narrow, that's going to be my question.

Background: There's a Pro Mini, powered by one of those XL4005 power supply boards you find all over China. Power supply is dialed to 5V. The Pro Mini is connected using I2C to four PCF5874A extender boards. The boards too are powered from the same source.

I hooked it up to a NPN transistor (2N3904) in order to switch a relay (Fujitsu FTR-K1CK024W). The relay coil is 24V, and according to its specs draws 17mA (1440ohm coil).

Schematic

Is there a way this schematic could destroy the PCF and connected I2C device?

*) Pro Mini is unresponsive, boot loader LED not blinking on start. On a fresh Pro Mini, all extender boards, except the one destroyed are being recognised.

\$\endgroup\$
  • \$\begingroup\$ Thanks for the many good answers. Too bad I can only 'accept' one. Know that I appreciate all of your inputs! :) \$\endgroup\$ – svenema Aug 3 '17 at 17:15
4
\$\begingroup\$

You can also put a zener diode between the transistor collector and emitter. Make sure the zener diode breakdown is greater than the input voltage, but less than the breakdown of the transistor.

A good reference for switching inductive loads is "On Switching Inductive Loads with Power Transistors" by R.E. Locher, published by the IEEE in 1970.

\$\endgroup\$
  • 1
    \$\begingroup\$ This will work but make sure the Zener can handle the full load current of the relay. \$\endgroup\$ – Trevor_G Aug 3 '17 at 17:21
  • \$\begingroup\$ Nominal current should be 17mA, according to specs, times ten for over-engineering? Which spec on the Zener datasheet is this? Ifsm perhaps? \$\endgroup\$ – svenema Aug 3 '17 at 17:23
  • \$\begingroup\$ @Trevor, I'm starting to think you were talking about how much power a charged coil can deliver. Unfortunately this is not in the relay data sheet. However, we do know that the coil takes 400mW. Is it safe to assume it cannot store more than that, and as such select a Zener with a power rating of at least 400mW? \$\endgroup\$ – svenema Aug 3 '17 at 20:28
  • 1
    \$\begingroup\$ @svenema for power it gets complicated. However the Zener must be able to withstand a max reverse current larger than your driving current. Power should not be an issue is you are not turning it on and off very very quickly..eg. PWM. \$\endgroup\$ – Trevor_G Aug 3 '17 at 20:31
  • \$\begingroup\$ @svenema however, I don't really think a zener is the best solution here. You would be simpler with a standard flyback diode across the coil. \$\endgroup\$ – Trevor_G Aug 3 '17 at 20:32
12
\$\begingroup\$

As you switch off the relay, there suddenly is a very high \$\left\lvert\frac{d\,i()}{dt}\right\rvert\$. Now, the coil of that relay is an inductive device, and inductive devices have a voltage-current relationship of

$$v(t) = L\frac{d\,i()}{dt}\text.$$

Hence, your transistor see a potentially huge (positive) voltage spike, and might fail in the process, taking the IC with it.

The usual way of dealing with that is having a relatively beefy diode antiparallel to the coil.

\$\endgroup\$
  • \$\begingroup\$ Thanks Marcus. It's good to hear it could have very well been the cause of the destruction :). (and I feel a bit stupid, I really should have remembered this) \$\endgroup\$ – svenema Aug 3 '17 at 17:27
6
\$\begingroup\$

Relay coils are inductors, and they can produce a pretty large negative kickback voltage when you stop powering them. This can destroy both the transistor and any components farther back.

You need a "flywheel diode" connected in parallel to the relay coil to protect the transistor from this back-current.

Orient this diode pointing up, away from the transistor. It will then block the generated reverse voltage.

\$\endgroup\$
  • 2
    \$\begingroup\$ A diode pointing down would be an interesting way of nulling the inductive effects of the relay. \$\endgroup\$ – Vladimir Cravero Aug 3 '17 at 16:37
  • \$\begingroup\$ @VladimirCravero oops, got it mixed up. Thanks for the correction! \$\endgroup\$ – Jashaszun Aug 3 '17 at 16:38
  • \$\begingroup\$ Thanks, although I'm going with a Zener on the transistor, because of how my circuit is physically constructed. \$\endgroup\$ – svenema Aug 3 '17 at 17:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.