[Done] Salami's 1st GBZ Modded-HDMI UART Shift-Buttons Brightness Control

Show off your completed Game Boy Zero, or post your build logs here!
salami738
Posts: 128
Joined: Sat Sep 09, 2017 6:06 am
Location: Germany
Has thanked: 60 times
Been thanked: 37 times

Re: [WIP] Salami's 1st GBZ HDMI I2C Shift-Button Brightness Control

Post by salami738 » Fri Nov 17, 2017 2:48 am

vnman wrote:
Fri Nov 17, 2017 2:07 am
One question - How do you intend to reduce/increase volume if using headphones?
I will send special commands (example: Shift+Button Up) from the arduino via I2C to the raspberry.
Then i use a script on the raspberry to change volume with the linux mixer.


My solution has the following advantages:
- Stereo sound on the headphones
- Correct mixing of Stereo to Mono for the loudspeaker
- You can add a MOSFET between headphone jack switch and amplifier power in, so you dont have to power the amplifier, if you use headphones
- You don't need a pot, you can add resistors instead, so the headphone output can have the same loudness as the speaker

BUT also has its disadvantages:
- Changing of headphone volume needs the linux mixer
- You need an arduino leonardo or switches for vol+ and vol- connected to the raspberry
- More software needed


A perfect solution would be to use a linear amplifier, then you can connect L- and R- together (no BTL one, like the PAM8403).

codeman0624
Posts: 109
Joined: Wed Nov 23, 2016 10:19 am
Has thanked: 3 times
Been thanked: 74 times

Re: [WIP] Salami's 1st GBZ HDMI I2C Shift-Button Brightness Control

Post by codeman0624 » Fri Nov 17, 2017 5:51 am

salami738 wrote:
Thu Nov 16, 2017 12:21 pm

I uploaded an image for you: Image.

The important part is not to use the ampifier for the headphones, and you dont need that, because the display can drive headphones.
The amplifier is only needed for the loudspeaker. And because the loudspeaker needs mono, i mixed the stereo signal with the 10k resistors.

Did you actually use this exact schematic? I'd be curious if it worked. It looks like the datasheet for the PAM8403 recommends DC blocking capacitors on the inputs. And sometimes headphone jack outputs (like out of the HDMI screen) are biased around a DC voltage, rather than around ground. I don't know any of this for a certainty, just something to keep in mind if it doesn't end up performing well or giving you good sound. You could potentially replace the 10k resistors with something like 10uF capacitors and see what it does.

User avatar
vnman
Posts: 147
Joined: Tue Jun 21, 2016 5:21 am
Has thanked: 5 times
Been thanked: 34 times

Re: [WIP] Salami's 1st GBZ HDMI I2C Shift-Button Brightness Control

Post by vnman » Fri Nov 17, 2017 6:49 am

I was thinking of turning the AMP from speaker amp to headphones amp and use the headphones jack with switch to turn off the speaker when headphones plugged in. This way you can have stereo speakers, the 1W tablet speakers.

OR do the headphones pass through, connect the speakers direct to the AMP output to have stereo and utilize the MUTE on the amp to turn off the speakers (or use SHDN to shutdown the amp) when you want to use headphones. I would have thought that you do not have the need to adjust volume on the headphones once you have the volume level the way you want, I do not adjust volume on my headphones when I listen to music on my mobile phone.

salami738
Posts: 128
Joined: Sat Sep 09, 2017 6:06 am
Location: Germany
Has thanked: 60 times
Been thanked: 37 times

Re: [WIP] Salami's 1st GBZ HDMI I2C Shift-Button Brightness Control

Post by salami738 » Fri Nov 17, 2017 9:03 am

vnman wrote:
Fri Nov 17, 2017 6:49 am
I was thinking of turning the AMP from speaker amp to headphones amp and use the headphones jack with switch to turn off the speaker when headphones plugged in. This way you can have stereo speakers, the 1W tablet speakers.

OR do the headphones pass through, connect the speakers direct to the AMP output to have stereo and utilize the MUTE on the amp to turn off the speakers (or use SHDN to shutdown the amp) when you want to use headphones. I would have thought that you do not have the need to adjust volume on the headphones once you have the volume level the way you want, I do not adjust volume on my headphones when I listen to music on my mobile phone.
Maybe you can use this list of articles about using PAM8403 as a headphone amp:
- http://chromo.cc/crate/crate-sound-headphone-amplifier
- https://electronics.stackexchange.com/q ... dphone-amp

But none of them gave me an exact solution for headphone-switching-jack plus speaker. So i tested my own (diagram in the photo), and it works fine.

salami738
Posts: 128
Joined: Sat Sep 09, 2017 6:06 am
Location: Germany
Has thanked: 60 times
Been thanked: 37 times

Re: [WIP] Salami's 1st GBZ HDMI I2C Shift-Button Brightness Control

Post by salami738 » Wed Dec 06, 2017 1:56 pm

Today i fixed most of the high energy usage issue of the display.
Content is in: viewtopic.php?f=44&t=4242#p51445

I am very happy with that. Gives me a 25% bonus on battery runtime. Had 3hours (with 4800mAh battery from Galays S2) before.

chaosratt
Posts: 123
Joined: Sat Aug 20, 2016 7:36 pm
Has thanked: 12 times
Been thanked: 33 times

Re: [WIP] Salami's 1st GBZ HDMI I2C Shift-Button Brightness Control

Post by chaosratt » Wed Dec 06, 2017 10:20 pm

So what are your new consumption levels?

salami738
Posts: 128
Joined: Sat Sep 09, 2017 6:06 am
Location: Germany
Has thanked: 60 times
Been thanked: 37 times

Re: [WIP] Salami's 1st GBZ HDMI I2C Shift-Button Brightness Control

Post by salami738 » Fri Dec 08, 2017 1:21 am

chaosratt wrote:
Wed Dec 06, 2017 10:20 pm
So what are your new consumption levels?
Measuring equipment / components used:
- Raspberry PI Zero W
- PAM8403
- Arduino Leonardo Clone
- Uni-T UT139C multimeter
- HDMI screen from KUMAN/Amazon at 80% brightness

Before the HDMI display mod:
In game: 3,7 to 3,9W (depending on battery voltage - banggood power boost is not very efficient at low battery voltages)

After the HDMI display mod (1.8V regulator replaced):
Emulationstation: 720mA at 4,2V battery voltage = 3,024W
CPU full load: 860mA at 4,2V battery voltage = 3,612W
In game: depends on the games cpu load (between the two values).
-> average: 20% savings

After the HDMI display mod (1.8V and 3.3V regulator replaced):
Emulationstation: 670mA at 4,2V battery voltage = 2,814W
CPU full load: 800mA at 4,2V battery voltage = 3,360W
In game: depends on the games cpu load (between the two values).
-> average: 25% savings

User avatar
fdeluxe
Posts: 71
Joined: Tue Aug 23, 2016 10:16 am
Has thanked: 12 times
Been thanked: 27 times
Contact:

Re: [WIP] Salami's 1st GBZ Modded-HDMI I2C Shift-Button Brightness Control

Post by fdeluxe » Thu Dec 14, 2017 3:27 pm

Wich HDMI screen do you use? I have a kedei screen but I havent noticed an way to adjust brightness.

salami738
Posts: 128
Joined: Sat Sep 09, 2017 6:06 am
Location: Germany
Has thanked: 60 times
Been thanked: 37 times

Re: [WIP] Salami's 1st GBZ Modded-HDMI I2C Shift-Button Brightness Control

Post by salami738 » Fri Dec 15, 2017 2:06 pm

fdeluxe wrote:
Thu Dec 14, 2017 3:27 pm
Wich HDMI screen do you use? I have a kedei screen but I havent noticed an way to adjust brightness.
Hi, we are currently reverse engineering a similar display in: viewtopic.php?f=44&t=4242. Another user already asked about the backlight on the Kedei without backlight button. Atm we need more time to figure out, how the backlight driver works. Can you start a new thread with pictures of your display, where we can see the chip numbers?

User avatar
LilJosh
Posts: 9
Joined: Thu May 19, 2016 10:57 pm
Has thanked: 1 time
Been thanked: 1 time

Re: [WIP] Salami's 1st GBZ Modded-HDMI I2C Shift-Button Brightness Control

Post by LilJosh » Thu Jan 04, 2018 2:32 am

@salami738
Any tips on how to get the screen to fit correctly into the case? I just started my build and have been having issues with screen clearance even after cutting pcb. Also Very nice build so far! :D

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest