Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a 7 segment display where all segments are driven with a solenoid. In order to switch each segment I have to pulse a short current on the solenoid. To change the segment I have to pulse it in reverse polarity. This means that I have to use something like a "full H-Bridge" for each segment which can switch 12volts, 300mA for 100 microseconds.

I'm looking for a suitable IC that I can do this with. I'd like to end up with as few components as possible while maintaining the cost low (don't we all).

Since I don't need PWM I don't know what IC to get. Ideally something that works similar to a shift register where I can cascade to drive an array of solenoids. Alternatively an H-Bridge that can drive 7 solenoids.

I'm driving this with 3.3v logic from a microcontroller.

share|improve this question
Just an idea starter: Say solenoid has left and right ends, Connect both ends of solenoid to V+ via resistors. Connect cap to ground at each end as well. Pulling say left end to ground has solenoid driven by farright end cap. This also discharges left end cap into driver (somewhat violently). When driver turns off system recharges. with some current flow through solenoid in direction during discharge. Driver can be jellybeam bipolar with good pulse current (eg BC817) or suitable small FET. Total hardware is 4 x R, 2 x (cap, transistor, port-pin). – Russell McMahon Nov 15 '11 at 16:04
Could use ULN2803 driver IC but hardly any gain over discrete transistors. If solenoids are X volts rated MAY need higher supply to drive. ||| Why solenoids? Can you use a solid state segment driver? Then drive can be designed to be at logic levels. – Russell McMahon Nov 15 '11 at 16:08
I like your idea of using a capacitor to accomplish the quick discharge needed. – Mattias Nov 15 '11 at 16:51
up vote 2 down vote accepted

This isn't a direct answer but is pointing out a alternative.

You don't necessarily need a double ended drive like a H bridge. That would certainly work, but a push/pull driver with a capacitor in series with the relay coil would do it too. Here is a possibility to think about:

In the steady state, the capacitor charges up to whatever the drive level is at the left side of the relay coil. It then provides the opposite polarity for the right end for a while immediately after the left end is switched. 22 µF will charge up to only 1.4V after 300 mA for 100 µs. 22 µF and 16 V can be had from a 1206 ceramic capacitor, like this one from Mouser. The cap can be polarized since the top side will always be at or above the bottom side.

The double emitter follower can be driven directly by a CMOS logic gate. There are some that can handle this voltage. The input to that could be driven by a open collector with pullup. Since the CMOS logic input is high impedance and you don't need really fast switching, the pullup can be quite high. 100 kΩ should be low enough to work well, but high enough that the quiescent current in the low state is small.

Of course you could replace the transistors with a half bridge drive chip that takes logical level input for higher integration, but also likely higher cost.


You are asking about driving this from a single open drain output. As I said above, I'd use a CMOS gate that can run from 15V. The high impedance of the CMOS gate input allows for a high value pullup resistor, as I mentioned previously. Here is this concept shown explicitly:

Q3 is a switch. When off, R1 pulls the input of IC1A high for one relay state. When Q3 is on, the input to IC1A will be low for the other relay state. Q3 could instead be the output transistor in the driver chip you mentioned. However, it only takes one NPN and one resistor to replace each channel of that chip. The left side of R2 can be directly driven by your microcontroller output. The driver chip could be less board space, but the NPN and resistor will be cheaper. The whole circuit from the micro up to C1 could be replaced by a half bridge driver chip, which again will be more cost but maybe less board space. Everything is a tradeoff.

I also flipped the relay coil and C1. Since these are in series, it doesn't matter to the operation of the circuit. However, it may be convenient to tie one end of all the relay coils to ground. This second circuit allows you to do that.

share|improve this answer
The driver can afford to be on for longer than the notional pulse so that the cap goes all the way to the relevant rail (less a Vbe) with cap size and voltage setting amount of energy provided. [Similar to my scheme but totally different :-) ]. – Russell McMahon Nov 15 '11 at 16:54
@Russell: In this scheme, the input is always the logic level the relay is supposed to be in. The driver has to be on one way or the other the whole time, but it draws no power once the cap voltage has settled. – Olin Lathrop Nov 15 '11 at 17:36
yes, I followed completely how it worked. My comment related to the ability to open circuit the driver - not wise though. It's more energy efficient than my suggestion and less hard on the driver.Mine also has no zero current and provides a cap full of drive (and a bit more) but must also discharge its own side cap "destructively" Yours is better. – Russell McMahon Nov 15 '11 at 17:56
@OlinLathrop I really like this solution and I'm going to try to breadboard it. I've got some TPIC6B595 which could work on the low side, but what could I use for the high side that can be used in a similar fashion? – Mattias Nov 15 '11 at 18:16
@OlinLathrop This design is really elegant. I like the idea of being able to tie one leg of each solenoid straight to ground. Just to clarify, what (through hole) cmos gate would you recommend for this at IC1A? Also, can you explain why I can't drive Q1 and Q2 straight from Q3? – Mattias Nov 15 '11 at 20:45

(If you're going to downvote me, I'd appreciate a comment explaining why.)

Try a quad half-H bridge like the L293D or the pin-compatible-but-slightly-more-robust SN754410. You'll need a 3.3 V -> 5 V level shifter to make it work.

(I don't know of a half-H bridge that accepts 3.3 V directly.)

Here's a nice tutorial from ITP on how to use the chips.

share|improve this answer
I don't know why the downvote either, so I upvoted to cancel it. There seem to be occasional mysterious downvotes here lately. Without a comment it's hard to say if someone has a misconception or there are just vandals on the loose. – Olin Lathrop Nov 15 '11 at 18:50
@pingswept Thanks for this recommendation. It's a more bundled up (IC) approach that I was originally looking for. I could probably drive the L293s with 74HC595 shift registers at 5v. Thanks! – Mattias Nov 15 '11 at 19:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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