Archive for November, 2022

Genesis controller to arcade game PCB

November 24, 2022

So, previously I added 6 button controller support to the arcade test rig with an arduino and some i2c IO expanders. That board dangled out the back and I actually busted it the other day when I was getting ready to replace it. Not a very sleek or robust solution. It’s not a difficult circuit so I laid it out on a board for ease of packaging.

I actually purchased a pcie to dual serial port board to get the bracket and connectors for this build. A few design consiferations:

  • I used a dip atmega328 because I have a bunch of those and don’t have other uses for them right now
  • I added an ISP header because I would have to blow fuses and a bootloader into this thing
  • I added a serial header so I could easily iterate programs on it if needed
  • I broke out all the IO expander pins even if I didn’t need them
  • Labels for the IO expander addresses, the bits of the ports, and their use in my software

This did not go completely perfectly though, I forgot the power and ground on the controller pinouts so I had to bodge those.

This is a functional board. I didn’t make it infinitely configurable, the strappings for the addresses are only set for two specific addresses and while you could bodge it for others I didn’t make it easy. I also have a mix of surface mount and through hole parts as is easier for me to populate (what I have in stock).

I installed the components mostly on the back side because the serial port connectors cover so much of the board I didn’t want to interfere with them (and it’s not like there’s other cards in this system anyway).

That’s it, it just works now. I have fixed the board layout in my github but haven’t regenerated gerbers. I have 4 of these boards to spare if anyone wants one for any reason. You could adapt them for use as any sort of buttons that need grounding, but I really can’t think of use cases for that. It could be a dual IO expander board with GPIO on pinheaders, or for serial communication (you get 32 via i2c, 14 from the arduino directly, and serial on an ftdi header.

Atmega16 breakout board

November 23, 2022

I’ve really got to get back into writing up some projects, many PCBs made, but very little to show for documentation on them. This one’s rather simple. I had a pile of Atmega16 chips and nothing to do with them. I could have hand-wired them each into individual projects, each with specific crystals chosen for their application and programmed each one out of circuit. That would have been cheaper, but in reality it means I would never get around to using them at all. I needed something to make them easy to use and prototype with, maybe do up a custom board for a final application, maybe just solder in the breakout board and be done with it.

This is what I came up with. That is a thinly veiled euphemism for ‘completely ripped off the design’ but I did make some key changes to make my life easier. The original design comes from MightyCore, a port of arduino to these atmega processors. They have a bunch of documentation, most of it applies here. I customized this layout in a number of ways though:

  • The pot changed to a multi-turn
  • the large capacitors became electrolytic (I had those as salvage)
  • silkscreen simplified for this one processor
  • headers got more detailed labels
  • changed LED buffer to something I had
  • moved usb uart offboard
  • optional power from ftdi
  • split off avcc

The strange NLV17SZ17DFT2G buffer I’m using for the LED is to not load down that pin, it almost assuredly doesn’t matter but I had the parts from an electronics goldmine order so I used them. I also include a solder jumper if those parts are not available.

My intention for the potentiometer is to have the ability to set the AREF if needed, similarly the ability to run the AVCC from a different voltage is available (but I don’t honestly expect anyone will need that very often).

I have had issues in the past where a board draws too much power from usb and causes issues, that’s why I have the ability to split the power from the ftdi connector and leave that only for communication. Tou will have to either feed the 3.3 or 5 volt rails directly in that case or power it with a barrel jack (the original labels this vin, I’m realistic and know it’s gonna be used with 12v).

These boards can be programmed with a regular ISP, there’s JTAG available as well, but if you want to do things easily then use the mightycore bootloader and program them with the arduino IDE. They have a bunch of IO pins and 5v level logic so there’s a bunch of things they’re still good for. My board designs are available on github, or you can e-mail me and ask for one (I have more than I need).