Adding Auto-fire To A Computer Mouse

[Peter Skaarup’s] been re-living the past by playing old-school games in DOSBox. He’s using a mouse as the controller but longed for the auto-fire button that many joysticks used to have. Instead of looking around for a gamepad with this feature he decided to add an auto-fire button to the mouse. He incorporated a PIC 10F200, along with a momentary push switch and a transistor. The push switch enables the autofire feature, causing the transistor to short the left mouse button about seventeen times a second. Problem solved, and with a couple of other pins on the microcontroller there’s room for this project to grow.

Interested in an auto-fire feature for your gaming console? Perhaps this Xbox 360 rapid fire mod will give you some inspiration.

49 thoughts on “Adding Auto-fire To A Computer Mouse

  1. You could do it with a 555, yes. Or… four transistors, I think, and a couple of discretes. Or, y’know, a PIC.

    It could be worse; last week I wanted to setup something quick to read two temperature sensors, and make the data available over a serial connection, and the only hardware I had laying around was an STM32 dev board…

  2. Cool stuff. I did a rapid fire in my xbox controller with a pic 12f683.

    That said, please don’t link to that old-as-hell xbox ‘mod’. It only works on the OLDEST of xbox 360 controllers. There’s a lot better 360 controller mods out there.

  3. I agree a 555 timer would have been a better choice maybe with a small variable resistor for speed control and a micro toggle switch as well as a momentary so you have the option to just leave it shooting the hell out of something. why use a supercomputer to do the job that only requires a BBC Micro? what more could you possibly add to this anyway? (Dare I ask that…) if you could get an aldrino and xbee to fit in a mouse you would :D haha

  4. How about boosting the voltage of the square wave to a couple hundred volts and attaching the output to your finger. You could just stimulate your finger muscles directly.
    Hmm…I might have to try that myself. I’d be awesome at CoD, and I’ll bet the ladies would like it too!

  5. Hmm… Good idea using the mouse for feedback (:
    Have it monitor the game you are playing. Vibrate with an off centre weight on a small moter if you het hit and a little electric shock if you loose a life and a big one when you die :D haha may have to build one (:
    Hmm… All done in software on the pc to save on electronics.
    Looking over at my bench…
    One of thoughs micro RC cars supply’s the wireless in the mouse to control the HV maybe from a camera flash (:
    And the remote for the RC can just go on the parallel port To simplify communications (: vwala cheap dirty hack (: built in an afternoon from stuff I have on my bench haha

  6. I remember doing this some 15+ years ago – playing Star Wars on my Amiga I got tired of clicking the mouse button like a madman so I took the miniature autofire circuit out of a joystick and installed it in my Amiga mouse, along with a miniature on-off switch.

    Staw Wars was more fun then :)

  7. ive done this mod before with a microsoft explorer mouse (cut the traces to the left side button and wired it to a 555 timer that outputs to the left click. worked really good, in COD MW2 i could unload the 50cal barret in less than a second, same with most pistols) it was fun but i did get called a hacker in a few games. but it was fun as heck in some of the hacked lobbies when you had infinite ammo barret, just hold down the button and aim at your enemys, it actually would make your character go sideways from the recoil and was deadly as heck.

  8. i’ve built two rapid fire mice using 555 timers. I dont thinnk i even put a transitor in, just wired directly through a switch to the trigger on the mouse chip. The switch either enabled normal button clicks or 555 clicks. Plus i put a POT sticking out the back to adjust the 555 timing. In case i wanted faster or shorter fire rate. I do think a pic is overkill for this project. But if he puts in multi mode control or even the ability to control both left and right mouse button that might be usefull?

    If i put a PIC in i would add a left and right turn button. for thoose bad ass 360 knife kill spins in games. In fact it hink i will add a pic now and control the left and right control!

  9. there is no need for 555, most likely there is no need for any additional hardware except for a switch, good engineer would find already existing square signal on the circuit and tap into it

  10. Holy crap I can’t believe the amount of bitching over the use of a bottom of the barrel cheap, CHEAP, PIC in here. The 10F200 will set you back a massive $0.50 (a whopping 30 cents more than a 555!) and doesn’t even require any peripherals. I would gladly pay that additional money to get the convenience of using a PIC that also gives me the possibility of adding to the functionality later should I choose to do so.

  11. Using a PIC helps to de-bounce the button in an elegant way. It might not be as flexible (need for reprogramming), but it has to do one job and one job only: auto-fire.

    With respect to using a 555 vs. PIC, well;… The cost of components is nothing compared to the hours spent on hacking. The $1 component cost does not compare to the 8 hours of having fun hacking.

    Some have suggested that a different approach, fpga or analogue, would have been better/nicer/hackier/…. If you think so, make it happen and send in your result. Bottomline is to have fun making something do (un)expected things.

  12. I think I’m going to do that to my spare mouse using one of the 555’s that keep on poping up on my desk every once in a while. nice idea. even if only to use it as a DoS tool (autofire on refresh button?)

  13. I did this awhile ago with a pic 12f683 (overkill but all i had on hand…)
    for the haters one of the main advantages of the pic over a 555 is you can get it to send a seemingly random set of pulses at high speed as opposed to a PERFECT square wave from a 555 which obviously you fingers could never generate for more than 3 or 4 clicks. This makes it A LOT harder for games to detect ‘Fake’ mouse clicks if they ever implemented that feature :P

    also easier to add extra buttons to change between say a 3/5/8 shot burst, full auto and adjustable repeat rates

    I’ll did that mouse out a some time and add it to my blog :D
    ~Rob.

  14. “Using a PIC helps to de-bounce the button in an elegant way”

    When creating an auto-fire mod, I think switch bounce is not high on the list of priorities…

    If all you want to do is create a square wave then even 555 could be concidered overkill. You can do that with two transistors, 2 caps and 4 resistors (multi vibrator), or two not gates, a cap and a resistor. Depends what is in your junk box..

    But if you plan to add more features like the multi shot bursts, then PIC was a good choice. Plus it’s a nice project to start learning with.

  15. I wish this was a 555 mod. Even features like adjustable firing rate and burst mode could be accomplished with just one or 2 555s (one astable, one monostable, or 2 astable at different frequencies), or even a 556 (le gasp!). Seems to me like it would be less work doing it that way, and cheaper – and a little more interesting. uC are the easy way out.

  16. Well pic might not be such a bad idea after all. Some anticheat software detect multiple clicks in same regular time intervals and qualifies it as a cheating. Now, with pic a slight offset can be applied to circumvent this.

  17. You’re complaining about the pic, and say that you could use a 555. Well, you could use only a UJT transistor, a cap and three resistors.
    So, before complaining go and learn electronics at least.

    The only clever one was the one from “therian” who suggested using an already available square wave in the mouse.

  18. Not new,

    I built a auto fire mouse for the Atari ST – using a 555 timer – when I was playing Dungeon Master – I could wait near some water, turn on the auto fire, and practice some spells, and when my health dropped, turn off the auto fire and drink the water to restore some health…

    This was about 22 years ago…. ;-)

  19. HEY! ALL YOU GUYS DISSING THE USE OF A PIC!

    The 10F222 is *CHEAPER* than a 555 timer in most packages. The 10F222 does not require as much external circuitry that the 555 timer would! This project is cool because it would be incredibly easy to add features like “3-round burst” for your favorite computer games (exactly what I thought of when I saw it) not to mention a whole bunch of other possibilities. The 10F PIC is perfectly suited for this. Using an “arduino” would have been overkill, this is definitely NOT!!!

  20. @DarkFader if you wanted to use the “old school” 555 you can obtain them from the red disks left strewn over the roads when roadworks lamps get hit by cars.

    two 555’s, CdS sensor, sometimes a pair of brass contacts. Simplez :-)

    (but don’t get run over retrieving them, safety first!)

  21. LMAO at the other arduino comments…
    The VERY first thing that went through my mind was “I’m surprised some dicktard didn’t suggest using an arduino”…

    Great use of a PIC.

  22. I did this a few years back with a 555 timer.

    My newest version uses a PIC12F675. I added a small toggle switch in the side to allow the left click button to default to single click mode, while flipping the switch enables a 10Hz firing rate.

    The next version will have an indicator LED, and a PB for switch between single, burst and full auto fire.

    I found this hack very useful when I injured my hand a while back.

  23. I just found a use for my old wireless mouse. Only problem was a worn out microswitch, but if I am taking it apart to fix, I might as well throw one of my 12f683s have lying around!

  24. Goddammit, my idea is stolen.

    On December 14th, I made an autofire mouse but I didn’t even tell anyone, how was my idea stolen.

    I modified my Logitech G5 mouse. I put a PIC12F683 in the space for the weight cartridge, along with a logarithmic volume potmeter (sliding type) for the frequency (between 0.8 and 15 Hz). I configured it in a way similar to an NE555. The potmeter charges a capacitor and when the voltage is larger than a certain CV configured in the PIC, the mouse button is pressed for 1/50th of a second. I put a switch in the gap where the latch for the cartridge was, to turn it on or off. When on, the top orange led (the one shaped as a person) flashes at the frequency of the clicks.
    For photos, see http://s288.photobucket.com/albums/ll196/zomb1986/auto-fire%20mouse/

  25. Ok, I didn’t mean to sound angry, I ought’ve used some smilies. I always forget smilies >:|

    Ok, about all that 555 talk, I also tried a 555 and it doesn’t work. When I press the button, I want a click delivered immediately and then at regular intervals. Depending on the way you configure your 555, either it runs astable continuously and the first click can be anywhere after you press, or you have to wait for about two periods worth of time before even the first click is delivered. Using a PIC solves this.

Leave a Reply to TomasitoCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.