Driving a Large Relay From a 3.3 VDC Microcontroller Using an NPN Darlington Transistor

Interfacing a microcontroller to a high-power load presents a design challenge. This is especially true for 3.3 VDC microcontrollers such as the Arduino Nano 33 IoT featured in this article and shown in Figure 1. As a rule, these new high-performance 32-bit microcontrollers don’t have the strength of their 5 VDC counterparts. For example, the Nano 33 IoT is limited to a 7 mA per pin whereas the Arduino Nano Every can supply 15 mA per pin. This reduced current, compounded by the lower voltage, requires special attention. The simple NPN transistor relay driver featured in many tutorials is no longer sufficient.

The engineer brief is part of a series of articles describing how to interface a relay coil with a microcontroller. This installment is focused on a Darlington transistor solution. The Darlington transistor with its high gain provides a good match between the 3.3 VDC microcontroller and the 24 VDC 250 mA relay coil. In this application the nominal base drive voltage is 1.4 VDC. The base resistor is selected so that the base current 1/100 of the Darlington’s collector current. The results are well within the safety margin of the Arduino microcontroller.

If you have not already done so, you are encouraged to read these articles.

The MOSFET article is focused on the voltage limitations of the 3.3 VDC microcontroller and the difficulty of using a MOSFET drive for the large contactor. The second article explores the Transient Voltage Suppressor (TVS) diode such as the integral LAD4TBDL used in the large Schneider Electric LCD09BD three-phase contactor shown in Figure 1.

Figure 1: Prototype of the Arduino Nano 33 IoT microcontroller driving a Schneider LC1D09BD contactor via a BDX33C Darlington transistor.

Tech Tip: The Transient Voltage Suppressor (TVS) based flyback diode is a useful way to reduce the time it takes for a relay to deenergize. This is especially important for large contactors driving three-phase motors such as the Schneider device shown in Figure 1. This simple TVS diode increases the snap and vigor of contact opening. This ensures the contact arc will quickly extinguish leading to longer contact life. It also provides an increased measure of protection especially if the contact is opening in a fault condition. As noted in this article, use of a TVS comes at a cost as the driving semiconductor must withstand a higher clamp voltage.

How do we ensure the Darlington transistor pair is fully saturated?

In this application, the Darlington transistor is used as a switch to turn the relay coil on and off. It is important that the transistor be driven fully on to prevent operation in the linear range. Without this saturation, the transistor would dissipate a large amount of power. Even worse, the relay / contactor may fail to activate or activate intermittently resulting in overall equipment failure. One way to ensure saturation is to operate the transistor in a forced beta condition.

What is forced beta?

Forced beta is an operating mode that forces the transistor into deep saturation. Rather than using the natural (linear) transistor gain, the circuit values are chosen to force the DC current gain to a lower value. A conservative designer will select components so that the base current is 1/10 of the collector current. In the case of a Darlington pair, the base is set to 1/100 of the collector current. Here, we assume a factor of 10 for the driver and 10 for the Darlington output.

We start our circuit calculation knowing that that the Schneider contactor has an approximate 250 mA current when driven by 24 VDC source. Assume a forced beta conditions for the Darlington pair, we note that the base current will be approximately 2.5 mA. Knowing that the Arduino has a 3.3 VDC output, we calculate the Darlington base resistor as:

R = \dfrac{3.3 – (2 * 0.7)}{0.0025} \approx 750\Omega

Where each transistor is assumed to have a 0.7 VDC V_{BE} drop. We select 750 Ω as the closest member of the E24 series.

Tech Tip: The I_B = I_C/10 is a conservative definition for a forced beta condition. Here the term forced implies that the transistor is driven into saturation for all operating conditions and temperature. In practical terms, we set up a forced beta condition by selecting the base resistor to match the given load current.

The value of 10 may be too aggressive for some designs. Instead, a value of 20 or even 50 may be appropriate. For best energy efficiency be sure to test your design and select usable but conservative forced values. However, keep in mind that a transistor’s DC current gain is not a well-controlled parameter. Be sure to account for the natural variations. This could save you the heartache of PCB rework to account for a batch of transistors outside of your expectations.

The resulting schematic is shown in Figure 2. Observe that the Arduino and the 24 VDC return share a common ground. The Darlington transistor is in a sinking configuration (Common Emitter). Also, note that a TVS diode is used to clamp the relay’s flyback voltage.

Figure 2: Schematic of the BDX33C Darlington transistor interface between the Arduino and the Schneider contactor.

How do we ensure the Darlington can withstand the flyback voltage?

This engineering brief is focused on the Schneider LC1D09BD contactor. Recall that it features a 48 VDC TVS diode to “catch” the flyback voltage. The waveform associated with the circuit described in Figure2 is shown in Figure 3. Here channel 1 (orange) shows the 3.3 VDC drive from the Arduino. Channel 2 (blue) shows the V_{CE} voltage as measured across the Darlington. We can derive the TVS clamps at voltage by noting the 72 VDC level. Recall that the TVS diode clamps relative to the 24 VDC rail: 24 + 48 = 72 VDC.

Tech Tip: The Schneider LC1D09BD was chosen as a challenging design. It has moderately high coil current, and the integral TVS diode places higher V_{CE} voltage stress on the Darlington transistor. We could certainly reduce this stress by using a conventional diode in place of the TVS diode. The resulting clamp voltage would be one diode drop above the 24 VDC rail. However, the relay / contactor turn off time would be significantly increased. The resulting sluggish operation reduces system reliability.

Figure 3: Relay coil deactivation waveforms where channel 1 (orange) shown the 3.3 VDC drive from the Arduino and channel 2 (blue) shows the V_{CE} voltage as measured across the Darlington.

Parting thoughts

The Schneider contactor with its TVS diode presents a challenging load for a microcontroller to drive. It has a moderate coil current, and the inductive kick (flyback voltage) as clamped by the TVS diode is high. The BDX33C Darlington pair provides a good interface with the 3.3. VDC Arduino.

Do you agree with the selection of the TO-220 packaged device? Is the design too conservative? If so, what device would you select? Please leave your comments in the space below. Also, be sure to expand your knowledge by answering the questions and challenge questions found at the end of this note.

Best wishes,

APDahlen

About this author

Aaron Dahlen, LCDR USCG (Ret.), serves as an application engineer at DigiKey. He has a unique electronics and automation foundation built over a 27-year military career as a technician and engineer which was further enhanced by 12 years of teaching (partially interwoven with military experience). With an MSEE degree from Minnesota State University, Mankato, Dahlen has taught in an ABET-accredited EE program, served as the program coordinator for an EET program, and taught component-level repair to military electronics technicians. Dahlen has returned to his Northern Minnesota home and thoroughly enjoys researching and writing educational articles about electronics and automation.

Highlighted Experience

Dahlen has authored over a hundred educational DigiKey TechForum articles simplify complex concepts for a wide audience. Explore his Arduino microcontroller articles on this Arduino Microcontroller Index page.

Questions:

  1. Describe the forced beta condition as it relates to a single transistor and as it relates to a Darlington pair.

  2. Given the Arduino Nano 33 IoT’s 7 mA per pin limitation, what is the largest continuous current that a Darlington pair may drive in a forced beta condition?

  3. Could the Darlington circuit featured in this article drive a DC motor? If so, state your operating parameters. Hint: Don’t forget to mention the dynamic motor specification involving inrush (stall) current.

  4. What is meant by the term flyback voltage?

  5. Describe the V_{BE} and V_{CE} voltages associated with a saturated transistor.

  6. Why does the 48 VDC TVS yield a ground reference spike of 72 VDC?

  7. What would happen if the TVS diode were accidentally replaced with a conventional diode? For full credit, identify the system level complications.

  8. Research the term “sinking” as it applies to the output of industrial Programmable Logic Controllers (PLC). Define the term and present a schematic showing the PLC, power supply, and relay coil, and flyback diode. For clarity, assume a conventional (directional) diode is used instead of a bidirectional TVS.

  9. Suppose we change the TVS to clamp at 75 VDC. Is the BDX33C still a valid drive transistor? Hint: What is an acceptable safety margin?

  10. Use the DigiKey search tools to locate a surface mount equivalent for the BDX33C Darlington pair.

  11. Contrast and compare a transistor’s linear operating point with the forced beta operating point. Hint: Consider the transistor linear amplifier and the transistor digital switch.

  12. Could the Arduino Nano Every with its 5 VDC I/O and 15 mA per pin capability drive the Schneider LC1D09BD contactor via a single transistor such as the TIP31CG? Hint: State your design parameters and your safety margin.

Critical thinking questions

  1. A transistor’s DC gain is not a well-controlled parameter when we consider the batch to batch and even individual transistors. How does this fact relate to the forced beta operating point? How does it impact you decision to use a factor of 10, 20, or 50? Hint: What is an acceptable safety margin?

  2. Occasionally we encounter microcontroller and Field Programmable Gate Array (FPGA) logic with 1.8 VDC and even 1.2 VDC I/O. Is the Darlington based solution viable with low voltage logic? If not, present the schematic for a 1.2 VDC logic to drive the Schneider LC1D09BD contactor.

  3. The Arduino, drive transistor, and 24 VDC power supply all share a common ground. Why is this undesirable? Present the schematic for an optically isolated solutions to drive the Schneider LC1D09BD contactor. As a design challenge, use the IF-E10 fiber optic kit instead of an optocoupler.