David's #1 Gameboy (Pi3, Dual analog, Neopixel)[Update#3 Animated Neopixel charge status]

Show off your completed Game Boy Zero, or post your build logs here!
User avatar
dbak85
Posts: 40
Joined: Thu Mar 09, 2017 2:04 am
Has thanked: 14 times
Been thanked: 19 times

David's #1 Gameboy (Pi3, Dual analog, Neopixel)[Update#3 Animated Neopixel charge status]

Post by dbak85 » Mon May 08, 2017 4:35 am

Hi,

I just Thought I would share my project that is almost done. This is my first attempt at a Gameboy (Although I have some experience with electronics and 'Modding'). My first requirements for the project would be that I could play n64 and Psx games as these are the games I grew up with and the ones that left the most impression on me as a young'un. This of course meant a Pi3 was necessary.


Parts / Features:
Pi 3
Dual Psp Analog sticks
Teensy usb controller
@Camble's auto shutdown switch
Powerboost 1000c
Sparkfun amplifier with volume control and headphone jack
Neopixel status led (for some colour and animations :D)

I started this project in an unusual way, normally you would buy everything and make it fit. I started with the shell, then added buttons and built from there, improvising as I went (Don't do this kids). It turned out pretty well all things considered.

It begins :
begins.jpg
begins.jpg (80.79 KiB) Viewed 12066 times
The first thing I wanted is to add a black cartridge. I had already decided that I needed a black one to fit the yellow theme of the case.
I found a really cheap game on Ebay (Ridge Racers I think). I tried to save the game, but the screw got suck (Rusted from storage) so I had to pry it open and the pcb did not survive. :cry: . Ah well it was for a good cause.
cart.jpg
cart.jpg (53.26 KiB) Viewed 12066 times
I picked a few templates online and created a custom cartridge sticker that I added to give a more custom feel and then stuck it in place with some glue and ground out the back of the cartridge with a Dremel to give me that extra space in the shell for all the components.
cart-in.jpg
cart-in.jpg (60.55 KiB) Viewed 12066 times
cart-in2.jpg
cart-in2.jpg (73.28 KiB) Viewed 12066 times
Next it was time to do the buttons. I drafted up a shape in AI, printed it out and the stuck it between 2 sheets of plastic (Sort of laminating it) and then proceeded to cut out the shape and start on the holes to recess the push buttons that I had ordered of the web.
I also added the Psp joysticks at this stage.
template.jpg
template.jpg (157.17 KiB) Viewed 12066 times
template2.jpg
template2.jpg (231.75 KiB) Viewed 12066 times
buttons.jpg
buttons.jpg (56.63 KiB) Viewed 12066 times

This was a time consuming process and took me a lot of refining and adjusting to get to fit properly.

Next up, the screen, and starting to build up the position of the components, the teensy 3.2 and the Powerboost 1000c (which is lined up to the contrast port on the shell). I also cut out the screen in a square shape, as I was not a big fan of the rounded cutout in the right corner.
I added the Sparkfun mono amp (It has a lot of line filtering with caps and there is no noise at all)
buildingup.jpg
buildingup.jpg (95.67 KiB) Viewed 12066 times
buildingup2.jpg
buildingup2.jpg (92.22 KiB) Viewed 12066 times
buildingup3.jpg
buildingup3.jpg (90.13 KiB) Viewed 12066 times
Last edited by dbak85 on Wed Jun 07, 2017 7:28 am, edited 5 times in total.

User avatar
dbak85
Posts: 40
Joined: Thu Mar 09, 2017 2:04 am
Has thanked: 14 times
Been thanked: 19 times

David's #1 Gameboy (pi3)

Post by dbak85 » Mon May 08, 2017 4:39 am

By this time, I was pretty sure I could fit a pi3 in there so I ordered one and got to work removing the tallest components, the usb ports and the network port. I only trimmed the Gpio pins as there was plenty of space to accommodate them, and the less you de-solder the less you are likely to damage things right?
desolder.jpg
desolder.jpg (88.75 KiB) Viewed 12064 times
pi.jpg
pi.jpg (205.21 KiB) Viewed 12064 times
Some testing also revealed that the Pi was getting very hot, after checking the space I saw that a solid copper heatsink would fit just nice. I added it and cut out a small vent in the top of the cartridge to let the air escape.
I also added an external usb port. very useful for testing.
heatsink.jpg
heatsink.jpg (211.96 KiB) Viewed 12064 times
vent.jpg
vent.jpg (64.05 KiB) Viewed 12064 times
Then It happened! The screen I was using had a solder points along the ribbon cable and folding the cable broke the power connector to the led backlight. I tried to repair it, but I do not have the necessary skills.
So I had to buy another one. and restart the mounting of all the components. I was also having a lot of trouble to get my custom button board to fit with the case on. so I scrapped that too and went for a cheap button PCB off ebay. It did not have the nice clicky feel of the momentary push buttons, but it worked and fit.
Added a 1w speaker and a Sparkfun switching headphone jack(things went quickly here so not so many pictures :( ).
I added a pot to control the volume and a neopixel in the power jack area with a capacitor according to adafruit recommendations.
Camble's Diy shutdown switch also found it's way into the case in the middle top of the front shell, with wires going to the switch on the other side
newparts.jpg
newparts.jpg (90.56 KiB) Viewed 12064 times
inside.jpg
inside.jpg (1.83 MiB) Viewed 12064 times
finished_front.jpg
finished_front.jpg (72.09 KiB) Viewed 12064 times
And voila! Finally done. I still have a few things to sort out.
For now the Neopixel only shows 'ON' and 'LOWBAT' status. I am investigating how to tap into the Powerboost to get logic signals for 'CHARGING' and 'CHARGED' states.

On state:
on.jpg
on.jpg (1.5 MiB) Viewed 12058 times
Low batt state (It is actually a sort of red with some purple to look nicer, the camera does not like the Teensy/Neopixel refresh rate):
lowbat.jpg
lowbat.jpg (1.52 MiB) Viewed 12058 times
I also messed up the batteries as I bought 3 lipo cells and connected them in parallel for a 3600mah battery, but In my haste to get batteries in, I had not done my research properly and it turns out you cannot charge lipos correctly in that configuration.
So the next step is to get a correct sized cell that will fit. I am looking at a 4400mah battery but I need to do a lot of measuring/ testing.

Thanks for reading!
Last edited by dbak85 on Mon May 08, 2017 6:40 am, edited 1 time in total.

User avatar
abrugsch
Posts: 971
Joined: Tue Aug 02, 2016 10:00 am
Has thanked: 356 times
Been thanked: 430 times
Contact:

Re: David's #1 Gameboy (pi3)

Post by abrugsch » Mon May 08, 2017 5:50 am

dbak85 wrote:
Mon May 08, 2017 4:35 am
Neopixel status led (for some colour and animations :D)
you had me at neopixel ;)
How are you controlling it? (I saw a line relating to the teensy but how are you connecting events to the update of the pixel colour? )

User avatar
dbak85
Posts: 40
Joined: Thu Mar 09, 2017 2:04 am
Has thanked: 14 times
Been thanked: 19 times

Re: David's #1 Gameboy (pi3)

Post by dbak85 » Mon May 08, 2017 6:23 am

abrugsch wrote:
Mon May 08, 2017 5:50 am
you had me at neopixel ;)
How are you controlling it? (I saw a line relating to the teensy but how are you connecting events to the update of the pixel colour? )
First of all I am using the <Adafruit_NeoPixel.h> library to control the Neopixel. This outputs on pin 25

Then I am using a modified version of Camble's power monitor script that sends GPIO logic to the teensy.

In the main loop I send the pi on state to the teensy

Code: Select all

	GPIO.output(onstateGPIO,True)
Then in the lowbatt loop in the power monitor:

Code: Select all

#If the LED is a solid for more than 10% of the timeout, we know that the battery is getting low.  Launch the Low Battery alert.
if bounceSample > int(round(batteryTimeout / sampleRate * 0.1)):
   	 #Send low batt signal to teensy
   	 GPIO.output(lowbatteryGPIO,True)
The Teensy code is like so:

Code: Select all

if (digitalRead(pipower) == HIGH){
          setLed(255,120,0,8);

        if (digitalRead(lowbatt) == HIGH){
          setLed(255,50,50,8);
        }


        setHat();
        setButtons();
        setJoystick();  
        Joystick.send_now();
        delay(10);
} else {
	//Handle off but charging states here
}

User avatar
abrugsch
Posts: 971
Joined: Tue Aug 02, 2016 10:00 am
Has thanked: 356 times
Been thanked: 430 times
Contact:

Re: David's #1 Gameboy (pi3)

Post by abrugsch » Mon May 08, 2017 7:35 am

cool!
I love using neopixels (I made a giant Chinese paper lampshade into a BB-8 for my son and made blinky lights for the head using an arduino and neopixels and one halloween I made a jellyfish out of a transparent umbrella filled with strips of bubble wrap - lit up the tentacles and 'head' with pulsing neopixels :D ) and want to use them in my GB Pi. I think I definitely will now if I go the teensy route. never used the RPi library for them so I suppose that's another possibility too...

User avatar
dbak85
Posts: 40
Joined: Thu Mar 09, 2017 2:04 am
Has thanked: 14 times
Been thanked: 19 times

Re: David's #1 Gameboy (pi3)

Post by dbak85 » Mon May 08, 2017 8:10 am

abrugsch wrote:
Mon May 08, 2017 7:35 am
... and want to use them in my GB Pi. I think I definitely will now if I go the teensy route.
A note about these (I am using the 5mm through hole versions). There seems to be an initial full blue state when the Neopixel powers up.
Even when the pixel is initialised via the teensy, there is a brief blue flash. I have yet to solve this issue and it seems like it can only be fixed in hardware (Too much effort for me) . So yeah just a headsup.

Not sure if the normal type have this issue.

cobramike
Posts: 230
Joined: Sat Oct 29, 2016 12:31 am
Location: Gelderland, Netherlands
Has thanked: 55 times
Been thanked: 60 times

Re: David's #1 Gameboy (pi3)

Post by cobramike » Mon May 08, 2017 8:19 am

Can you link us what Neopixel u are using. So i can buy it to. Thanks for the info
Whooo Stop befor ask in a post. First use the search or the wiki befor you make a topic.. Just saying.........

User avatar
dbak85
Posts: 40
Joined: Thu Mar 09, 2017 2:04 am
Has thanked: 14 times
Been thanked: 19 times

Re: David's #1 Gameboy (pi3)

Post by dbak85 » Mon May 08, 2017 8:49 am

Sure here is the link:

https://www.adafruit.com/product/1938

But like I said previously there is a blue flash on startup so keep that in mind.

User avatar
abrugsch
Posts: 971
Joined: Tue Aug 02, 2016 10:00 am
Has thanked: 356 times
Been thanked: 430 times
Contact:

Re: David's #1 Gameboy (pi3)

Post by abrugsch » Mon May 08, 2017 9:35 am

dbak85 wrote:
Mon May 08, 2017 8:10 am
A note about these (I am using the 5mm through hole versions). There seems to be an initial full blue state when the Neopixel powers up.
Even when the pixel is initialised via the teensy, there is a brief blue flash. I have yet to solve this issue and it seems like it can only be fixed in hardware (Too much effort for me) . So yeah just a headsup.

Not sure if the normal type have this issue.
yes, my through-hole neopixel clones do this (PL9823) but my banggood 5050 SMD ones on a tiny PCB don't do that... (kind of like these, but I've not seen these before... RGB plus a dedicated WHITE channel. Oooooooooooh </me salivates>

User avatar
dbak85
Posts: 40
Joined: Thu Mar 09, 2017 2:04 am
Has thanked: 14 times
Been thanked: 19 times

Re: David's #1 Gameboy (pi3)

Post by dbak85 » Wed May 10, 2017 11:03 am

Yes I saw those. I wanted to do some white lights for charging. I must say it does not look as good as I thought

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest