Best way to proceed with Arduino Due Joystick project

So I made a joystick with an Arduino Due. And it works pretty well on USB. However, I also wanted to expand this to support SNES and Genesis, and I've run into some problems here.

The main issue is that Genesis and SNES are both 5V machines, while the Due is 3.3. I bought some line level converters from Adafruit, but I'm having some weird issues with the 8 channel one I wanted to use for the Genesis. It seems to be only putting out about 2 V on the high (VCCB) side instead of the desired voltage, although it does respond per the logic on the low side. Although I'm not the world's greatest solderer, I'm pretty sure that the pins on the reverse are all making contact with the board, and there are no shorts. So I'm not sure if the Genesis (and/or Ardunio's 5V pin when using USB cable) just aren't supplying enough voltage for what I want to do, or if I damaged the board somehow.

Here's a photo of this part of the setup for reference:

Note that the pic is slightly old, as I wasn't connecting the output enable pin. I've fixed that problem after I took the picture.

Here's the full album for reference:
https://plus.google.com/u/0/photos/114287335677693389173/albums/6136902247702077873

So now I'm not sure how to proceed. I've more or less written off the chip, unless someone has any suggestions. however, I also realize that the 3 button Genesis controller is a super controller, so I can implement that with just a MUX and some pull up resistors if I want to forego 6 button support.

However, with that solution, I would also be exposing the Arduino due's pins to 5V directly. Granted, I would not be powering the Arduino on at all when connected to a Genesis, but would this still cause damage to the board? Is there a recommended way I could protect the board without adding too much complexity? I'm running a bit short of room in my case.

The second option is to replace the Arduino Due with a Leonardo. I THINK I have the exact number of IO I need on a Leondardo (4 directions, 8 buttons, 7 Genesis data lines and the SNES latch signal), but it leaves me no margin. My plan for the SNES would be to use the SPI lines; if that isn't viable and I need to bit-bang it, I would need two more data lines. I'm also not sure about the USB device profile for the Leonardo. Since the Due has a dedicated programming port, I was able to completely disable the serial profile from the USB native port. Since this wouldn't really be an option with the one-port Leonardo, I'm not sure if Windows would still let me use the HID portion of the device without specifying a driver for the serial port part.

Any thoughts or other suggestions?

Hi,
What line level converters did you buy?
Have they got open collector outputs, that is do they need pullup collector resistors.

Tom.... :slight_smile:

This is the one I was having problems with:

This is the one I bought for the SNES interface, which I have not tried yet:

Hi
If you read the documentation from the adafruit site, Vccb is not an output, it is the voltage supply that you have to provide for it to the B output switches.
Also have you got the gnds connected?

Tom... :slight_smile:

I realize that. I was using VCCB to indicate which side was which.

5 V (input from Sega Genesis) is connected to VCCB, and is also powering my board direct to 5V line (bottom yellow wire in the photo, which is slightly obscured). Not an official solution, but that part works fine.

3.3 V output from my board (top yellow wire) is connected to VCCA.

GND is connected to the board's ground (orange wire), and also the input ground from the Genesis.

OE is connected to 3.3V (connected after photo was taken). I also tried GND just to see.

I have confirmed with my multimeter that both VCCB and VCCA pins have the correct voltage, and the input pin on the A side (e.g. A0) is properly sequencing between 0 and 3.3 V based on my joystick position.

However, the B-side pin (e.g. B0) is toggling between ~2V and 0, not the expected 5V and 0, despite the board getting 5V on the VCCB pin.

I hope that clears things up.

If anyone is curious, I decided to grab an Arduino Leonardo and a MUX instead. I already did a quick test and Windows is fine to enumerate a USB HID for the Leonardo even if it can't recognize the serial port.

That said, when I went to test it with the Genesis, the Gensis 'select' line appears to stop toggling when the Arduino is drawing power from the port. It doesn't seem to draw very much (~30 mA), but does seem to pull the voltage down slightly (4.8 V to 4.7 V), so maybe this is causing problems on the Genesis side. As soon as I disconnect the input from 5V; the select line starts toggling again (observed via LED). It's not related to the INPUT settings on the port I'm using, because disconnecting the port for the 'Select' line has no effect.

So I guess I do need to implement it using a MUX after all, and avoid using the Arduino for the Genesis implementation. At least the Leonardo has given me more room to add a (larger) breadboard to my case, and shouldn't be damaged by 5V logic. Hopefully I don't run into similar problems with the SNES, because I most certainly need a microcontroller for that interface.