Solenoid help!!!!! Plzzzz

Thread Starter

dantesinferno

Joined Feb 21, 2013
14
I want to be able to "Blink" a pull solenoid, at different speeds? Basically I am creating a videogame gun that recreates recoil. I want the solenoid to move back and forth at different rates, depending on the specific guns rate of fire. I've been stumped for the past 3 weeks.:mad: Basically when the trigger(button) is pulled I want the solenoid to move(vibrate/recoil) back and forth at different speeds/rates. I want a computer to be able to be able to control the speed. PLEASE HELP ME!!! I am dying on the inside. Would i use a servo motor controller? an Arduino?
 

thatoneguy

Joined Feb 19, 2009
6,359
Do you want a "knock" or "vibrate", a "knock" is a solenoid hitting a strike plate, vibration is with a motor spinning an unbalanced weight.

You may want to look at the old IBM computer keyboard internal pictures. They had a solenoid inside them that hit the metal casing to simulate the "feel" of an actual typewriter.

The signal to drive the solenoid can be anything, you'll need more power for a heavier knock.

What do you have available in circuit for power supplies and capacities? What are you using to decide when the knock is to be applied, or is it directly connected to a trigger switch?
 

Thread Starter

dantesinferno

Joined Feb 21, 2013
14
thanks for the reply @thatoneguy I want a knock, i want the solenoid to hit a striking plate/butt of a gun. Here is a video showing what i want to do:http://www.youtube.com/watch?v=SmmJRtnVv_U I just want to know how they did that!? I want the trigger/switch to "Start" the solenoid to strike. I can spend whatever money for equipment. I also want to control the striking speed. Any help would be great!
 

thatoneguy

Joined Feb 19, 2009
6,359
That is the standard solenoid for game rifles. You should be able to find that solenoid/knocker at any arcade repair/refurb shop to get the solenoid with weight.

Those solenoids aren't an off the shelf item from electronic stores, and getting one in the completed shell like that would be best.

Once you have one, you'll need to find out the voltage and current needed.

Something like a 555 timer driving a Relay or MOSFET could add the repeat after the trigger is held down for a while. If you search for "555 astable timer", you'll find lots of schematics for hooking up to a relay which are fairly simple.
 

Thread Starter

dantesinferno

Joined Feb 21, 2013
14
Would the 555 astable be able to control the speed of the solenoid? I want the speed to be able to be adjusted via pc interface? Thanks for the reply
 

thatoneguy

Joined Feb 19, 2009
6,359
The 555 is typically controlled by a potentiometer.

If you want complete control, a microcontroller could be used, which would then provide a serial interface to your PC, with which you could make pretty much any delays you'd like, including 3 shot bursts, etc. The output circuitry to drive the solenoid would be similar to that of the 555 output, namely, boosting current and voltage to drive solenoid. ICs typically can't source enough current to give the power/reaction you need.
 

Thread Starter

dantesinferno

Joined Feb 21, 2013
14
What microcontroller would you recommend? Arduino? Or something else? I can right code pretty well, but once I create it, how could I put it in a software? Thanks for the quick replies!
 

thatoneguy

Joined Feb 19, 2009
6,359
What languages do you know?

PICAXE (BASIC Programming Language) are cheap to get into, ($25 to start, <$5 for each project afterward)

Arduino (C Programming Language) are $25+ each for each project, but have a wider user base as well as code and libraries for common tasks already posted somewhere on the net.

Those are the "beginner" microcontrollers that let somebody make a rapid prototype of a project.
 

#12

Joined Nov 30, 2010
18,224
My opinion is that adding a microprocessor is overkill, but it depends on how sophisticated you want to get.

A 555 timer wired as an oscillator will do the job if you just want it to knock while the trigger is pulled. Because real guns do that, I'd stop there, but I'm lazy.
 

Thread Starter

dantesinferno

Joined Feb 21, 2013
14
Thanks guys or the replies, I'm thankfull for feedback!, lol I know python pretty well, but am willing to learn others. Why not c++? Or do those other two have advantages? Here is a totally new thought. The gun would basically be a human interface device/game pad . Could I make it to where the button goes into the computer as an input as well as a switch for the solenoid?
 

thatoneguy

Joined Feb 19, 2009
6,359
If you use a DPDT (Dual Pole, Dual Throw) switch, one could trigger the solenoid, one could signal the PC.

Have you made a game controller with interface before? It's a rather daunting task.

A simpler solution may be something along the lines of mounting an "air mouse" in the controller, and have it linked so the trigger pull clicks the fire button on the mouse. The movement would then be completely taken care of by the IMU in the mouse. Only thing left to do would be adding power to the solenoid.

If you want to build this from scratch, you have a long ways to go.
 

Thread Starter

dantesinferno

Joined Feb 21, 2013
14
I already have a game controller pcb that was gutted from an old controller, I took it out and have wires ready to solder with. So would I still be better off with the dpdt or an air mouse with a controller pcb? And if I use the air mouse, how would it trigger the solenoid?
 

thatoneguy

Joined Feb 19, 2009
6,359
For the air mouse, I'd use something physically attached to the trigger that would physically push the button. It may need a lever or pulley in addition, that's where "hardware hacking" comes into play. :D
 
A NE555 Timer would work perfectly for this. For said single burst, 3 round burst, and automatic, you can and a switch or a nob and it will be similar to a real gun.
Set up the timer with the + and - do all that then send the + down to the trigger and when you press it it will make the connection from + to trigger and it will send power to your solenoid.. The timing difference from the game and the solenoid will be depending on how well you add the capacitor and resistor combo. so maybe keep the circuit naked and press the trigger and see how it strikes compared to the game to tweak it correctly. For single fire you wont need the 555 timer so it would be
l<Single fire
l<+
l<Rapid/3 Round burst(555 timer)
on the switch.
Basically set it all up and from the trigger send the wire to the center of the switch and on the left the wire just goes straight to the solenoid, on the right the wire goes to the trigger of the 555 timer.
 
Top