Matt's Pocket Build - WIP - Will take me a while

Show off your completed Game Boy Zero, or post your build logs here!
mattc
Posts: 37
Joined: Tue Aug 29, 2017 1:44 am
Has thanked: 8 times
Been thanked: 21 times

Matt's Pocket Build - WIP - Will take me a while

Post by mattc » Thu Sep 28, 2017 2:39 pm

Hello!

I've finally got round to starting a build thread!

This will likely be a long running build so for now it's more of a place for me to bounce ideas and design decisions as I attempt to cram a CM3-L into a gameboy pocket.

I've waiting for my initial prototype test board (CM3L/USB/Power/Lipo Charging/24bit DPI) to come back from fab in china:

Image

In the meantime I've also got these two:

A prototype sound card: USB hub (FE1.1)/USB Audio (CM102)/Stereo Headphones/Mono Summing/Mono Amp (PAM8302)

Image

A prototype safe shutdown board (TPS6120 & ATTINY85)

Image

Being produced to test my individual circuits.


I've worked all of this together into a sort of AIO style designed to drop straight into the GBP with minimal case modding (hopefully :))

Image

So... Whilst I'm sat waiting on a load of stuff from China, on to the Design points...

1) I need a screen.

I found a perfect 2.6" screen on aliexpress:

Image

Unfortunately, after chatting with the sales rep at the factory that makes them, the supply is very constrained as 'no-one wants horizontal 2.6 displays'. I've found another candidate... but again I got the last two :/

Is there a standard screen that people have popped into the pocket?

2) Safe Shutdown

I've got an idea with the ATTINY that should work... if it doesn't I'm back to the drawing board.

3) Wi-Fi

I'm going to have to add external wifi, likely one of the RTL8188 modules. Waiting on one of these from china to measure up to integrate onto the pcb.

4) Controls

I have loads of GPIO available so likely going with direct GPIO wiring of all the buttons... but not yet ruled out USB.
I've popped 4 buttons on the PCB and headers for L&R, there's no way I can see of integrating an analog joystick that will fit into the case along with all the other stuff I'm cramming in there.

5) The USB port

I would like to use a single port for charging and external device connections. I need to work out a way to automatically switch the supply lines going to/from the usb port to enable this.. given this a little thought and have a few ideas but totally untested at this point.

Any pointers here would be useful :)



So, thats that for now... I'll try & keep ontop of this thread as this no doubt evolves. Any Ideas/Tips/Why the hell are you doing this? comments gladly received.

User avatar
YaYa
Posts: 1719
Joined: Mon Jun 26, 2017 12:42 pm
Location: brittany - France
Has thanked: 871 times
Been thanked: 689 times
Contact:

Re: Matt's Pocket Build - WIP - Will take me a while

Post by YaYa » Thu Sep 28, 2017 3:21 pm

Impressive project.
I’m curious of the safe shutdown, will it be like a UPS ? You say that you want the USB port to be able to throw current in/out so you need to manage the power to be able to play/charge and seamlessly switch between USB power in and battery when you will need to throw current out to the external device !
I try to figure out what type of external devices you’ll need in this ?
Follow me on instagram Image

mattc
Posts: 37
Joined: Tue Aug 29, 2017 1:44 am
Has thanked: 8 times
Been thanked: 21 times

Re: Matt's Pocket Build - WIP - Will take me a while

Post by mattc » Thu Sep 28, 2017 3:45 pm

Thanks!

Nothing as fancy for the safeshutdown... the tiny just measures the pi state & the switch state and takes appropriate actions. Its powered from an independant (small low power) regulator. It can also go into deep sleep when powered off to use next to no power.. I hope!

I've some other plans for it too which I why I've chosen the 85 rather than something smaller.

The USB...

When a charging cable is plugged in I want to sense this and feed the power to the lipo charge circuit. The rest of the time the data lines & 5v output from the regs should be fed to the socket so it behaves normally. I can switch using fets but charging at over an amp would likely need a big device, likely SO220 and generate heat... and theres not a lot of room in a pocket :).

Looking into possibly using a darlington pair but again the common device TIP12x, is an SO220 so need to prototype this once my other bits arrive.

Of course the auto switching of this dependant on current direction is something I'll have to give more thought to.....

mattc
Posts: 37
Joined: Tue Aug 29, 2017 1:44 am
Has thanked: 8 times
Been thanked: 21 times

Re: Matt's Pocket Build - WIP - Will take me a while

Post by mattc » Mon Oct 02, 2017 2:25 pm

So the first of my PCB's came in, the general test board for the low power reg. & attiny to enable safe shutdown:

Image

I'll hopefully have some time tomorrow to solder this together and begin the initial tests... Going to have a load of (fun) with the vson10 package. :shock:

mattc
Posts: 37
Joined: Tue Aug 29, 2017 1:44 am
Has thanked: 8 times
Been thanked: 21 times

Re: Matt's Pocket Build - WIP - Will take me a while

Post by mattc » Mon Oct 02, 2017 2:58 pm

Oh, I know... From measurements it was perfect! I also really liked the Stacking FPC to make connection really easy.

You don't have a spare you can sell me do you? :D

The screen I found to replace it is just short on the height by about 6-7mm viewable so not really suitable... I just bought it for testing really until something better crops up. I swear I'm getting 2.6" screen blindness from constantly looking through Aliexpress ;)

I'm trying to find something that will fit without dremelling, sanding or cutting the case. It's one of my primary goals for this project... hence me also trying to dual purpose the USB socket, I'm not having much luck with that either so far.

mattc
Posts: 37
Joined: Tue Aug 29, 2017 1:44 am
Has thanked: 8 times
Been thanked: 21 times

Re: Matt's Pocket Build - WIP - Will take me a while

Post by mattc » Mon Oct 02, 2017 3:53 pm

I can't find anything like that screen, it's driving me nuts!

Thanks for the pointer using OTG, I'll look into that.

mattc
Posts: 37
Joined: Tue Aug 29, 2017 1:44 am
Has thanked: 8 times
Been thanked: 21 times

Re: Matt's Pocket Build - WIP - Will take me a while

Post by mattc » Tue Oct 03, 2017 1:55 pm

Cobbled together a couple of the safeshutdown proto-boards earlier & programmed them using my trusty old sparkfun AVR programmer:

Image

I'll hook these up to a pi/switch tomorrow and see if my coding is up to scratch :D

mattc
Posts: 37
Joined: Tue Aug 29, 2017 1:44 am
Has thanked: 8 times
Been thanked: 21 times

Re: Matt's Pocket Build - WIP - Will take me a while

Post by mattc » Tue Oct 03, 2017 3:14 pm

kite wrote:
Mon Oct 02, 2017 3:21 pm
For the power, you want to use the ID pin on the micro USB.. meaning you can now tell the difference between an 'OTG CABLE' (ID is grounded) or a charging cable (ID is NC) .. so put a pull-up to batt on ID and you can use that logic with some power transistors (you'll need a few, to properly separate power in and out, as you don't want them to become joined together otherwise it will be trying to charge the battery from the battery (it'll just slowly drain the batt this way))
What do you think about a bi-lateral switch? A simple digitally controlled DPST?

Image


http://www.ti.com/lit/ds/symlink/sn74lvc2g53.pdf

Do you think that would handle the charge current?

mattc
Posts: 37
Joined: Tue Aug 29, 2017 1:44 am
Has thanked: 8 times
Been thanked: 21 times

Re: Matt's Pocket Build - WIP - Will take me a while

Post by mattc » Tue Oct 03, 2017 4:40 pm

Thanks (again)!

I’ll have a look into this tomorrow, after I’ve finished playing with switches :)

Sure I’ve a few fets knocking about in the parts bin, I’ll get the breadboard out & give it a go.

mattc
Posts: 37
Joined: Tue Aug 29, 2017 1:44 am
Has thanked: 8 times
Been thanked: 21 times

Re: Matt's Pocket Build - WIP - Will take me a while

Post by mattc » Wed Oct 04, 2017 2:46 am

kite wrote:
Wed Oct 04, 2017 12:02 am
I'd also suggest a circuit simulator (http://www.falstad.com/circuit/) which can be helpful to try out logic! The alternative is to do what the Pi Zero did and just have 2x USB ports, one for power and one for data ;)
I used to use Pspice years back, or electronics workbench... (showing my age now :oops: ) I'll have a play with that, thanks.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest