Hardware Can I use a small Arduino board to add autofire functionality to an official Switch Pro Controller?

Jayro

MediCat USB Dev
OP
Developer
Joined
Jul 23, 2012
Messages
12,962
Trophies
4
Location
WA State
Website
ko-fi.com
XP
16,963
Country
United States
I have this board here, the Arduino Pro Micro (Leonardo/ATMega32U4) and wanted to know how I'd go about adding autofire to the ZR trigger for shooters. It would give my fingers a break for games that use semi-auto pistols.

Anywho, how would I go about wiring this up, and what commands would I need to flash to it in the Arduino IDE?
Thanks in advance!

(BIG PICTURE FOR DETAILS)
s-l1600 (4).jpg
 
  • Like
Reactions: Julie_Pilgrim

Shadow#1

Wii, 3DS Softmod & Dumpster Diving Expert
Member
Joined
Nov 21, 2005
Messages
12,345
Trophies
2
XP
8,005
Country
United States
I have this board here, the Arduino Pro Micro (Leonardo/ATMega32U4) and wanted to know how I'd go about adding autofire to the ZR trigger for shooters. It would give my fingers a break for games that use semi-auto pistols.

Anywho, how would I go about wiring this up, and what commands would I need to flash to it in the Arduino IDE?
Thanks in advance!

(BIG PICTURE FOR DETAILS)
View attachment 219798
The SN30 Pro Plus has auto-fire features
 
  • Like
Reactions: Julie_Pilgrim

Jayro

MediCat USB Dev
OP
Developer
Joined
Jul 23, 2012
Messages
12,962
Trophies
4
Location
WA State
Website
ko-fi.com
XP
16,963
Country
United States
The SN30 Pro Plus has auto-fire features
I am aware, but I spent good money on my Pro controller, and would rather not buy another for 1 additional feature. I'm a DIY guy, and I wanna get my hands dirty! :toot:
 
  • Like
Reactions: Julie_Pilgrim

mrgone

old man
Member
GBAtemp Patron
Joined
Nov 6, 2002
Messages
1,330
Trophies
3
Age
45
Location
close to the oktoberfest
XP
2,876
Country
Germany
I have this board here, the Arduino Pro Micro (Leonardo/ATMega32U4) and wanted to know how I'd go about adding autofire to the ZR trigger for shooters. It would give my fingers a break for games that use semi-auto pistols.

Anywho, how would I go about wiring this up, and what commands would I need to flash to it in the Arduino IDE?
Thanks in advance!

(BIG PICTURE FOR DETAILS)
View attachment 219798

probably or maybe
but if you're asking "what commands would I need to flash to it in the Arduino IDE" you better don't and get a auto-fire controller
 
  • Like
Reactions: Shadow#1

mrgone

old man
Member
GBAtemp Patron
Joined
Nov 6, 2002
Messages
1,330
Trophies
3
Age
45
Location
close to the oktoberfest
XP
2,876
Country
Germany
I am aware, but I spent good money on my Pro controller, and would rather not buy another for 1 additional feature. I'm a DIY guy, and I wanna get my hands dirty! :toot:

get a breadboard before wiring it into a controller
and some wires, optionally a button, or just cross the wires, if you dont have a button

write program to sense button input,( lots of examples on the net and in the arduino ide is at least one also)
write input to an output pin
learn to measure passed time
if the button is pressed long enough, invert the output signal for a short time.
for testing the output pin can be the led pin.
 

The Real Jdbye

*is birb*
Member
Joined
Mar 17, 2010
Messages
23,252
Trophies
4
Location
Space
XP
13,805
Country
Norway
I did some research into this (triggering button presses with an Arduino) a while back for a different project.
I found this thread to be a very good source of information: https://forum.arduino.cc/index.php?topic=88203.0
The short of it is, you should be using opto isolators or transistors to avoid current backfeeding into the Arduino (if the Arduino is not powered and the controller is, current is backfed into the Arduino powering it through the I/O pins, which obviously isn't good, those pins are not rated for more than 20mA and obviously aren't designed to power the chip), there are probably also other reasons why this is a good idea.
You should also never set the pin to output high as that will feed 5V to the controller whereas the controller might expect 3.3V (I am assuming your Arduino is one of the 5V ones as most are, though I haven't checked, some do indeed run on 3.3V though but these run at 8Mhz rather than 16Mhz and for that reason I've avoided them)
But according to that thread, setting the pin to output low *should* in theory press the button, setting it to input should unpress it. Set it to low *before* setting it to output, to avoid the aforementioned issue.
And the GND should be bridged between the controller and 'duino.
My project has kind of been on hiatus so I haven't tested it myself, so would be interested in whether it works for you.

There don't seem to be test points for the buttons, but the shoulder buttons, if they are anything like the JoyCons, should just be regular momentary pushbuttons that you can solder to the legs of. As for the other buttons if you ever decide to take this further, obviously soldering directly to the button contacts would interfere with normal operation of the controller, but you might be able to find vias you can solder to. But if you are ever going to do something where you need to control many/all of the buttons, it's probably better just to get a cheap 3rd party Pro Controller from China which likely will have test pads and save you a lot of hassle. Although, as I found out with my $10 3rd party 360 controller (which I got since the official 360 controller had some graphite coating on the button pads that I wouldn't be able to solder to and I wasn't sure if there was metal underneath to solder to if I scraped it off or if I would just be scraping away the trace entirely), it seemed to be exceptionally cheaply made, as several of the pads were ripped off when I tried to desolder the sticks, had to fix it by soldering directly to the tiny traces. Which wasn't as bad as expected TBH, and gave me some valuable experience. Having never done SMD soldering before, I can't say for certain that this isn't typical of all boards, but I don't feel like I applied much force when desoldering the things, the pads just came off way too easily IMO. Just the act of using desoldering braid to remove solder from a pad was enough to rip some of them off. And I only pressed as hard as I had to to get the solder wick to suck up the solder.

If you ever for some reason also want to control the analog sticks, I did some research into that as well. What you want for that is one of these: https://www.analog.com/media/en/technical-documentation/data-sheets/AD5204_5206.pdf
4-/6-Channel Digital Potentiometer
Make sure you get the right resistance. You can get a sample of each of the resistances though, no problem.
They'll send you a free sample if you ask, don't even have to pay shipping. That's how I got mine as they weren't available locally, I would have had to order from US from a site like DigiKey and shipping that overseas would be prohibitively expensive considering it's such a small and cheap component. 6 channels (AD5206) is enough to control both sticks and triggers on a 360 controller which is what I was working with. But 4 will do for a Switch Pro Controller.
There are other options but from my research, that's the only one that handles 6 channels in one chip. But since only 4 are needed for a Pro Controller, there might be other options I don't know about.
 
Last edited by The Real Jdbye,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    SylverReZ @ SylverReZ: https://www.youtube.com/watch?v=pnRVIC7kS4s