Circuit Board Design

I wanted a single circuit board that would hold all the Arduinos and which I could solder the displays directly to. I decided to use long leads for the displays so that the board itself could be what holds them in place.

In order to make sure the placement of the displays was correct, I started with a board that was 12”x30”, which is the size of the entire control panel. Then in the user drawing layer, I placed circles to represent the holes for the buttons. (This is the bottom side of the board where the Arduinos will be mounted. That’s why the joystick is to the left of the buttons.)

Then I downloaded the EAGLE files for the new displays and used them to make simple footprints for them. Then I placed footprints for the displays and the Arduinos, as well as adding a courtyard for the joysticks.

Then I added all the connections. I planned to reassign the SPI pins on the Arduinos to make the layout easier (more on that later)

I added simple footprints to show where the relay bank and Raspberry Pi will go, just to make sure I have room.

Finally, I added cut lines to reduce the board to the area that I want it to take up. I also added some mounting holes.

And here is what the manufactured board should look like:

Redesigning (again)

I spent a lot of time trying g to get all of the displays working. But then some of the ones that had been working stopped working. It seemed that my design wasn’t stable, so I decided to rework it again.

While I’m at it, I’m also going to change out some hardware. Here is a brief summary of my plans:

What is changing:

  • Fewer wires, more circuit board. I realized when I started soldering wires between my circuit boards that I could have made the groups of four into single boards. Additionally, the wires connecting to the displays were pretty flimsy. So I decided to make a single board, and have all the connections between the Arduinos and from the Arduinos to the displays all on the board. Then I will solder the displays directly to the board.
  • The displays. Adafruit, who makes the displays I have been using, also makes another display that has the same circuit board footprint, the same pinout, and almost identical drivers. The difference is that the displays I currently have are 160×80 and 0.96”, the new displays are 240×135, and 1.14”. So the new displays are bigger, have higher pixel density, and a 16:9 aspect ratio instead of 2:1.
  • Button label images. Since I am switching to a different resolution for the displays, I will have to recreate all the images. They will look similar, but bigger.
  • The Pi. The Raspberry Pi that I have been using to emulate the games is a 3B that I bought in 2016. Since I’m upgrading other components, I may as well upgrade to the latest SBC. This will allow me to emulate some of the consoles that the 3B wasn’t up to.
  • The control panel body. I will no longer be using hardboard and cutting holes and slots in it. Instead I will create a CAD file and have it professionally fabricated, probably in lexan. The clear piece over the background paper will also be fabricated lexan.
  • No more superglue to hold the SD extenders into the slot on the display. That was a horrible idea.

What I’m keeping:

  • The buttons, joysticks, and USB boards that they connect to
  • The bank of relays
  • The Arduinos. They will need new sketches uploaded for the new boards, of course.
  • The micro SD extenders. The new displays have the SD socket right on the edge of the board, so the SD card sticks out far enough that trying to pull them out and reinsert them (if I need to update the files, for example) would be just too difficult.
  • The background for the control panel – though I will have to print it again.

Testing and Troubleshooting

With everyting all wired up, it’s time to start testing. Here is the first go:

A couple of the problems were easy to fix. A disconnected wire here, a broken wire there. In one case, removing and reinserting the SD card fixed the problem. The common wire had come off in one of the button LEDs.

I was able to get almost the entire blue side working.

There are still four not working on the red side.

That one on the upper right is interesting, because the LED is dark, but the LCD is lit up with no image. This behavior is consistent with an Arduino not being programmed. But I swapped it with another Arduino and that didn’t solve the problem.

Once I have eliminated all of the easy problems (specifically, wiring problems), it gets a little more tricky. I connected my Arduino Uno to one of the displays because the Uno can report error messages back to my PC.

The error messages were all that the filesystem on the SD card could not be opened. So now I’m regretting gluing the SD extenders into the backs of the LCDs. I may buy some fingernail polish remover to see if that connection is the problem.

Wiring the blue side

Since the wiring of the blue side of the control panel would move from right to left instead of left to right, I had to slightly alter the procedure. The biggest difference is that when measuring and cutting the wires that connect two boards, I needed both boards to be empty instead of just the downstream board. Then I soldered on the Arduino socket to the upstream board, and then measured, cut and soldered the LED/LCD wires for the upstream board.

One challenge of this altered procedure is that when I am soldering the Arduino socket to a board, that board is already attached to the previous boards.

I measured and cut the wires to connect boards 4 and 5 while board 4 was still empty, but I didn’t connect those two boards until 5-10 were done. So my approach to this side was:

  1. connect boards 1-4
  2. measure and cut wires for connecting boards 4 and 5
  3. connect boards 5-8
  4. connect board 9 to board 10
  5. connect board 8 to board 9
  6. connect board 4 to board 5
  7. connect board 1 to the relays

And here it is: The entire control panel with everything wired up and Arduinos plugged in. Next, I will do the continuity checks on the blue side, and then it’s time to fire up the emulator and test it out!

Some simple power consumption calculations (that I should have done a long time ago)

I knew that 20 AWG wire would be much more than adequate to handle the required amount of current for the LCD circuits. I went that large because I also wanted some structural enhancement after the stranded wires kept breaking. But I was curious to see just how much current those wires would be handling.

Each circuit board drives one 5V, 16MHz Arduino Pro Mini, one LCD, and one LED. The current draw of the LCD is 25 mA, according to Adafruit. The Arduino Pro Mini (5V) draws up to 26 mA when running the default “blink” sketch ( see https://www.arrow.com/en/research-and-events/articles/getting-started-with-the-arduino-pro-mini#:). It’s been long enough since I bought the arcade button kit that I don’t know the LED current draw, but the maximum current for a standard LED is 20 mA. So each board can potentially draw up to 71 mA. The largest current draw on the 20AWG wires will be on the segment between the relays and the first board, since that segment has to supply the current for all ten boards, or 710 mA. 20 AWG wire is rated for up to 3.5 A under continuous use. So, yeah, the wires I chose have a capacity of almost five times the current they will ever have to carry.

But I was surprised at how high the final number was. We’re approaching a full amp, and that’s just for one side. Granted, that is the maximum current that should ever be drawn, so games that don’t use all the buttons (and thus don’t light all of the LEDs and LCD backlights) will use less. Still, there is a potential for the LCD functionality to draw up to 1.42 A (710 mA per player), plus a little more to drive the coils of the relays.

I took a look at the power supply that I have been using for this circuit. Maximum output is 300mA. This led me to a question that I didn’t like: was inadequate power the only reason this didn’t work with the previous design? I quickly decided that I didn’t care about the answer to that question, because I like the new design so much better. Also, I immediately ordered a 3A power supply.

Continuity Checks

Before moving on to soldering the blue side of the control panel, I wanted to be sure the wiring and soldering was good on the red side. I performed the following checks:

First, measure to make sure that no two wires that go to the relay bank are connected to each other.

Second, make sure that each switched wire has connectivity to the appropriate Arduino pin socket. (I should have used a different color wire for the test lead – black is hard to see in this image)

Those tests passed. I was going to measure each of the LCD wires as well, but those are more fragile and difficult to reach in several spots, and I thought would risk breaking what I was trying to measure. So instead I will just insert the Arduinos, and test the whole system when all the soldering is done. Then if any displays don’t work, I can debug them individually.

So here is the right side with the wires connected back to the relay bank, and programmed Arduinos installed.

Red side finished

I have finished all the soldering for the red side of the control panel. Which means I am half way done. Here is a photo of the tenth board being connected to the previous three (and an illustration of why I didn’t want to connect boards 6 and 7 before these were done).

I decided not to connect boards 6 and 7 by going underneath as I have so far. This is because there’s not really a good path along the board between these two:

I would end up blocking access to an SD card or interfering with the SD extenders. So I decided to go over.

In the previous photo, the wires have been placed, but not soldered. I also did not make them all the same length, since they also have to cross over each other. This is because boards 7-10 are rotated 180 degrees from the others in order to keep the leads from the boards closer to the LCDs. So I started with the white wire for switch 7 and made each subsequent one slightly longer.

Soldering in progress:

One item I haven’t addressed is the negative power to the LEDs inside the buttons. I am still using the all-connected-together black wire that came with the controller kit

But the end of this needs to be connected to ground. Conveniently, board 10 has an extra ground connection since it has no downstream board.

Here are some photos of the red side all wired up.

For comparison, here’s what that side looked like with the old wiring approach:

Now I just need to do a bunch of continuity checks and insert the Arduinos.

More soldering – and a video

I thought it would be fun to make a time-lapse video of the procedure of wiring up a circuit board. So here is a video of me connecting board 7 to board 8. I mention in the video that it’s okay that board 7 is not yet connected to board 6 because of the space between them. What I did not mention in the reason I decided not to connect them yet. Boards 1-6 are all connected, and they form a large, somewhat awkward structure to work with. So my plan is to connect boards 7-10, and then connect 6 to 7.

The time-lapse portion of the video is 8 minutes and 36 seconds long. It was recorded at 3-1/3 fps, and it plays back at 30 fps (a 1:9 ratio), which means that the real-time equivalent is 77 minutes and 24 seconds. So it takes just under an hour and twenty minutes to wire up a board (when it has a close adjacent board – other spacings can take a little longer).

Note: A couple of posts ago, I started using numbers to refer to the circuit boards without explaining how I numbered them. They’re just numbered in the order they are wired, staring with the board closest to the relays. This is different from the button numbers that I used to organize the images for the displays.

Progress – Six boards wired

I finished wiring up the first four boards following the procedure I have described previously. Here is a shot of the underside of those four.

The next board was a little different, because it is not right next to its upstream board. It is also close to the edge of the control panel, so I sort of bundled the wires going along the edge because of that space restriction. Since these wires are not going under the downstream board, I soldered them in first. I didn’t take many photos during this part, but here is one of me soldering in the Arduino socket after the wires have been soldered.

And here it is installed. I have added the wires to the LCD here, and I am about to measure, cut and strip them.

For going from board 5 to 6, I wanted to use a similar approach as I did for 1-4, to get precise wire locations and lengths, since these two boards are relatively close to each other. Since I had already soldered on the Arduino sockets on board 5, I used a blank board for measuring the wires.

Because the wires between board 5 and board 6 are not just straight, I had to then bend the stripped parts 180 degrees, since they go under and not over the board. In other words, in the previous photo, all the stripped ends are pointing down, and I need them to point up.

Once I had all the leads bent in the correct direction, I placed them on board 5 and used a piece of electrical tape to hold them in place for soldering.

Here are some photos of the first six boards all installed and wired up to the LCDs and LEDs.

At some point, the yellow lead on board 1 broke off at the solder point. I added a short piece of soldi-core wire and soldered the lead to it. Here you can see it with a black piece of shrink wrapping (which still needs to be heated and shrunk).

Wiring the second LCD

As I said in the previous post, I should have soldered the LCD and LED wires to the second board before wiring it to the first board. I didn’t want to unsolder the board-to-board wires, but I also didn’t want to break them by bending them too much. So once I had measured, stripped and tinned the LCD wires, I made a gentle bend to expose the solder points.

And here are a couple of photos of the first two boards wired up and with Arduinos plugged in.

Some notes:

  • I had to disconnect the wires from the relay bank in order to continue.
  • Each time I need to solder wires to a new board, I need to pull the wires off of the LCD and LED for any boards that are connected to that board. For example, you can see in the photos above that in order to solder new wires to the second board, I had to disconnect the LCD and LED wires on the first board
  • The gray and white wires on the second board (the wires for DC and SDCS) are almost too short to make the connection. I’ll have to watch out for that as I progress.