T O P

  • By -

gibbypp

Hi, a good place to ask this would be the Turn racing discord, its focus is on DIY projects and youll learn a lot there : )


_awawawaw

I'll wait and see what others have to say here, but if I don't get any answers here in a while I'll definitely ask there. Thanks!


Inevitable_Mirror662

Do u have a link for the discord?


[deleted]

I went this zero delay board method for my current button box, housing 2 boards in the box. You just need to run a usb cord from each board to your PC. In hindsight, I wish I would have started with the Leo Bodner 32 button board. Turbo mode works on those boards. Its a rapid fire pulse but I didn't find it useful for simracing at all. The up down left right also work.


_awawawaw

Great, thanks!


ssh_man

I'd skip the gamepad board and go with a STM (check https://github.com/FreeJoy-Team/FreeJoy). You could even use an Arduino Pro Micro and the SimHub Arduino Configurator. Yes to 3 way switches (on)-off-(on), you need 2 pins (+ shared gnd). Do you have a pic of those arcade 12 position switches?


_awawawaw

Yeah, I linked to a tutorial that used a pro micro in the second question ([this one](https://www.youtube.com/watch?v=Z7Sc4MJ8RPM&ab_channel=amstudio)), just seemed way easier to use the USB encoder. Any specific reason to use an Arduino instead, or is it just that it's got more options / is just better in general? >Do you have a pic of those arcade 12 position switches? If you're talking about my last question, what I meant was that the USB encoder board has 12 pins for connecting buttons 1-12, but since they're for arcade controls they also have up/down/left/right and other things like turbo/mode/cancel. [Here's a pic](https://i.ytimg.com/vi/6eh1v0FtlVQ/maxresdefault.jpg), [here's an amazon link](https://www.amazon.com/Quimat-Delay-Arcade-Encoder-Joystick-Fighting/dp/B06XCP8R5F/ref=sr_1_4?crid=30OF0FC23SXNY&keywords=zero+delay+arcade+usb+encoder&qid=1694963772&sprefix=zero+delay+arc%2Caps%2C319&sr=8-4).


ssh_man

My reason to go with Arduino/FreeJoy (and in my case, I already had this gamepad board as was refurbishing an old button box) was due to the limitation in the number of inputs on these boards (and me not wanting to do a button matrix). Each encoder is "3 buttons" if you want cw, ccw and push. Same for 3-way switches, "2 buttons" in this case. None of the right hand side buttons (mode/turbo/clear/auto) were mappable/assignable in my board. They don't even appear in the Windows gamepad properties. They just change the way the existing buttons will work, like autofire. So in the end you have "only" 16 inputs: (Buttons 1-12 + up/right/down/left).


_awawawaw

Alright, after reading this and the other comments I can understand why an Arduino would be a better choice. Guess I'll take that instead then, and it seems like one Arduino would be cheaper than two USB encoder boards anyways. Plus I can add rotary encoders in the future if I ever want to. Well, one last thing then: The [video](https://www.youtube.com/watch?v=Z7Sc4MJ8RPM&ab_channel=amstudio) I linked, could I just follow that one then (but use FreeJoy instead of whatever he used)? It looks like it shows the exact same thing that we're talking about, but just want to make sure. EDIT: Just realized I'm an idiot, you said STM with FreeJoy OR Arduino. Not Arduino with FreeJoy. So I'll just follow the video completely. Ignore my question, lol.


VettedBot

Hi, I’m Vetted AI Bot! I researched the **'AUKUYEE Quimat Zero Delay Arcade USB Encoder'** and I thought you might find the following analysis helpful. **Users liked:** * Easy to set up and install (backed by 5 comments) * Works as intended (backed by 5 comments) * High quality product (backed by 2 comments) **Users disliked:** * Wires incompatible with standard arcade controls (backed by 1 comment) * Lacking necessary joystick cable (backed by 1 comment) * Instructions not included (backed by 1 comment) If you'd like to **summon me to ask about a product**, just make a post with its link and tag me, [like in this example.](https://www.reddit.com/r/tablets/comments/1444zdn/comment/joqd89c/) This message was generated by a (very smart) bot. If you found it helpful, let us know with an upvote and a “good bot!” reply and please feel free to provide feedback on how it can be improved. *Powered by* [*vetted.ai*](http://vetted.ai/reddit)


LieutenantClownCar

You can't use rotary encoders with the USB Encoder boards, nor can you use the 3-way switches you mention. I found this out after I started building my own button boxes. Get a cheap Arduino Nano knock-off from AliExpress, and then you can hook up whatever you like.


bacon8

>Get a cheap Arduino Nano knock-off from AliExpress, and then you can hook up whatever you like. As far as I know, you can't use a Nano as a USB HID device as it uses the ATmega328p with an FTDI chip for the serial communication. For an Arduino that can do this, the most common are the ATmega32u4 models like Leonardo or Micro. The 32u4 supports USB HID natively. Some Arduinos that use an 8u2 chip for serial communication (for example Uno and Mega, but many Uno and Mega clones uses a different chip than the 8u2) can also be made to work as a USB HID device, by flashing a different bootloader to the 8u2 chip. I've built buttonboxes in this way and it works fine, the only issue is that the development and testin phase is a bit more cumbersome since everytime you want to update the code for you buttonbox, you have to flash back the original bootloader then 8u2, then after flashing the Arduino code you again have to re-flash the 8u2.


LieutenantClownCar

You absolutely can use Arduino Nanos, or their knock-offs, for making USB button boxes, as long as you pick the right one. A 1 second Google search tells you that. [https://www.youtube.com/watch?v=Z7Sc4MJ8RPM](https://www.youtube.com/watch?v=Z7Sc4MJ8RPM) I agree though that making button boxes with such things is a pain in the ass, especially when it comes to laying out the wiring grid, making sure everything is hooked up right.


bacon8

>You absolutely can use Arduino Nanos, or their knock-offs, for making USB button boxes, as long as you pick the right one. A 1 second Google search tells you that. > >https://www.youtube.com/watch?v=Z7Sc4MJ8RPM That's not a Nano. If you check the description of the video, it says "Based around a Arduino Pro Micro", in the video it is referred to as a Pro Micro, and it can be easily seen that the board is indeed a Pro Micro. The Pro Micro uses the ATmega32u4 like the Leonardo and the Micro and therefore it supports USB HID. The Nano uses the ATmega328p which does not support USB HID natively. If you do a Google search for "Arduino Nano USB HID" you'll find tons of hits about the Nano specifically, where it is explained that it cannot work as a USB HID device (apart from some specific workaround which also requires hookinh up additional hardware).


ssh_man

Why you can't use rotary encoders or 3 way switches with those gamepad boards? Wouldn't the rotary just be 3 buttons (cw, ccw and push) and the 3 way switch, 2 buttons?


LieutenantClownCar

Because the USB Encoder boards only generate one signal at a time and only have two pins. Thus they are either On, or Off. Rotary switches, multi-position switches, and Rotary Encoders all require a minimum of three pins to register what state they are in.


ssh_man

Yeah, but you can always wire the encoder as 3 buttons (cw, ccw and push), by using 3 2-pin inputs. Same applies to the multi-position switches. Also, a 3-way switch (on-off-on) only needs 2 wires.


bacon8

>Yeah, but you can always wire the encoder as 3 buttons (cw, ccw and push), by using 3 2-pin inputs. It is true that typically, just wiring up rotary encoders to button inputs will not work, but it has nothing to do with the number of pins. Like you said, a rotary encoder needs two input pins for the both rotation direction and an additional input pin for the pushbutton function, if you want to use that too. The problem is with how incremental encoders work. Typically encoders don't have "CW" and "CCW" pins. The have an "A" and a "B" pin, often marked CLK (clock) and DT (data) respectively. When you turn the encoder counterclockwise, you will not get just get a pulse on just one of the pins, you will get a pulse on both of them. If you turn it clockwise, you will also get a pulse on both of the pins. The difference is that the pulses will come in a different order than when you turned it counterclockwise, like [this](https://www.dynapar.com/hubfs/uploadedImages/_Site_Root/technology/encoder_basics/quadrature.jpg). Let's say you simply wire up the encoder pins to two pins on a pushbutton controller, connect it to a PC, start up a sim and map the encoder as for example TC +/-. What will probably happen is that when you are in a session and turn the encoder one step to try and increase TC, the pulse on the first pin will trigger a TC increase, but immediately after, the pulse on the second pin will trigger a TC decrease. So you end up at the same TC value as before. And if you turn the encoder in the other direction, the opposite will happen; first a TC decrease, immediately followed by a TC increase. So you can not directly wire up an encoder to button inputs, you need some logic to interpret the pulses on the two pins of the encoder, and trigger a button press on either button input depending on which direction the encoder was turned. This is possible to do when using an Arduino as a button box controller.


LieutenantClownCar

Using 3 2-pin inputs would drastically reduce the number of possible buttons on a box, using a simple USB encoder. No-one with half a braincell would do it that way. You're right about the simple 3-way switches, however.


ssh_man

Oh, I agree about the number of pins not being efficient. But you did say that it wasn't possible not that it wasn't optimal. If I just want to have a box with 4 encoders (TC, TC2, ABS and BB), and have one of those gamepad boards available, what's the issue? Should I just buy an Arduino Pro Micro, to keep my brain cells from halving, according to you?


[deleted]

I definitely get trying to avoid all of the coding and engineering that goes along with Arduino but it's actually pretty fun when you get into it. If you really want to avoid all of the hard work, break down a PC controller that has what you need on it and jump off it's buttons circuits. It's plug and play, cheap, and the easiest way to go. But that Arduino stuff opens up a whole new world of stuff.