Baby's First Button Box

Howdy folks, first time DIY-er here! I’ve been doing research and a lil prototyping over the last few weeks on my first button box and would appreciate another set of eyes before I start soldering to my controller.

The gist of it is that I’m trying to build a button box with a few arcade buttons, some SPST switches, and a couple potentiometers for throttles.

Some questions if I could trouble the brilliant minds of Mudspike :slight_smile:

  • Is this going to explode and kill my family, if so, how much could I make on insurance?

  • I decided to go against the matrix style that I see often used because I didn’t need the ports, am I missing out on something by ditching it?

  • I’ve done a daisy-chain for the ground. It seems like the biggest mis-step on this one would be breakage?

  • The 12v LEDs I have have built-in resistors, I assume that running them in this fashion vs in series is probably best for brightness without the risk of frying them?

Any other big callouts / concerns you see with my current plan? I appreciate the help!

edit: I should note that I’m planning on using a Pro Micro, just used the Arduino Uno for illustrative purposes.

9 Likes

Hello and welcome @mudderssaygo ! :smiley:
I love your humor, it’s a perfect match for the rest of us here. :rofl:

I am not the smart one to be able to help you with this (I’d like to ping @Troll and @Derbysieger ) but anyways- can’t wait to see how this progresses.

:+1:

5 Likes

Are the potentiometers supposed to act as dimmers/series resistors for the LEDs?

If so, you may find that they will act in a rather nonlinear fashion below the break-through voltage of the LEDs, they won’t do anything (per se not an issue). And you should perhaps put resistors in series to limit current when the pots are fully on so you don’t exceed i_max of the LEDs, as their voltage/current characteristics tend to be extremely nonlinear.

Edit: LMK if you need help with calculating the resistors.

5 Likes

Hi there @mudderssaygo and welcome to Mudspike! :mudspike:

I’m guessing those LED are placeholders for anti ghosting diodes for the switches?

What is the purpose of the dip switches 1-4?

4 Likes

Hello and welcome @mudderssaygo

I will take a look tomorrow but @sobek and @Troll made some good points already.

1 Like

Hey folks, appreciate the feedback and welcomes!

  1. On potentiometers, they’re 50k-Ohm pots and their only intended purpose is to be a set of throttles, no intended effect on the LEDs.

  2. On LEDs, they’re actually just LEDs. They don’t need to do anything fancy and honestly I am not even leveraging the Arduino for anything other than a power source. They’re this style of chunky arcade buttons and the LEDs are really just for color:

  3. On the dip switches, they are intended as controller toggles (e.g. engine start), nothing fancy or other LED/pot interactions.

edit: it seems like maybe it makes sense to completely separate the ground for the potentiometers and the rest of the circuits?

edit2: I realized I forgot to show the resistors with the LEDs! They’re built-in 220ohm resistors. I’ll add them to the diagram.

2 Likes

There isn’t a need to seperate the ground, just make sure the connections are secure.
I would recommend using a dedicated power rail to light the LEDs, especially if they’re 12V LEDs they’re going to require quite a bit of power and even if a board can supply power via its data I/O it might not be enough power to reliably light four 12V LEDs. You could switch the LEDs via some MOSFETs connected to the boards I/O for example. Kinda like this:

could you give me a link to the LEDs data sheet?

Edit: btw there are pretty fancy MOSFET drivers with build in freewheeling diodes if you’re doing stuff with relais for example. Way overkill for what you’re doing but pretty cool nonetheless.

Edit2:
What is the purpose of having the potentiometers (I presume) ground connected to a dip switch? for a simple application you don’t need to connect the ground of the poti at all.

2 Likes

What software will you be using for the Arduino?
I guess you want to make it DirectX compatible so you can use it as a game controller?

1 Like

Good point, what are the logic voltages for an arduino? I doubt it’s more than 5V.

1 Like

IIRC it can output 3.3V and 5V (set via software, so you need to be careful when using 3.3V parts) plus the PWM I/O pins can obviously handle anything in between. It might light the LEDs at 5V, albeit dimly, but it’s entirely possible that it’s too much for the arduino. Going with dedicated power for LEDs is always recommended.

Well now I gots to do more reading on MOSFETs! Appreciate the tip! I’ll dig up some references on running dedicated power for the LEDs.

The LEDs are not fancy enough to have a datasheet (purchased from Amazon: " uxcell Game Push Button 34x34 Square 12V LED Illuminated Push Button Switch with Micro switch for Arcade Video White") but from my dissections, this seems to be the culprit:

Light Color: White
Forward Voltage: DC 9-12V
Forward Current: 20mA
Wire Length: About 20cm / 7.9 inches
LED Type: 5mm Round Top Bulb

re: connecting the potentiometers to ground, no reason other than I thought I had to! It looks like you’re totally right and I can save myself the headache of grounding them (at least according to TinkerCAD). Nice save, thank you!

For software, my plan was to use the Arduino IDE with the Joystick and Keypad libraries.

On a quick side note have you seen the Leo bodnar usb button controllers

They are usb plug and play, some have analogue input as well as button, found them very easy to set up

I took a look at the buttons and yes, you’re going to need a dedicated 12V DC supply if you use these buttons, there is almost no chance that the 5V of an arduino can light them. You can try, it won’t do any harm, but I am pretty sure it won’t work.

Just FYI in your schematic the ground pin of the potis is not connected to ground but to a dip switch connecting to pin ~10 on the arduino. I am now sure you simply forgot to connect the third dip switch to ground but as I said you don’t need to connect the gnd of the potis anyway.

1 Like

Now I understand why you’re all looking at me crazy!

I revised the drawing to fix the ground wiring, but my prototyping shows the LEDs seem plenty bright running off the pins themselves.

I got everything minus the potentiometers wired (they’re waiting on a shipment on Amazon) and I didn’t burn down the house yet! The Joystick library for Arduino worked perfectly, I really appreciate everyone’s help so far! Will post a picture of the final product once I get it prettified :slight_smile:

4 Likes

Well I won’t say it’s done, but it’s mostly working and my failures are mostly in the manual front!

The buttons, lights and throttle all work! I appreciate everyone’s help in getting it set up. I have some work left to do in terms of how to finish it (Dupont connectors are super fishy and I’ve got to figure out a solution that is less brittle) but you guys are amazing!

8 Likes