I need an actuator to press a button in a production tester for a device I designed. The seemingly most straightforward way to do this is to use a solenoid. Those should be good for pressing small buttons, yes? It would be nifty to power everything from USB but not essential. I need a push type to actually press a button.

The switch is Würth WS-Tasu side button with 160 gram nominal force. That switch exists from different manufacturers as well with almost identical spec.


After digging into this, it appears you need surprising amounts of juice to make this happen with a solenoid. Initially I looked at miniature solenoids, which would need 25-30W to make that amount of force (+/- 50g spec) happen. 6A at 5V? That's a fairly chunky SMPS circuit to build right there, not to mention nowhere near what USB could supply.

After more research it turns out larger solenoids are more efficient. The bigger the better but obviously there's only so much room available plus having a water bottle sized solenoid pressing a tiny switch is not ideal.

For example C&S Controls SM0 solenoid (38.1mm x 15.9mm x 18.3mm) seems fit for the purpose.


This thing would manage around 2.25 Newtons of force at 2mm stroke and 6W, which you could theoretically power from an USB dedicated charging port. Also 0.5A @ 12V is heck of a lot easier to manage.

The thing I'm having trouble with is that I don't understand the stroke vs force graph.

What I'm not sure about is how to interpret that graph exactly. Where is the maximum force generated? When the rod is fully extended i.e. where it goes when you switch on the power without anything to stop it?

If I arrange a magnet (or a spring) to pull it 2mm away from the end position and switch on the power, about 1N of force is generated at that point, which rapidly increases to ~ 7 Newtons near the stopper? Let's ignore the counterforce for the sake of simplicity. Or presume I'm going to use an electromagnet which only activates when the solenoid is idle.

Here's what CS Controls Ltd's SM0 solenoid force vs stroke graph looks like: Force vs Stroke

The plunger is a loose metal rod going inside the solenoid, requiring some kind of magnet of spring to pull it back to start position. Like this guy here:

Solenoid rod

  • \$\begingroup\$ You should pass on the solenoid and just wire a pair of relay contacts across the switch contacts in this factory test set. Then you can energize the relay coil to perform the function of the switch activation. Only a small relay would be required and the coil current could be as small as maybe 40 or 50mA. \$\endgroup\$ May 16, 2019 at 14:10
  • \$\begingroup\$ If you have a compressed-air supply in the facility, you may find that using pneumatic actuators is simpler. They can easily apply the force you require, and the power to drive the solenoid valve to the actuator will be much lower. \$\endgroup\$
    – SiHa
    May 16, 2019 at 14:20
  • \$\begingroup\$ It might be easier to use a radio control model servo, with a lever on the shaft to press the button. You'll need PWM to drive it, quite easy to generate from a couple of 555s (a 556) or any microcontroller. \$\endgroup\$
    – Neil_UK
    May 16, 2019 at 17:14
  • \$\begingroup\$ @MichaelKaras Bypassing a switch is not a very good way to test a mechanical switch works! \$\endgroup\$
    – Barleyman
    May 17, 2019 at 9:00
  • \$\begingroup\$ @Barleyman - I guess the description that you gave in the first part of your question is easy to read the wrong way. You did say "I need an actuator to press a button in a production tester..." which does not imply the button is on the device under test. \$\endgroup\$ May 17, 2019 at 9:09

2 Answers 2


Where is the maximum force generated?

The maximum force is generated when the thicker section of the metal rod in your picture is almost fully inserted into the coil. The thinner section of the metal rod is the push actuator, an optional piece needed when you need to push rather than pull.

There is a physical stop in one direction on most solenoids, the metal rod will not go all the way through the coil. There is often no physical stop in the other direction, your design must handle that.

The return to the un-actuated position is normally handled by a spring or gravity. Some have springs included. Your button spring may suffice.

Not all are rated for 100% duty cycle. The solenoids rated for lower duty cycle will have a larger force. But, if you run them at a higher duty cycle than they are rated, they will overheat.

  • \$\begingroup\$ Ok, so it looks like my assumption was correct, the maximum force is generated just before the plunger hits the stopper inside the cylinder. The graph percentages indicate max allowed duty cycle for the power level, in multiples of the nominal power you're feeding, from 1x to 10x. In this instance, 160 +/-50 gram switch requires maximum 2.1 newtons to compress. So with the nominal 6W power, at 1mm enough force is generated. What's really throwing me off is how drastically the force drops. The coil is something like 30mm long and if you move the plunger 1mm, the force drops to 1/4th? \$\endgroup\$
    – Barleyman
    May 16, 2019 at 13:04

The force is in the internal air gap between the endstop and moving rod with the tapered end.

  • The force increases greatly as the gap reduces to zero.

  • A tapered plunger has a stronger pull-in force than a flat end-stop. While a flat end-stop has the strongest retention forces.

  • All soft iron rods are pulled in towards an air gap where the internal end-stop position gives the best trade-off between pull-in force and retention force.

  • Solenoids have various end stop designs but the rods are offset to one side to only pull towards the centre to null the stopper gap.

For more and more details on Solenoids such as Pull-time vs current, BEMF effects on current vs position and time, Force vs duty-cycle, end-stop shapes vs force curves. Also brief considerations for residual magnetism on retention force.

For constant power but reducing duty cycle, the pull-in forces increase. This is also consistent with why AC solenoids have greater pull-in force as the same pull-in force works in either direction of current.

  • \$\begingroup\$ Ok, I see. I was confused by the theoretical open coil magnetic field which is relatively uniform in the middle of a long coil. \$\endgroup\$
    – Barleyman
    May 17, 2019 at 8:59
  • \$\begingroup\$ Did you understand the inverse force law with air gap in the magnetic loop? Did you get that the 10% duty cycle has higher force than same power DC? \$\endgroup\$ May 17, 2019 at 9:16
  • \$\begingroup\$ Low duty cycle just means in this instance driving with higher current briefly and letting the coils cool off when idle, not very difficult to understand.. If you want to be more efficient you could design a variable output SMPS circuit to supply max power initially and taper it off to hold the button down when it's closest to the end point. \$\endgroup\$
    – Barleyman
    May 17, 2019 at 9:49
  • \$\begingroup\$ I think it means rapid PWM modulated duty cycle to pull more at a distance and dissipate the same power using higher voltage \$\endgroup\$ May 17, 2019 at 9:51
  • \$\begingroup\$ Some vendors give you outright the time in seconds how long you are allowed to drive the coil at higher currents. Looking at the SM0 solenoid, driving on AC gives you longer useful stroke but caps the power close in. \$\endgroup\$
    – Barleyman
    May 17, 2019 at 10:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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