Skip to main content
2 of 2
added 465 characters in body
D.A.S.
  • 148.1k
  • 3
  • 56
  • 190

This so-called arc from breaking the coil current Only occurs with the dry contact . The time could be in the nanosecond range and since V equals V=LdI/dt with dt going to zero V can arc on dry contacts. Because the transistor has some capacitance it cannot shut off that quickly so the diode is only to protect the transistor and there’s very little capacitance that would feedback any significant charge back to the microcontroller so no worries there .

The 100mA transistor current is immediately switched through the diode along the same wires can be handled easily by 100 mA small signal diode. The diode should be placed close to the transistor rather than the coil so that the current path is the same . For EMI pulse attenuation it’s best to have the switched current ground and power signals to the relay coil interface close together to minimize current loop area and antenna-like interference to high impedance nearby signals.

Furthermore 3 mA into the base is more than enough to saturate the transistor. The BC 337 will rise from 50 mV to less than 200 mV which is within 5% of your 5 V supply with only one milliamp of base current @Ic=100mA

D.A.S.
  • 148.1k
  • 3
  • 56
  • 190