This week I have been revamping my basement to return it to the game room it is destined to be. I am excited for this change, as it will allow me to start streaming some gameplay and get comfortable without having the impending "move" of switching between rigs all the time.
As I hopped back on to American Truck Simulator, I realized there was a bit of immersion missing from some of the controls. I had a few parts from a prior build lying around, and I decided to put together a new box for some very specific controls. I was looking around the basement and found a few items I had for other projects that never came together, so I figured a hot day was as good as any to put a few things together.
All the pieces used to create this box are linked in the item description. I am not getting any commission or anything from this, so don't think this is any type of paid advertisement. There are dozens of ways to build button boxes, so I am also not saying this is the best or this is the only way. The entire point of this post is to show that if you need something quick and simple, but still with room to add on down the road, you needn't be afraid to jump in and start putting things together. There is a vast difference between this project and something like what Derek Speare puts together, so don't think I am trying to challenge the more advanced boxes out there, although the concept is essentially the same.
Very first, before you even start unboxing, is to decide what you want the function of the box to be. For my situation, I wanted to put together something that I could use to control a few functions of my semi, specifically cruise control, lights, and wipers. Knowing how many functions I needed was important to the build so I had enough buttons for everything.
Also important is knowing how the sim itself works. If a control mapping is "Toggle Lights", odds are good toggle switches won't work the way you think they will, as you'd have to switch it off and back on again for off (think of a switch as just a button being held to imagine this). This can be fixed with a secondary program running in the background such as SVMappper, which will be the subject of a later blog post.
Knowing that ATS has commands that toggle, buttons will be fine for this simple project. Since real trucks have long momentary switches to control cruise settings, I am going to use the joystick that came with my board set. This will allow me to map 4 different functions, so I will use it for the following commands:
Left: Cruise On/Off
Right: Cruise Cancel
Up: Increase Speed
Down: Decrease Speed
Keep in mind that this joystick and board are entirely digital. There is no analog input on this board, so everything connected to it will either be "On" or "Off", and since I am using buttons it will be momentary. Analog input for functions can be achieved using boards such as Arduino Leonardos, Bodars, and Teensy. Always be sure to double check when ordering these boards, as Arduino boards such as Nanos and Unos do not function natively as joysticks with Input/Output functionality and will require specialized sketches to make work. The board we are using here is designed to be used with arcade cabinet emulators and is often described as a "Zero Delay Arcade Emulator", so everything is plug and play right out of the box.
Step 1: Measure and test fit your box
When deciding on a box, the sky is the limit. There is no perfect or ideal box. Some are wrapped in carbon fiber, some are 3D printed, some are just ABS plastic, and some are just electrical gang boxes converted (This will be explored in another post). For this build, I am using a 7.5" x 4.5" x 2" abs box. This box is durable and lightweight, and won't crack. The only real downside to these boxes is that they scratch easily, so keep that in mind. Once I have my box opened up, I check to make sure that everything will fit properly on it. This is very important, as the joystick has a large housing that takes a significant amount of space. Ensuring the hole is drilled in the right spot is key as to make sure there is proper edge clearance for putting the lid back on the box.
Step 2: Measure, mark, and drill your holes
The joystick kit came with some buttons. There is nothing wrong with the buttons in the kit, but as I said above the point of the kit was for an arcade emulator, so the buttons are very large and take a ton of real estate. Fortunately, I had some smaller buttons from a prior project that would fit the bill and still leave a significant amount of room for adding more down the road. As I said before, there is nothing special about these buttons. You can put nearly any button or switch you find into these builds, as the operating amperage is so low you will not have to worry about heat or current overload.
Once you decide your layout, it is time to drill your holes. Make sure to mark where you want them so everything stays aligned how you want. You can use painters tape to make marks and give your drill bit a little extra traction to start to avoid scratching the box. This will also help the top of the box from getting small cuts in it. When measuring the bit you need, be sure to measure the width at the body of the button, not at the bezel. The bezel will always be a bit wider to cover up any flaws with the hole and to hold the button in place. It is always better to drill the hole slightly smaller if needed and work the button into it for a tight fit, as the last thing you want is to push your buttons back into the box.
Step 3: Mount everything
The next step is to mount everything to the box. This will vary by what you are putting in, but 95% of the time it will be a matter of unscrewing a ring or bezel, feeding the button through, and screwing it back to the other side. In the case of our joystick, we needed to put in a couple extra holes. These mount the plate of the joystick to the box so it doesn't move. In our case, 2 short M10 machine screws were adequate. I would recommend mounting with screws versus two sided tape, as this will have some torque on it and may pop loose while using it.
Step 4: The circuit board
Can't forget about this part. This board and joystick combination makes a great deal, but these boards can also be purchased a bit cheaper standalone. The boards nearly all come with a USB cable and all the wiring you will need, so you can use the board with nearly any button or switch combination you would like.
For this build, the board was very easy to deal with. Adhesive velcro is used to mount the board inside the box, and a small hole was drilled just big enough to feed the wire through. I could have also just notched the box at the front panel for the built in grommet, but I was not terribly concerned with the aesthetics for this build. Once the board is stuck down, it was just a matter of snapping the wires into the two poles on each switch. With this simple build, it doesn't matter which side is which as the buttons are very simple. More advanced devices such as multiswitches and encoders will require more sophisticated wiring, but we aren't focused on that for this post. for simplicity, we are using the first 4 plugs for the 4 buttons and connecting the joystick to the designated section on the board. (Are you seeing a trend? These boards make life sooo easy)
One thing to be aware of is that your wires may be loose on the pins. You can solder these connections, but it may be just as easy to crimp the wire tighter with a needle nose pliers. That will also ease swapping out hardware if needed down the road. Our build had plenty of wire to play with, so the only thing I had to worry about was making sure the wires were separated far enough that they wouldn't fall together when the cover was put on.
Step 5: Putting together and mapping the commands
That's all there is to it! All that is left to do is to close up the box, plug it in, and map the commands to what you want. The controller will likely register as something like "Generic Gaming Controller" or "Steam Emulated Controller", but the commands will respond just as they would with any joystick or controller when mapping. I currently have two boxes plugged into a USB hub and they work just fine with no interference. I now have a nice 4 way switch that is in easy reach to control my cruise while not taking up space on my wheel, leaving it free for other functions that may be more important or commonly used. The grand total was approximately 15 minutes and around $20, with plenty of cushion to save a little more. There is still plenty of room to add up to 8 more buttons or switches to this box as I expand its function, but it will do for now.