Check my wiring dia...
 
Notifications
Clear all

Check my wiring diagram for a button box?

8 Posts
2 Users
0 Reactions
1,963 Views
(@misfitz)
New Member
Joined: 2 years ago
Posts: 4
Topic starter  

Hello all!

I recently upgraded to an extruded rig with a DD and decided to buy a bunch of electronics off Aliexpress to make my own button boxes. I've never worked with Arduinos before but I'm no stranger to soldering and believe I can catch up pretty quick when it comes to the code.

I am having a hard time, however, making sense of the wiring. The button box I'm trying to build is based on this one and will have 15 2-post buttons, 1 NO/NC/C button, 7 2-way 3-post toggle switches and 7 rotary encoders that look like this.

I currently have it all put together and wanted to start wiring before getting into the coding side of things. I tried using the Simhub arduino sketch setup as that is what the original creator of this button box did. So I emulated what he did to a degree (see here and here for arduino mega pinouts) using 7 rotary, 6 'additional buttons' and a matrix of 5 columns and 4 rows. I couldn't find any tutorials that took you through that process with physical hardware. Seems most "button box" tutorials using Simhub use tablets instead. I'm hoping someone might be willing to check my work based on the pinout pictures above and the wiring diagram I (sloppily) put together here.

I greatly appreciate any help or input to assist me getting through this project. It is definitely above my skill level so I'm hoping to learn more so I can do more projects like this moving forward while knowing what I'm doing! 🤣 


   
Quote
 sgeg
(@sgeg)
Trusted Member
Joined: 3 years ago
Posts: 52
 

hello

i didn't check your wiring but if you need your button box to use it in game, you will need a pro micro or a leonardo...that will be reconize by windows as gamepad

with your mega all buttons will be to control simhub controllers (like increase luminosity or change dashboard) but couldn't use them for game control.

edit: you have a problem with the 2 ways toggle that are connected only in 1 plot the middle in the GND

your matrix should be more 6x6: 36 button included the rotary ones


   
ReplyQuote
(@misfitz)
New Member
Joined: 2 years ago
Posts: 4
Topic starter  

@sgeg Oh, I did not realize that! Guess I will be buying a pro micro then. Pro micro and Leonardo don't seem to have enough pins for me to use this many buttons. Guess this will be a simhub only box! Surely there must be a way for Simhub to forward button press of some kind to control settings in-game?

Could you elaborate on the problem with the 2-way toggles? The are connected with the middle pins going to ground and the top pin connected to the button matrix. Is that not correct?

Oh, I didn't realize they needed to be in the button matrix as well! Does the "Encoder CLK" pin not handle the push button part of the rotary encoders?

Thank you so much for your help! I really appreciate you taking the time!!

This post was modified 2 years ago 2 times by MisFitz

   
ReplyQuote
 sgeg
(@sgeg)
Trusted Member
Joined: 3 years ago
Posts: 52
 

@misfitz

Posted by: @misfitz

Surely there must be a way for Simhub to forward button press of some kind to control settings in-game?

it's not possible, you need a chipset reconize as gamepad like the promicro

Posted by: @misfitz

The are connected with the middle pins going to ground and the top pin connected to the button matrix. Is that not correct?

matrix works in columns ans rows and you have only 1 way like that, if you want 2 ways you need to connect the 3rd plot in the matrix, 2 ways sould be consider as 2 buttons

Posted by: @misfitz

Does the "Encoder CLK" pin not handle the push button part of the rotary encoders?

CLK is for encoders, sw is for the switch. i proposed to include them in the matrix to save pins on the arduino pro micro

for your project you will need 2 pro micro at least
1 for the matrix and one for the encoders


   
ReplyQuote
(@misfitz)
New Member
Joined: 2 years ago
Posts: 4
Topic starter  
Posted by: @sgeg
Posted by: @misfitz

Does the "Encoder CLK" pin not handle the push button part of the rotary encoders?

CLK is for encoders, sw is for the switch. i proposed to include them in the matrix to save pins on the arduino pro micro

for your project you will need 2 pro micro at least
1 for the matrix and one for the encoders

Okay that clears up a lot for me. Thank you so much for the help! Just to make sure I understand correctly, you would only include the SW pins from the rotary encoders in the button matrix, correct?

Thank you again for your help sgeg!!


   
ReplyQuote
 sgeg
(@sgeg)
Trusted Member
Joined: 3 years ago
Posts: 52
 

@misfitz

yes only the switches like that you save 5 pins..

i attached a drawing for the matrix (i am not very good with photoshop)


   
ReplyQuote
(@misfitz)
New Member
Joined: 2 years ago
Posts: 4
Topic starter  

@sgeg No, thank you very much for the picture! It helps quite a bit as I'm definitely a visual learner.
The encoders only have one ground pin. If I wire the GND pins into the push button matrix, would the rotary rotation functions still work?


   
ReplyQuote
 sgeg
(@sgeg)
Trusted Member
Joined: 3 years ago
Posts: 52
 

@misfitz hi,

i am not 100% sure but it should works because the encoders wont be on the same promicro , just need to connect the second promicro GND to all encoder.

but if you use  promicro indeed you can add the switches individually to the 2 nd promicro and take off one row of the 1st one.


   
ReplyQuote
Share: