Electronic Design

Relay Driver Speeds Switching While Handling High Current

A recent application required the microcontroller to be able to switch some high-reliability latching relays as a safety backup for the normal solid-state switching. The coils were rated for 12 V, and the required current was too high for direct control by a microcontroller port pin, even if the voltage had been within the microcontroller’s capability. It seemed simple enough. Plenty of N-channel FETs can handle the current and voltage while being switched by a gate voltage that’s well within reach of the microcontroller. It sounded too easy, and it was.

The system had only a 5-V logic supply and an unregulated dc supply coming from a transformer and rectifier. The 5-V supply was clearly inadequate. The unregulated supply, with all the variations of line voltage, temperature, and manufacturing, could vary from about 14 V to around 30 V. The latter might release the magic white smoke that powers all things electronic, and white smoke coming from the safety relays during a demo does little to inspire confidence in the customer.

Next idea: it would be easy enough to build a switching or linear regulator to turn the unregulated supply into a nice solid 12 V, which would suit the handy little FETs. But the system employed eight of the relays and had to be able to switch them all simultaneously. So total current approached 1 A, and the regulator chip, as well as a big beefy inductor, a beefy freewheeling diode, and all the miscellaneous parts that go around a downswitcher chip, would have to be able to handle the current. All this was in addition to the switches for the individual coils. Space was tight in this application, however, and it wouldn’t accommodate that big inductor. So it was back to square one.

One “aha!” moment came with the realization that a relay coil is really just a nice big inductor. Another arrived with the realization that the coil actually wants to see a given current, and the required voltage to achieve that current changes with temperature, whose variations could be significant in this application.

The final circuit uses the relay coil as the switching inductor, and it simply passes the resulting current through a resistor sized to provide the 1.21-V reference feedback voltage when the relay coil reaches rated current (see the figure). The LM2674 is a garden-variety, high-volume part that is cheap and readily available, but most any downswitcher chip rated for sufficient voltage (a maximum 30-V input in this case) and current (70 mA maximum per coil here) could do the job. A freewheeling diode and a couple of bypass capacitors round out the design. Since the LM2674 includes a logic-level on/off control, the circuit needs no other components to control the relay coil from a microcontroller output pin.

In addition to providing a very compact and low-cost solution, this circuit ensures that the coil current is precisely to spec, regardless of variations in temperature, line voltage, etc. As a bonus, it can actually switch the relay much faster than a straightforward 12-V design, because the LM2674 applies whatever voltage is available at turn-on to try to bring the coil current smartly up to its set point. Once the current reaches the set point, the LM2674 begins modulating the applied voltage to maintain the rated current for as long as the microcontroller calls for power to be applied.

Continue on next page

Anoop’s Analysis

This is an excellent idea. It’s an unusual use of a switching regulator to regulate relay current under a wide range of input voltages. And even though the IC the author is using (LM2674) is quite expensive ($3.47 each at Digikey), I’m sure that many switching regulators (buck converters) are a lot cheaper and can achieve the same goal for a much more cost-effective relay driving solution.

As a nice side benefit, as the author points out, the relay switches much faster with larger input voltages (I_ramp = V/L) without burning the coil out. However, the author did not mention one main thing to watch out for while you’re customizing the circuit for your application.

Of course, Ideas for Design aren’t just supposed to work for a narrow application. They should be simple enough for readers to customize for their needs, and everyone’s needs are different. IFDs also should offer ways to customize the circuit while pointing out potential problems that may have to be overcome during that customization.

This circuit may work with the relays that the author is using. But there is a wide variety of relays, miniature relays, small signal relays, general-purpose relays, and power relays, all with different types of coils and requiring different drive currents, yielding widely varying inductances.

Now, the circuit has to operate over a wide range of voltages—14- to 30-V input, as per the author. Now add a wide range of inductance values for relay coils. Switching regulators control output current by varying the duty cycle of the drive waveform. LM2674 can vary duty cycle from 95% to 0%.

For a small relay coil with small inductance, and at high end of the input voltage, the duty cycle may be driven to the smallest possible. Also, the smallest duty cycle might not limit the current through the relay coil. There is no indication of the regulator going out of regulation, and the coils can start getting hot and eventually burn out. (0% duty cycle works only for regular buck-converter applications that have filter caps on output side and not for this relay driver application.)

At the other end, a larger relay coil (for a power relay) will have a larger inductance. At the low end of the input voltage, the regulator will have to keep the duty cycle very high to try to regulate coil current to required value. It may so happen that even at the highest duty cycle that the regulator supports, which is 95% for this regulator, the coil current is not sufficient to energize the relay.

As long as engineers are aware of these problems and know how to get around them problems, they will be able to customize the circuit for their needs.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish