5
\$\begingroup\$

I needed a simple understanding of how this circuit works.

enter image description here

I understand everything about this circuit apart from the diode. I also know the function of the diode is to protect the transistor but from what exactly? Is it something to do with back EMF from the coil? I'm not too sure. Also I needed to confirm if the relay will function correctly with a 9V supply (regulated or unregulated). The datasheet of the relay is attached here and the part I'm going to use is '40.61' on page 20 of the datasheet.

Also any tips for making this circuit work more efficiently. Note I am going to use the relay for no more than 16A at 230VAC at 50Hz.

Thanks

\$\endgroup\$
  • \$\begingroup\$ "use the relay for no more than 16A". Relay datasheets are written by marketeers. There's only one type of 16 A load you can switch with the relay: a pure resistive. Not incandescent bulbs, not capacitive nor inductive loads. For those the relay has to be derated, i.e. the 16 A has to be scaled down to a safer value, sometimes only half of the specified value. \$\endgroup\$ – stevenvh Jun 14 '12 at 10:33
4
\$\begingroup\$

First the diode. An inductor resists to changes in current. So if you switch off the transistor the relay coil will try to keep the current flowing, it becomes a current source. If there would be a low resistance path that would only create a low voltage, according to Ohm's Law. But if there's no way out for the current the voltage will rise to several tens of volts, and destroy the transistor. The diode provides a low resistance path where the current is drained to the positive power supply. BTW, a Schottky diode is a better choice here.

R1 and Q1 look OK. The BC546B has an \$\mathrm{H_{FE}}\$ of 200 minimum, and with a 5V input you have 1 mA base current, so the 200 mA collector current is more than sufficient.

\$\endgroup\$
  • \$\begingroup\$ so, as i understand, the current thru relay switching coil is limited by BJT transistor? if BJT was replaced with say, logic level mosfet, you'd need a current limiting resistor in series with relay coil? \$\endgroup\$ – miceuz Jun 14 '12 at 8:46
  • \$\begingroup\$ Schottky diode because its a fast acting diode? I connecting the base of the transistor to 3.3V microcontroller atmega16L. I guess those values should be ok for that too. because Ic = Beta times Ib. \$\endgroup\$ – David Norman Jun 14 '12 at 8:47
  • 1
    \$\begingroup\$ First @David, he's my customer :-). Yes, because it's faster, it will keep the collector voltage peak lower. A 1N400x should only be used in a rectifier. 3.3 V is also OK, you do the math: (3.3 V - 0.7 V)/3k9 = 0.67 mA. Times 200 is 130 mA. Page 6 of the datasheet says the relay will only draw 55 mA, so you're safe. Though it doesn't hurt to increase the base current above 1 mA. That's what I would do. \$\endgroup\$ – stevenvh Jun 14 '12 at 8:55
  • 1
    \$\begingroup\$ @miceuz - Yes, the transistor will limit the current, depending on the base current. So that's different from a mechanical switch, that won't limit the current. But even with a FET you don't need a current limiting resistor. The coil's resistance is enough. If a transistor (FET or BJT) tries to draw 200 mA, but the coil resistance is 220 \$\Omega\$, then that will limit the current through Ohm's Law: 12 V/ 220 \$\Omega\$ = 55 mA. For 200 mA through that resistance you would need 44 V. So the 12 V and the coil's resistance limit the current sooner than the transistor would. \$\endgroup\$ – stevenvh Jun 14 '12 at 9:00
  • 1
    \$\begingroup\$ @David - You're right, it's just a habit of mine. Gives you extra margin if you would use a different transistor. The BC546A's Hfe is only half the BC546B's. \$\endgroup\$ – stevenvh Jun 14 '12 at 9:08
5
\$\begingroup\$

The defining characteristic of coils (or more precisely, inductance) is that they prevent the current from changing fast. When you rapidly close the transistor, the coil will increase the voltage across itself as much as it is necessary to ensure that the current continues flowing.

Without the diode, the voltage generated by the coil would be high enough to destroy the transistor. With the diode, only the voltage drop across the diode would be generated (0.7V to 1V usually) by the coil.

\$\endgroup\$
  • \$\begingroup\$ @avakar, your insight into the relay's effect upon the circuit as a coil is great; I believe it is easy to forget that. While revisiting this question, I am not certain about "voltage generated by the coil would be high enough to destroy the transistor". I've seen this configuration before & the data sheet max values are 65V, 100mA, and 0.6~1.5 W. onsemi.com/PowerSolutions/product.do?id=BC546B \$\endgroup\$ – Chris K Jun 15 '12 at 19:24
1
\$\begingroup\$

Voltage difference between terminals of coil when current is changing is defined as: U=L*di/dt

If the the rate of current change is high, you will have a very large voltage spikes that will sooner or later "fry" your transistor. Reverse biased diode is used to clamp these voltage spikes so that you transistor is safe and you don't have to use transistor with high voltage ratings. As an added protection I would add small value resistor between coil of relay and transistor.

\$\endgroup\$
1
\$\begingroup\$

I remember from technician school that diodes are often placed on the coil of a relay or solenoid to prevent "bounce", which in the class, implied the coil might throw more than once when switched on. This is a subtle difference from what I'm reading in the other answers as voltage spikes.

Given my lab and field experience, I would lean more towards the purpose of preventing voltage spikes with the intent of preserving the transistor.

\$\endgroup\$

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.