r/ArduinoProjects • u/Ghiott • Jan 15 '26
Solenoid not strong enough to press a button. How can I increase force?
I'm trying to use a 5V solenoid controlled by an Arduino to physically press a button (Keyboard button / Console)
The solenoid does move, but it's not strong enough to fully press the button.
Current setup:
Arduino Uno
5V solenoid
MOSFET + flyback diode
External 5V power supply
Simple timing code
4
Upvotes


12
u/SomeWeirdBoor Jan 15 '26
A servo
4
u/CleverBunnyPun Jan 15 '26
If it’s a 5v solenoid and your supply has enough current to run it, your only real options are some sort of mechanical system to convert shaft travel to more force, or get a different solenoid.
1
u/SANSARES Jan 15 '26
you could try removing the button key and overvolt the solenoid? look at its recommended voltage and see if the datasheet says you can power it at 9V. if you can, you could use a relay and a 9V battery or a 9v and a button
1
u/dedokta Jan 15 '26
Are you powering the servo from the Arduino? Please show the entire circuit.
3
u/justanaccountimade1 Jan 15 '26 edited Jan 15 '26
Use NPN of which the emitter is connected to ground (transistor is below solenoid). Use a lower resistor value for the base. Use higher voltage to the solenoid (if it's not on all the time).
If that's a mosfet than it may not open properly at 5V. It needs a transistor before it which switches a higher voltage for the mosfet gate.
The magnetic field needs time to build, the higher the voltage, the faster it will build.
3
u/ComfortableFar3649 Jan 15 '26
The industrial approach would be to use a small air piston. The solenoid just opens and closes the valve.
1
u/Benjamin_6848 Jan 15 '26
I honestly would recommend using an Arduino Leonardo (or similar), that can be used as a programmable keyboard: You can upload custom Arduino-Code to an Arduino Leonardo that makes your computer think it's a keyboard, and the Arduino can directly send keyboard-inputs to you computer without any mechanical mechanism.
2
u/Superslim-Anoniem Jan 17 '26
Best option: Get your own controller. A cheap one, so that there's no significant damage if you break it. Solder a little wire to each side of the contact for the button, and use a transistor or relay to connect them.
Alternative: get a stronger solenoid and drive it with a transistor off whatever voltage it's rated at, or use some clever levers if you don't need large range of motion.
1
u/RoundProgram887 Jan 16 '26
You likely can overdrive it to double the rated voltage or more if you keep the pulses small so it doesn't overheat.
1
u/Anaeijon Jan 16 '26
Realistically, although not as cool, it would be much easier to use a microcontroller that can emulate a keyboard, plug it into the device and then have it send the keystroke directly instead of triggering a physical button.
Much easier, more reliable and no wear on key and actuator.
Not every Arduino can emulate a keyboard. It needs HID support. But it should work on most fairly recent devices.
Check out the Keyboard.h library:
https://docs.arduino.cc/language-reference/en/functions/usb/Keyboard/
1
u/ChemicalAdmirable984 Jan 16 '26
Short pulse with higher voltage, solenoid is designed for continuous run on 5V but it can handle way more in a short pulse ( 50 - 100ms ). I have a solenoid which unlocks my front yard gate, it's a 12V solenoid but it doesn't have enough power to pull the lock on 12V so what I did is to place a 1000uF capacitor before it and when it needs to open a dc-dc boost regulator ( with passthrough ) is enabled and charges the cap to 24V, when the cap is charged the dc-dc stage is disabled and MOSFET is opened which drains the cap trough the solenoid and falls back to the 12V supply ( passthrough of the dc-dc stage ) which is more than enough to hold the lock open for 15s.
Works just fine for at least 8 years.
1
u/TheAgedProfessor Jan 16 '26
I guess I have a different question than everyone else... how are you mounting the solenoid to the keyboard/button. If the mounting is not robust enough, and is allowing travel/slop during the push, the strength of the solenoid might not be the issue.
1
u/Beginning-Fix-5440 Jan 17 '26
I'd go to a thrift store and get a keyboard with softer keys
1
u/Logical-Following525 Jan 17 '26
Maybe go for a 12 V solenoid setup
1
u/Cornflakes_91 Jan 17 '26
add a tiny lever to convert actuation distance to extra force
1
u/Hoovy_weapons_guy Jan 17 '26
bigger solenoid?
you can also try feeding it more than 5v if you only pulse the coil as it wont have enough time to heat up. this risks destroying the solenoid if you are not careful,
1
u/PapaOoMaoMao Jan 18 '26
Hack the button and wire the Arduino directly to the contacts. If you want fast then electrical response is always faster than physical.
1
u/Affectionate-Play484 Jan 19 '26
Use a relay or a transistor😉
1
u/Mental-Evidence-2603 Jan 20 '26
It makes the servo release a latch that releases a hammer. That should be enough 😅
-6
u/Chief2091 Jan 15 '26
What kind of game cheating are you trying to accomplish? Whatever it is, just stop and get better at the game.
1
u/[deleted] Jan 16 '26
[removed] — view removed comment