Hey Chipsters, this post is about one of my current projects, the CSP – CHIP Station Portable.
I’m a big fan of the $9 C.H.I.P. – it’s a great module and I still can’t wrap my head around the $9 price tag. I’ve also bought two Pocket CHIPs but I’m frankly not the biggest fan. I’d rather use a single CHIP to build a small system and add the required components whenever they are required – e.g. add a screen via Tzatziffy to build a small picture-frame.
Looking at the official pocket chip page gives me the impression that Pocket CHIP was made as a Gameboy replacement, but I’m still not convinced that the keyboard can be used for gaming. It’s too clicky, too hard to push .. simply not the right gadget for me. So the big question: How can I used the super cool CHIP for some gambling around, but have decent buttons and a nice form factor?
My first approach was to mill a custom wooden case with a screen and some buttons. But this has been done way too often by the game industry to do it once more. There are Sony, Nintendo, SEGA (only to name a few) who invested probably millions and had professional development teams, designer and usability tester to come up with a nice housing. So re-using an existing housing would make way more sense. There were already Gameboy and GBA thread running in the forum and I didn’t want to steal a project from another chipsters, so I’ve searched on.
The SONY PSP
seems to be a fit-for-purpose gadget:
- 4.3″ screen (same resolution as Pocket CHIP)
- integrated 3.6V battery
- 5V charging system
- many gaming friendly buttons (4 left+4 right+7 below screen + even 2 shoulder buttons + power = 18)
- absolute stunning design and perfect position of keys and screen layout in my opinion
- widely available on eBay for decent prices $20-$30 (display alone: $20)
- enough room inside the housing for modifications
What has been done by others
I’ve googled a bit a found pretty quickly that it has already been investigated by a page called othermod. The admin has done a absolute amazing job taking the PSP apart and also documented every step which gave me a head-start. The main tasks (from my point of view):
- Add lipo charger / discharge and battery measurement circuit
- Add audio amplifier
- Add external micro sd slot
- Add power on circuit
- Add display driver fpga (wow!)
- Add batteries
- Connecting the PSP buttons to the rpi
WOW! Thats an amazing amount of work and cost – the display driver alone cost 2x the money of CHIP and the all in one board is targeted at $80 and probably worth every penny (thats for the modification, you still need a (mostly) working PSP). The work to connect all the flat band cables must have taken weeks!
PSP and CHIP:
Lets see how this would work out with CHIP:
Add lipo charger / discharge and battery measurement circuiton board on chip
- Add audio amplifier – yep that’s needed as well
Add external micro sd slot needednot needed (but should be added) Add power on circuiton board on chip – might need some scripts to control the PSP LEDs Add display driver fpga(95%) on board on chip Add batteriesreuse of PSP battery?
- Connecting the PSP buttons to the rpi
The amp isn’t expensive, same for the SD slot. CHIP has an parallel LCD interface that should more-or-less work with the display, so we only need the DC/DC part (we have to convert 5V to ~23V to drive the back-light, but I gained quite a bit of experience with the Tzatziffy) and we have to find a way to connect to all those nice buttons, battery, screen etc to CHIP.
Alright, first step was to get a used PSP .. I’ve bought one for ~$25 (shipped) which had a bad UMD drive (perfect for me). I took it all apart (pretty much following this teardown guide). I’ve used one of my previously developed Tzatziffy boards to connect to the 40 pin zif cable .. and the display stayed black… It took a day to find the root-cause which was simply an inverse polarity of the synchronization signals (didn’t read the datasheet correct). So after a small modification:
Here we go, CHIP + PSP display, without expensive FPGA board. This was more like a proof of concept, soldered with 20 free wires and an external power supply. The image was crystal clear but slightly shifted to the right (that issue is now fixed by using another driver).
The next big line item were the reuse of the buttons. The hardware part of it was easy peasy thanks to the documentation on othermod
(image copied all credit to othermod)
I’ve search for a pin extender that would be compatible with CHIPs OS to avoid a custom kernel an found support for the PCA9555, single interrupt 16pin extender and connected this extender with some community help to act as a keyboard. So pushing the keys will make them act as regular keyboard inputs. This helps a lot, especially with emulators without gamepad support.
Create the replacement PCB
The real work was to get all the connector, the DC/DC circuit, the amp, the SD and C.H.I.P. on a single PCB that can be installed inside the PSP. I’ve asked othermod if I could get the outline, but unfortunately he replied that he isn’t ready to share his work – which I totally understand!
I’ve screwed the PSP to my CNC and measured all position by simply directing the drill to the center and write down the position from the screen. I’ve also cut a preliminary rough layout to see if the connector would end up in the right position.
After some modification I had a design for the first prototype to see if it fits as shown above, but the professionally made boards (see below) looked a lot better
The board is automatically identified by CHIPs OS and the driver for display, SD and the fake keyboard are loaded. The display runs of the onboard battery as well as CHIP does. SD card and Speaker .. all running fine.
I’ve cut the backdoor 51mm wide, instead of 41mm … oh well 🙂
And here is what this is all about, cable free, all keys working, including sound: (and yes, I’m not very good at Super Mario anymore :] )
Battery, speaker and charger input
The CSP is almost solder-free but only almost. The battery has to be connected to the board and I didn’t spend the time to find the right (probably SONY internal) battery connector, instead I’ve simply soldered two wires to the battery. The same applies to the speaker and the 5V charging cable. But it’s super easy to strip the cable and connect them to the board.
Using the CSP doesn’t require any modification of CHIP OS. Its just a matter of loading the correct driver. This is achieved by following the NTC guideline for DIPs (link). The installation process is a simple three stepp process. First make sure that git is installed:
sudo apt update
sudo apt install git -y
Second step is to clone the repository:
sudo git clone https://github.com/KoljaWindeler/CHIP_STATION_PORTABLE.git
Third and last step is to call the installer, which will copy all required files
Reboot CHIP and it will recognize the display, SD slot and the buttons (as keyboard input).
I’ve added a script which is in big parts copied from https://raw.githubusercontent.com/fordsfords/blink/gh-pages/blink.sh to the respository.
- Monitor the battery and start blinking the power LED if the battery is below 15%
- Shutdown the CHIP if the battery is below 5%
- Starting blinking with the charge battery as long as the battery is charging
- Turn the charge LED solid on as soon as the battery is fully charged
- Shut CHIP gracefully down if the PSP power button was pushed
To run the script simply start:
Hack the Hack
If you feel like modifying the Chip Station Portable – DIP you might need some info about which pins are already used and which are still available.
Problems and issues
I’ve tried to make this as user friendly as possible, but after all this is a hardware hack. The PSP was never meant to carry a C.H.I.P. and some minor modification are required.
- The metal frame of the PSP display has two hooks which needs to be removed, to make space for the pcb:
- It is complicated to remove the insulation of the speaker wire, I’d recommend to cut the connector to get to the part of the wire that has already been stripped.
- The battery isn’t quite compatible or mine is bad .. the charge indicator is always “loading” and never reaches “fully charged”.
And even when the battery is fully discharged and definitively charging: The charge current always shows: 0.0mA
Are you interested? I’ll probably build another CSPs on the weekend and can make some documentation for the hack. Just leave me a comment. I’m also thinking about selling the kit, but need to know how many would be interested. Target price might be ($35-ish) for the board with all connectors (you still need your own PSP) but really dramatically depends on the demand.
Build protocol for version 2
Step 1, remove everything from your PSP, remove every screw and every electronic board until you’ve a PSP as shown below.
Step 2, prepare the battery, the speaker and charge connectors
Step 3, add some solder to all PCB pads and solder the speaker and charger to the PCB
Step 4, solder the battery to the PCB, and UGLY: add two connectors to the display power circuit
Step 5, modify the frame a little bit ..
Step 6, connect the ZIF cable, align the PCB and crew the frame in. Make sure the d-pad is clicked into the frame.
Step 7, connect the display, and solder the display power to the board UGLY
Step 8, connect CHIP see if it boots and if so, connect all the outer shell parts
Step 9, if you can and want: Mill a 41x62mm cutout in the back. Now: fire up some games