I'm working on a personal project for college right now. I'm working on a circuit that can change the direction of current flow going through a solenoid, depending on an input signal. I'm using an ELVIS Prototyping board to output the 5 V signal through a Virtual Writer on NI LabVIEW, if that matters.

Right now, I'm doing this with an electromechanical relay, and my 5 V output decides if it is open or closed. The COM is connected to the solenoid and into the ground, the NC to a 10 V and the NO to a -10 V. Because of the way it is set up, switching the relay's state changes the direction of current flow depending on the 5 V I/O, hence changing the solenoid's polarity.

Now, I have read on many websites that relays usually take a lot of time to change state, in comparison to transistors. Also, the relay produces a lot of noise when switching, as my montage is switching between the two states a couple of times every seconds (which I read is not that good to do with relays).

I would like to know if there is a way I could do the same type of thing, but using transistors. If not, is there a type of relay that would be best suitable for frequencies of around 5-20 Hz, current of around 1.25 A and voltage of 20-50 V?

  • \$\begingroup\$ If reactive loads then V or I must be derated , shown in specs, Define L and C.= load You can use a 25A automotive relay for about 100k cycles at 2A ( 1million mechanical cycles ) See Omron for MTBF cycles vs reactance vs current rating. If underated, then it burns out.) Otherwise use MOSFET WITH AVALANCHE diode rated for 5x peak current used. \$\endgroup\$ – Tony Stewart EE75 Apr 10 '17 at 23:42
  • \$\begingroup\$ For semiconductors, you have to expect a bit of a voltage drop and some active power dissipation. The relay you are using has some advantage here. So you need to compare those details. However, you could consider also a semiconductor h-bridge fashioned with either BJTs or MOSFETs. For example, take a look at the L298 IC. It's about in the range you are talking about, I suspect. There are also half-bridge devices as well, like the UC2950T, though I think you will need a pair of those. \$\endgroup\$ – jonk Apr 10 '17 at 23:57
  • \$\begingroup\$ Look into MOSFET Gate Drivers. Some at 9amp or 12 amp rating (for pulses), will provide steady-state drive at 3amps DC IF heatsinked. You would need 2, and an inverter (3.3 to 5v rail) to ensure the "H" bridge behavior. \$\endgroup\$ – analogsystemsrf Apr 11 '17 at 5:10
  • \$\begingroup\$ The L298 IC and UC2950T chips are a bit on the pricey side, I would prefer not having to use those.. space is not a problem in my circuit so I can use bigger components which come at a cheaper price. \$\endgroup\$ – Manuel Roger-Proulx Apr 11 '17 at 13:20
  • \$\begingroup\$ How cheap can you get? L298N <$5 (1) \$\endgroup\$ – Tony Stewart EE75 Apr 12 '17 at 13:38

For 20Hz you should definitely use solid state switching. A typical 50-100K operations relay life will be expended in a day or so otherwise. Even if you derate substantially, it will be difficult to get more than a week or two life.

You can use a MOSFET H-bridge to do this, however you will need to level shift your control signal to control the high side MOSFETs and you should prevent shoot-through caused by high and low MOSFETs being on at the same time. One chip that might prove useful is the LMD18201. It's designed as a motor driver, but it should work fine driving a solenoid provided the current is within the <3A capability. It includes anti-shoot through circuitry and thermal protection.

enter image description here

This particular part includes a charge pump for the high-side MOSFETs so it should work down to DC, unlike many of the common half-bridge drivers that depend on continuous switching to charge the boostrap capacitor supply.

  • \$\begingroup\$ This seems to be what would be best for me. Could you, if possible, show me how this chip would be connected to my whole circuit? I'm not so familiar with all the terms.. For example, what are the bootstraps, direction, brake, PWM, Thermal Flag Output, etc... Thank you very much \$\endgroup\$ – Manuel Roger-Proulx Apr 11 '17 at 18:38
  • \$\begingroup\$ @ManuelRoger-Proulx I suggest you read the datasheet for this (or whatever part you think would work) carefully, come up with your best effort design and start another question. Someone should be able to help you. \$\endgroup\$ – Spehro Pefhany Apr 11 '17 at 18:47
  • \$\begingroup\$ Link to new thread: electronics.stackexchange.com/questions/299070/… , if you are able to help. Thank you! \$\endgroup\$ – Manuel Roger-Proulx Apr 12 '17 at 0:30

Correct, using relays, especially at those frequencies, is not ideal. They are slower than transistors, and typically have a cycle life. 0.5Hz might work, but as you get closer to 20Hz, you might not see any useful switching. On the other hand, a solenoid is not much different than a relay, so I wonder if the solenoid will switch at that frequency anyway. It depends a lot on the size of the core, and coil power.

Yes this can certainly be done with transistors. Since you want to reverse polarity you would probably want to use an H-bridge driver, but to do it with discrete components will involve a number of components and some complexity. If the cost is not as much of a concern, I would suggest looking at solid state relays. They essentially incorporate transistors and input buffering (usually opto-isolated) to make things easier for you to wire to your system.

Things you need to worry about in any H-bridge circuit is shoot-through, where the top and bottom switches are on at the same time.

As an example you could do it with two of these SSRs. You could wire it something like this. To avoid shoot-through, you would want to make sure both logic pins are not high at the same time. Bring input 1 high for one polarity. Then set it low, make a short delay, and bring input 2 high to switch to the other polarity.


simulate this circuit – Schematic created using CircuitLab

  • \$\begingroup\$ Comments are not for extended discussion; this conversation has been moved to chat. \$\endgroup\$ – Dave Tweed Apr 11 '17 at 18:50

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.