Question Swapping a Gameboy D-Pad with a 3DS Slider?

Joined
May 6, 2020
Messages
10
Likes
7
Using the LM339, how would this be achieved?
In my head:
X+ goes to 5, 7.
Y+ to 9, 11.
VCC to 3
GND to 12
1, 2, 13, 14 goes to Up, Down, Left, Right on the Gameboy Board

Which leaves the inverting inputs (4, 6, 8, 10)

What would be connected to these? Would they get resistors going to GND since the slider operates on voltage?
 

cheese

the tallest memer in town
Staff member
.
.
.
Joined
Mar 2, 2016
Messages
2,758
Likes
2,422
Location
Florida
VCC to 3, GND to 12, X to 5 and 6, Y to 9 and 10.

For going down and left, you want to check the stick is below a certain voltage instead of above, so you would need to swap the inverting and noninverting input. Then you would need to make 2 voltage dividers to get the voltages you would want for up/down and left/right. Something like 1/4 VCC and 3/4 VCC would probably be good. You'll also need a NPN transistor for each button (since when you press a button it is pulled to ground), that is shown in the bottom right. Here is an example (L/H=low/high output from the voltage dividers, I was running out of room :P):

stick_to_button.png
 
Joined
May 6, 2020
Messages
10
Likes
7
Thanks for this. It's a lot to take in but I understand it at least.

So I'd be looking at trying to get 1.2v on the low side and 3.7 on the high side. If the voltage being supplied to the slider is already 3.8v (max), would I even need a resistor on the high side?

I ask because what I'm (attempting) to do this on is a Gameboy Pocket running off a DSi Battery which ends up with a max of 3.87v.
 

cheese

the tallest memer in town
Staff member
.
.
.
Joined
Mar 2, 2016
Messages
2,758
Likes
2,422
Location
Florida
Yes you need the resistors as I drew them, those voltage numbers you calculated are wrong, vcc in your case would be the voltage the system is running on, it's not always a fixed 5v.
 
Joined
May 6, 2020
Messages
10
Likes
7
Alright. Thanks for that info. I've got a big resistor pack coming in next week along with the slider. Just gotta get an LM339 now. Thanks for your help, Cheese!
 
Top