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.

Comments

  1. The ThunderBird says:

    I understand that his analog electronics skills are not up to scratch, but seriously: a 555 would have just sufficed, IMHO.

  2. Nick says:

    If he only used a 555 timer it would be harder to put in the properly timed 3 round burst and other features later.

  3. o says:

    You can just do this in software.

    Although, a hardware version would beat anti-cheat systems in new games.

  4. George says:

    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…

  5. DarkFader says:

    555 is old-skool tech. I know there are 6-pin SMD PIC chips but are there SMD 555s? (and if so, are they cheaper).

  6. Lenny says:

    @DarkFader

    a quick google says yes… $0.17 each

    http://www.taydaelectronics.com/servlet/the-210/NE555D-NE555-IC-555/Detail

  7. Gdogg says:

    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.

  8. Gdogg says:

    @Lenny 8-PIN SOIC != 6pin SMD

  9. CRJEEA says:

    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

  10. Gdogg says:

    There’s SO much you could add.
    -Variable speed
    -Burst size (click 100,250,500 times exactly?)
    -Click macros
    -Accelerated click rate

    etc. etc.

  11. I hope I never use a 555 again! I use the smd 10f series alot, and when I need a 555, I use the 10f. ok, just my rant

    good job on the autofire

  12. NatureTM says:

    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!

  13. Nomad says:

    NatureTM: Made my day! xD

  14. Gilliam says:

    use a relay, connect it to itself, who knows how fast that would fire? oh, also connect it to the mouse button.

  15. Bill Porter says:

    It could be worse guys, he could have used an Arduino!!

    Hehe. Anyway, it would be nice to see some configuration options, like which mouse button it rapid-fires.

  16. JB says:

    NatureTM: Literally just choked on my coffee reading that…
    Awesome comment and I have a clean inner nose now too!

  17. CRJEEA says:

    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

  18. tantris says:

    another idea to justify the pic: modes, or use the time delay between clicks to program the rapid fire speed.

  19. Haku says:

    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 :)

  20. jasper says:

    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.

  21. Jake says:

    I don’t think using a 10F222 was overkill. This is acutally pretty cool.

  22. pRoFlT says:

    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!

  23. Whatnot says:

    He should have used a FPGA.
    But I guess for some simple use a PIC will do, if you really don’t care.

  24. therian says:

    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

  25. sneakypoo says:

    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.

  26. bertho says:

    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.

  27. strider_mt2k says:

    Seriously, it’s cool hack, it works, and it didn’t break the bank.

    Congrats to the maker.

    Poo on the haters.

  28. ecig says:

    Now I have to try this just for the hell of it.

  29. isama says:

    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?)

  30. RobThePyro says:

    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.

  31. zeropointmodule says:

    cool hack, btw the 10f200 is also available as a 6 pin smd package.
    Handy if you want to add this to a small mouse or one without much available space.

  32. Alex Rossie says:

    @CRJEEA,
    Now that’s a hack!

  33. smoker_dave says:

    “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.

  34. Luke says:

    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.

  35. bhd says:

    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.

  36. Tomasito says:

    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.

  37. Lenny says:

    @Gdogg … what’s your point? he just asked if there are SMD 555’s and how much they cost…

  38. Wonko The Sane says:

    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…. ;-)

  39. Eirinn says:

    @Therian I’m pretty sure hiring an engineer would be more expensive than buying a pic and a few components :P

  40. Jake says:

    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!!!

  41. Tomasito says:

    @Jake +1

  42. @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!)

  43. Arbuckle Jones says:

    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.

  44. ChrisE says:

    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.

  45. Gdogg says:

    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!

  46. Zom-B says:

    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/

  47. Zom-B says:

    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.

  48. Lenny says:

    Just for giggles I decided to go ahead and put one together using a 555 timer… Wound up at about $2.50 for materials (not in bulk from spark fun)..

    Also, I was able to keep the mouse fully functional unlike this one. I know this thread is dead I submitted it to HAD, but apparently it didn’t make “the cut” so here’s a link for anyone interested: http://itslennysfault.com/adding-auto-fire-to-a-computer-mouse-555-timer

  49. IJ Dee-Vo says:

    @haters..
    On no someone didnt do something the way I would do it, how dare they! If it’s not how you would do it, then do it your way and post it.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s