would a headphone socket with integral switch contact be suitable for this? When the headphones are plugged in they become the only audio output, when un-plugged the internal speakers are used.therobopro wrote:OK. So I have been working on a GameBoy pi with my broken DMG- 001. I am almost done with my plans but I need help. I have been trying to get a audio configuration to work, I want to be able to have internal speakers AND headphones. I have a MAX 98306. Please help and POST COMMENTS PEOPLE!
therobopro wrote:I could be able to if I knew how to wire them. I was thinking of re using a gameboy one. The wires are left, right, GND, and bridged GND. Still working out bugs, but thank you!
However, that means you cannot bridge R and L together, so don't try to connect ROUT to LOUT, it will damage the amp!
You could use this as a mono amp, just driving both headphones from one channel of the audio output.BMS Doug wrote:therobopro wrote:I could be able to if I knew how to wire them. I was thinking of re using a gameboy one. The wires are left, right, GND, and bridged GND. Still working out bugs, but thank you!
Umm, just re-read the Max 98306 learning materials and I don't think it can be used to drive headphones.
However, that means you cannot bridge R and L together, so don't try to connect ROUT to LOUT, it will damage the amp!
That is amazingDjinny wrote:I'm doing the exact same thing as the OP, if you salvage the original headphone jack, you can use it. it has an integral switch in it, meaning you plug the headphones in, and it would cut the ground going to the audio amp's speaker.
The switch is for the ground. So i've not tested it yet, but since the audio amp shares a common ground with the rest of the pi, i don't know if the audio's ground is the same.
If so, this won't work, and you'd need to find a switch that latches between the left or right speaker, and not the ground
I've included a little mockup of the dmg headphone jack, looking from the pcb side. It's just a quick mockup, but you can probably salvage yours the same way i did.. with a pair of wire snips.
I'm using these for my audio amps, you'll need to put a potemeter between the pi and the audio jack.
http://www.ebay.com/itm/371222637117
So the audio goes from the pi -> pot -> headphone jack -> audio amp -> speaker
where the right or left audio positive goes to the audio amp, and the audio amp's audio-ground goes to the Groundswitch listed in the picture.
PS: I'm also putting a pi2 in an original gameboy, with 640x480 3.5" screen, ps Vita joystick, and a bunch of extra buttons.
Keep in mind, if you want to make everything fit, you'd have to desolder a lot of stuff. i sure did. o_o
Wow!!! Long post is right, but I thank you for doing it with lots of info.Djinny wrote:Long post, with lots of Links. When people ask me for help, i don't just link to other threads, I give all the infos. (I saw someone answer someone by linking to another thread.. but they linked to another post which actually linked to another post. This is not what we should expect from the famed raspberry pi community, we can do better, I will do better.)
I'm using the Teensy 2.0 arduino. Which will give me 23 buttons and 2 analog channels (1 joystick)
I had asked multiple times for help with using the mk_arcade gpio thing, but no one was able(willing) to help me. Here's my Teensy 2.0 code.
Which uses the arduino IDE. Just follow their directions, upload the code, and do some basic testing. It can be adapted to use more analog sticks in place of buttons.
I was going to use the exact same ADC too, but decided to go the teensy route and save myself the hassle.
Here's some of what i got so far. I'll add more pictures regularly and will likely put a full post here on the forums once i'm done.
http://imgur.com/a/lhY1x
Using an expensive 3.5" 640x480 LCD and an hdmi to vga adapter. I'll be done with the whole project in a couple days.
I would suggest using a psp 1000 slide-joystick instead. it doesn't tilt, but it does slide around, and they are fairly flat, and can fit inbetween the AB/Dpad buttons. Right above start select.
A PSP 1000 joystick will be WAY easier to install, 4 wires, big fat pads to solder to.
I desoldered almost all the headers on the pi2, except the usb power, since that is a non issue. You can see how little it gets. I then soldered 30awg kynar wire for the hdmi (commonly referred to as Mod Wire). I messed up the Camera header desolder, got frustrated and ripped off a few pads.
No matter how hot i got it, the solder refused to melt.
If you do use the ps Vita joystick, this will help, you can get some free connector samples from molex.com
If you get some 6pin/0.5mm pitch FPC headers from molex (if you need part numbers, let me know)
you can solder the headers to a Breakout Board.
If i ever use another vita joystick in a build, i'm SOOO going for the breakout boards, i handsoldered the connector to a small piece of flex cable from another scrap salvage, i ended up missing a +v pin, but just soldered the 3 pins together on the ps Vita joystick. They need to be linked anyways so it worked.
Keep in mind, Soldering to the hdmi, or even to some 6 pin connectors for a PS vita joystick.. is not easy, it's 0.5mm pitch width, Which is VERY hard to hand solder to.
I decided to use http://store.kitsch-bent.com/product/co ... button-pcb
but i could have went with the original board snipped down. But i wanted cleaner contacts for better controls.
I went with the expensive LCD, which cost $111, because i wanted 640x480, not some blurry 320x240. I made an offer of $111, to match another seller's price, since i wanted to buy from this seller specifically. They packed it really well.
I decided not to use the original gameboy's audio jack, and i'm using one i salvaged off an old laptop motherboard. The gameboy has a groundswitch, which may cause issues, and i don't want to risk it, so i'm using the laptops, with uses a left-channel switch instead. so the ground will be active, but it'll cut the audio to the left channel.
I'm going to use a 4000mAh 3.7v lipo, and a 500mAh charger and 1A* boost converter. The converter is rated for 1A but adafruit says it had no trouble going up to 2A.
I would strongly suggest using a 1A charger. I'll likely upgrade in the future. Alternative: Fancier 1A charger, not sure what makes it better. At 500mA charge rate, my battery took too long to charge.
Using a PSP 1000's speaker. It's the size of a dime, which is nothing, and it should get loud enough with a good resonance shroud.
Buttons i'll be using connected to the teensy.
4:Dpad
2: A/B
4: C-up/left-right-down(n64)
2:Start/select
4: Quick save, quick load, Menu, and Esc(exit emulator.)
4:Left trigger, RT, Z(n64), Turbo toggle,
1 Joystick(2 analog channels)
That's why i'm going with the teensy 2.0, which cost about $20 shipped. LOTs of buttons, and built in ADCs, connect it to the pi with USB, and it'll register as a usb gamepad. (i've already confirmed it working)
Tips: When working with FPC/Flex cables, use some wide clear packing tape, and Ghetto-laminate the flex cables. Just up to the connector. The flex cable on the LCD i linked, as well as the one on the PS Vita joystick are both incredibly fragile, so put tape on both sides and CAREFULLY trim it so it's about 3-4mm off the edge of the flex cable. This will make them considerably stronger since they can tear so easily. This also works for nintendo DS flex cables, which are fragile like tracing paper.
To solder the 6pin ps vita connector to the breakout board, use a hot air rework tool and Kapton tape (special tape that can withstand up to 400c)
Wow you quoted my whole post. XD a -snip- might be in order.therobopro wrote: Wow!!! Long post is right, but I thank you for doing it with lots of info.Anyway that battery looks promising! Its dimensions are 3.740" x 2.204" so it is small enough. What I will be doing is making a custom PCB with these buttons.
http://m.ebay.com/itm/PKG15-Tactile-Pus ... 0659489028
I want to have a common GND for it because I will be using a raspberry pi GPIO header for my inputs. The screen you have is awesome but unfortunately I am on a budget build, and do not have the money, but WOW that screen is SHARP.![]()
Thanks for your help!! And keep posting comments guys!!!
P.S if you have zl and zr you can play PS1 on your portable. I think one more button is worth it!
Hmm. I was wondering where to solder the wire to the start/ select, I was going to salvage them since there is no way to make the same buttons with tactile switches. Since I am only emulating up to SNES, is there a way to combine two gameboy PCBs to make ABXY? I still have the original gameboy PCB from when I took it out of the DMG-001 case. Maybe I could attach A and B to a common ground button PCB from kitsch, and have l and r separate. What do you think? Also thanks for your help. Keep on submitting comments everyone!!!Djinny wrote: Wow you quoted my whole post. XD a -snip- might be in order.
The Turbo button will be opposite of the Z button, which will be configured in the emulator, since PS1 isn't the smoothest to emulate, it won't be receiving turbo, and will instead act as the R2(ZR).
Oh, it isn't the easiest, but you can use the original gameboy's front motherboard, score it, and snap it down to size and use it as a common ground board.
AB buttons, http://i.imgur.com/ZvcO1fc.jpg
Dpad and St/Sl, http://i.imgur.com/smSvCJ9.jpg http://i.imgur.com/gkWTCh0.jpg
It isn't pretty, but it works, if you keep the whole thing connected it'll work, just use a razor to snip and rip of unwanted traces. 30awg kynar/mod wire is a must have for this.
I just wanted the pretty black Common ground board i linked earlier. Controls are super important, so they have to be responsive and quick. Using the gameboy's original dpad and AB buttons are kind of important.
Alright if you look at the huge image of the AB board i snipped. At the bottom there's the blue wire (blue wires are ground for my project)therobopro wrote:Hmm. I was wondering where to solder the wire to the start/ select, I was going to salvage them since there is no way to make the same buttons with tactile switches. Since I am only emulating up to SNES, is there a way to combine two gameboy PCBs to make ABXY? I still have the original gameboy PCB from when I took it out of the DMG-001 case. Maybe I could attach A and B to a common ground button PCB from kitsch, and have l and r separate. What do you think? Also thanks for your help. Keep on submitting comments everyone!!!
Left and Right audio, Left is white i believe. Since it uses a common ground. Sadly i don't think you'll be able to use the integral switch of the original gameboy's headphone jack since it's a ground switch, and you'd want a Left-switch.therobopro wrote:OK. So I forgot to ask you, on the audio wiring diagram from here http://www.xodustech.com/projects/raspb ... boy-pocket what are the white and red wires that connect to the pi audio and where to put them on the pi 2. Thanks for your help and keep posting comments!
Can you show me a list of the components that you used for your audio and the points that you soldered on the rpiDjinny wrote:Left and Right audio, Left is white i believe. Since it uses a common ground. Sadly i don't think you'll be able to use the integral switch of the original gameboy's headphone jack since it's a ground switch, and you'd want a Left-switch.therobopro wrote:OK. So I forgot to ask you, on the audio wiring diagram from here http://www.xodustech.com/projects/raspb ... boy-pocket what are the white and red wires that connect to the pi audio and where to put them on the pi 2. Thanks for your help and keep posting comments!
I don't have a 3D printer, i just "finished" my build. I still have a lot of tweaking.
(sry again but i need to ask this lol) but even with the FPC connector, what's the best way to wire this to the Rpi's GPIO? just straight solder the end of the connector to a female connector on the Pi's end?but i'd suggest using a flex ribbon cable connector, get the number of pins, and the pitch width (distance between pins) and either get the connector from either ebay, or molex.com or something.
That way you can disconnect the pi from the game pad without needing to desolder anything.