# Controlling the Power of a Solenoid

I am trying to control the force of a solenoid. My current system has a bank of capacitors connected to a relay. In order to control the force (how hard I am trying to hit the object) I am increasing or decreasing the the time the relay is on. The problem is this works but it either hits with too much force or way too much force. I can turn the relay on for 5 ms or more. If I try to turn it on for 1 ms it does not even respond. (I am using a mechanical relay.)

I would like to have more control on how much of the energy I discharge so I can control how hard/soft the solenoid moves (say discharge only 10 percent of the total energy stored so it hits slower). While searching I found out about Solid State Relays which according to wikipedia can be switched on an off way faster that mechanical relay (of the order of microseconds to milliseconds).

So my question is am I on the right track? or is there something better to achieve what I am trying to achieve?

• See if PWM (Pulse Width Modulation) would fit you purpose. That may give you more control. As used with DC motors. Mar 3 '13 at 3:53
• Are you trying to control force on the solenoid armature itself or the force on something that you're hitting with a moving armature (i.e. inertia-driven). Mar 3 '13 at 5:05
• @HikeOnPast - latter, force applied to the object I am hitting. Mar 3 '13 at 5:34
• You don't need PWM, you just need higher resolution control over the time that the solenoid is turned on. Look into using a FET or BJT (transistor) instead of a relay. Mar 3 '13 at 6:40
• Have you considered reducing the voltage to which the cap bank is charged? Mar 4 '13 at 11:41

Without knowing the current and voltage, only general advice can be given. I would do one of two things:

1. Keep the mechanical relay and adjust the solenoid power by what voltage the capacitors are charged to. A mechanical relay is simply not appropriate for the kind of timing you want. You aren't going to get what you want trying to modulate the on-time of a mechanical relay.

2. Fully charge the capacitors as now and use a solid state switch. A low side NPN or NFET would be the easiest to control. I would not use a solid state relay directly. These are slow and can have significant voltage drop. If you need the switch to be isolated, isolate some control circuitry with it that then switches the bare transistor.

You will definitely be further ahead if you use a solid state device to control the solenoid. You don't need a solid state relay per se, just a power transistor (and a protection diode -- search for articles on how to control a solenoid with a transistor).

That said, I suggest there are a couple of issues to think about:

1. This is a mechanical device with some momentum to overcome, a period of time when the armature must be accelerated from an initial stationary state up to whatever velocity it reaches prior to impact.

2. The solenoid coil acts as an inductance, and will only gradually increase the current flow in response to turning on the input voltage.

Both of these phenomena are non-linear (in fact exponential), so I suspect both will frustrate your attempts to control the force of the solenoid with much precision by just controlling the length of very short pulses. I agree with other commenters that you may be much better off controlling the voltage to which the caps are charged, and then use a standard length of pulse with which to apply that voltage. (Or at least longer pulses that might have more gradual effects when adjusted).

In addition, or alternatively, perhaps consider several transistor switches, each with different series resistors, so your controller can select different maximum currents to deliver.