No MOD PSP Keyboard, Mouse, Joystick

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
User avatar
gr8npwrfl
Posts: 12
Joined: Thu Aug 28, 2008 1:10 pm
Location: Southern California

No MOD PSP Keyboard, Mouse, Joystick

Post by gr8npwrfl »

Well here is the proof of concept you have been waiting for

This is the prototype USB Host to serial interface

Image

This is a AT90USB1287 chip from Atmel. IT has not only a
standard USB device interface but it has the USB Host
interface.

This is their prototype board that sells for $34.00 and
is ready to run as it comes from Digikey, Mouser, or
Arrow.

I placed it in a box to make it easier to handle as the
entire proto board is only 3 inches by 1 inch.

The two connectors on the front of the board allow me to
plug in cables. One to the PSP and another to a RS232
converter so I can send data to the PC.

I currently have completed the USB mouse driver and a
USB Keyboard driver. I am currently debugging the gamepad
drivers for the XBOX 360 wireless gamepad, the PS2/PS3
wireless gamepad, and the Logitech Wingman wireless gamepad.

All of the interfaces require the installation of Pikey
onto your PSP.

THERE ARE NO HARDWARE MODS TO THE PSP AT ALL!

IT works on both the Phat and the Slim

Here is a picture of the cables that I have made up to
work with the PSP Phat.

Image

Again there are no hardware mods to anything. The keyboard,
mouse, joysticks are stock USB devices. That means when you are
not using them with your PSP you can use them other places.

I am working on the Pikey software to make the key mapping work
with my system. The external keyboard or gamepads will be able
to map to ANY PSP internal button or joystick. You will be able
to have multiple mapping files, one for each game of your choice
and map the buttons/sticks any way you want.

Enough talk, here is a video showing the system in action. The
final design will not have a battery, I am putting together a
2.5/1.8 volt to 5 volt converter so everything is powered from
the PSP.

http://www.youtube.com/v/rGGgBuRJFeg

Now that you have seen it, I will also say that yes I have tested
a USB hard drive on this interface and can we say Sloooooooooooow.

It was never intended to do hard drives through the serial port
anyway, but I did it to say yes it can be done. Besides I had the
driver code for a mass storage device.

The interface for an internal versions the one square chip in
the middle of the board and a crystal. Small enough to put inside
the PSP WITHOUT taking out your UMD drive.

Also the device comes with a boot loader that allows the chip
to be flash programmed from your PC without a jtag device.
How is that for cool !!!

You can embed the chip in your PSP and then plug in a cable that
will connect to the PC and program the memory in it. So as we
come up with more drivers and software all I will have to do
is the same we do for a PSP, post the files and program your
device.

By the way, this chip also has 38 more unsused pins on it.
Any of the pins can be programed to do other functions like
control LEDs or other things inside the PSP and then could
be controlled by the keyboard, mouse, or gamepad. Some of the
extra inputs are A/D converters and I was thinking since we
are already plugged into the headphone/serial plug, it might
be nice to do an amp in the external box with a computer
controlled sub woofer .......

All of the code for this and further devices built on it will
be open source. It is all written in commented "C" code so you
can modify it to your hearts desire. The Atmel development
system is FREE and includes the "C" compiler. It is a integrated
development system with a simulator so you can build your code,
simulate it to debug and then plug in the AT90USB1287 chip
and program it.
Art
Posts: 642
Joined: Wed Nov 09, 2005 8:01 am

Post by Art »

Wow.. good work :)
So there is only one chip on that test board.

You'll probably need to keep the battery if you want to put an amplifier in it.
The power provided at the serial port won't run much of an amplifier.

Will be interesting to see how you go about connecting things if you put the chip inside a PSP.
If not actually, then potentially.
M.r Lemony Fresh
Posts: 19
Joined: Wed Nov 21, 2007 4:00 pm
Contact:

Post by M.r Lemony Fresh »

:O sell it for a zillion dollers
Image
everlasting
Posts: 41
Joined: Mon Mar 19, 2007 6:27 pm

Post by everlasting »

Very good work. I am already building a "protoboard" with the AT90USB1287 for other purposes but i'll be wating for the source to test this, looks real good.
User avatar
gr8npwrfl
Posts: 12
Joined: Thu Aug 28, 2008 1:10 pm
Location: Southern California

Post by gr8npwrfl »

If you want a real leg up with working with the AT90USB familly processors then you need to go to MyUSB. It gives you a fully functional USB host stack for these processors.

All my code is built on these as a base. There are fully functional demos of several HID devices as well as mass storage devices. They also have a software development board to help you with developing your own USB applications.

Between this board and the standard documentation on USB device drivers you can start writing your own drivers for USB devices.

Another hint, if you want to write a device driver for something there is not a driver for then check out to see if there is a driver for it in the linux community. You can use it as a template to develop your own driver around and make your life much simpler.

With these resources, even if you have never written a device driver you are well on your way.

MyUSB support list:

http://groups.google.com/group/myusb-support-list

AT90USB developers forum:

http://www.avrfreaks.net/

There are two approaches to using an external processor through the serial port.

1. Interface to the USB device and send the raw data in the serial port
and interface to the data on the PSP side.

2. Interface to the USB device, process and configure the data and send
only the results to the PSP.

Since I am sending my keyboard data to Pikey on the PSP side, I did not want to modify that software and put more overhead on the PSP which can cause other side effects and problems.

My keyboard interface reads the USB scan codes from the keyboard and then in flash memory I maintain the translation table to Ascii. The only app that I am writing for the PSP is to be able to send custom translation
tables to be stored in the remote cpu flash.

Also like remotejoy that allowed the gamepad to be mapped to keyboard keys, I am interfacing the external gamepads to the keyboard translation table so you can have button reassignment to your hearts content.

All the burden and overhead does not consume resources on the PSP and does not slow down the system.

After the keyboard and gamepad is done, I have so much more power left in the external cpu I was thinking about taking two of the A/D converters and building a frequency discriminator so I can build a micro based sub woofer amp for the speaker output that is already being sent to my interface.
Chrighton
Posts: 58
Joined: Wed Jun 15, 2005 8:24 pm

Post by Chrighton »

Seems like a great project. It's got my interest, as I'd like to have some keyboard functionality for the slim...
NeoTechni
Posts: 15
Joined: Mon Oct 30, 2006 5:35 pm

Post by NeoTechni »

I would love to use this with sixaxis/ps2 to ps3 controller adapters

Especially if you add support for ps1/ps3 modes
ie: in ps1 mode, left on the analog nub/dpad is l2, right is r2, up is l2 and r2 (you can switch between the dpad or analog)
in ps3 mode, select+start = select, select+l=l2 select+r=r2, select+analog=right analog, select+home=home on ps3 side

hell itd make a great fps adapter using mice. i cant wait for your code release. ill have to buy one of these boards and make a docking bay for my slim
everlasting
Posts: 41
Joined: Mon Mar 19, 2007 6:27 pm

Post by everlasting »

gr8npwrfl wrote:MyUSB support list:

http://groups.google.com/group/myusb-support-list

AT90USB developers forum:

http://www.avrfreaks.net/
Wow thanks for such a good info, I never heard about MyUSB, seems real cool. Definitely i have to test some stuff this weekend.
Thanks again.
User avatar
gr8npwrfl
Posts: 12
Joined: Thu Aug 28, 2008 1:10 pm
Location: Southern California

gamepads supported

Post by gr8npwrfl »

I am doing the drivers for three gamepads:

Xbox 360 Wireless with chatpad keyboard and headset microphone

PS2 / PS3 Wireless gamespads with rumble

Logitech Wingman wireless rumble gamepad

After the base gamepads are supported then I will take the left
and right audio into two of the A/D converters on the chip and
use frequency descrimination software to create a sub woofer
output that will turn the rumble on and off. So gunshots, crashes,
and explosions will cause the rumble on the gamepads

The drivers are in order I am doing them. Any button or joystick will
be able to be mapped to any internal PSP button or gamepad. They will
be logic ored with the internal buttons so both the gamepad and the
PSP controls will both work at the same time.

All the interfacing I am doing is based on mapping files. You will be able
to have different map files for different apps. I am even looking at a
way that Pikey can tell me what mode the PSP is in so you can not
only have different maps for different games, you will be able to have
different maps for the XMB mode, the game 150 mode and the game 3.xxx mode.

All the maps are held in the flash memory of the interface to minimize the
impact on PSP memory.
_____________________________
Ignorance is not fatal, it is curable
NeoTechni
Posts: 15
Joined: Mon Oct 30, 2006 5:35 pm

Post by NeoTechni »

Would it be possible for you to post instructions on how to make a cable to plug into this and a psp, while allowing component video out, or any psp serial/headphone/remote/video cable to plug into it?
User avatar
gr8npwrfl
Posts: 12
Joined: Thu Aug 28, 2008 1:10 pm
Location: Southern California

Post by gr8npwrfl »

I will look and see if I can find a PSP connector socket. Then all the pins can be brought out to the interface and you can then plug in the monitor cable so you do not lose that capability.
_____________________________
Ignorance is not fatal, it is curable
sauron_le_noir
Posts: 203
Joined: Sat Jul 05, 2008 8:03 am

Post by sauron_le_noir »

Is this stuff also for the psp slim or just for the phat ?
User avatar
gr8npwrfl
Posts: 12
Joined: Thu Aug 28, 2008 1:10 pm
Location: Southern California

Post by gr8npwrfl »

both the slim and the phat

I have tested both with 4.1 m33 software
_____________________________
Ignorance is not fatal, it is curable
everlasting
Posts: 41
Joined: Mon Mar 19, 2007 6:27 pm

Post by everlasting »

I try to avoid asking people to make things for me, so take this just a suggestion.
Well i have never seen the ps2/ps3 controller protocol , but you have said that any of their buttons will be able to map any of the psp buttons (seems obvious once you have made the protocol for one of them). Well my question is, will we be able to use even the ps3/ps3 analog nubs as the psp analog nub?
Assuming you are able to catch the state of the analog nubs I was thinking it would be extremely cool to implement a little extra-code for using the analog nubs of the controllers to control in an analog way the psp buttons.
I mean, by using some of the PWM modules of the chip we could interface a determined position of the Ps2/PS3 analog nub with a determined pressing frequency of the PSP buttons, obviously this frequency would be high enough for giving a continuity feeling.
Hope i made myself clear enough ;)
l0rdnic0
Posts: 35
Joined: Fri Aug 01, 2008 11:21 am
Location: NY
Contact:

Post by l0rdnic0 »

WOW gr8npwrfl, I like it alot esp. the 30 pins that arnt used.

Great WORK can't wait to see more!!!!
Inspire someone in a positive way today?
User avatar
gr8npwrfl
Posts: 12
Joined: Thu Aug 28, 2008 1:10 pm
Location: Southern California

Lets build the hardware

Post by gr8npwrfl »

USB to Serial Wiring for AT90USB Demo Hardware Build and Setup

Required Tools:

1. Soldering Iron
2. Solder
3. Wire Strippers
4 Side Cutters
5. Static Wrist Strap
6. Small Jewelers Philips Screwdriver ( Same one used to open the PSP )
7. Small file, or sandpaper, or Dremmel
8. Multi Meter to measure resistance

Note: If you need to know how to use your multimeter read my tutorial here:

http://www.acidmods.com/forum/index.php?topic=23202.0


Required Parts:

1. AT90USB Key Demo Board
1. Old PSP Headphone remote control
1. MAX3232CPE NOTE: Make sure this is the Maxim 2.5 volt part not the TI part
5. .01 uf ceramic capacitors
1. 16 Pin IC Socket
1. Small Piece of prototype board
1. DB9 Female Connector
3. 4 pin sockets of some kind
2. 4 pin plugs that mate to the sockets
1. Foot of 4 conductor wire.
1. 2" x 4" Case for AT90USB demo board
1. 2" x 2" Case for RS232 level converter
1. 26 to 30 guage wire wrap wire about 1 foot
1. Small Shrink tubing about 1/8 inch dia
1. Larger Shrink tubing about 1/2 inch dia

Required Software for the PSP

PiKEY for the PSP with the Serial Port Patches

Level of Difficulty: Moderate

Here is the schematic of the AT90USB demo board to PSP

Image


Step One.



Prepare the Headphone/Serial Remote Cable:

Image

The Wire in the remote headphone controls is a material fiber with a single strand of
copper in it. The wire is very difficult to strip and tin to get ready for soldering.
It is much easier to use the tinned end that is already soldered inside the remote
control.

1. Turn unit over and remove the Screws from the remote control

Image

2. Remove the case from the remote control

3. Unsolder the cable from the printed circuit board

4. Set the case and all the plastic parts aside, all you want is the cable
with the plug end on it for the PSP.

Image

5. We are only going to use 4 wires on either the PSP 1000 or 2000 for right now



Step Two


Obtain the Connectors

You can use any four pin miniature connectors you want. I found the connectors
that are used to connect CD Rom drives to the computer sound cards work really
well as they are very tiny and strong as well as locking. I had an old sound
card laying around and I stole the connector jacks from that. The cable that runs
from the CD Rom to the sound card has the matching plugs on each end.

If you are going to build the RS232 level converter so you can hook your AT90USB
demo board up to your PC you will need two of these cables. One to run from
the demo board to the level converter and the other to get the plug from to put
on the end of your PSP cable.

Here is a picture of the sound board I took the connectors from

Image

Here is a picture of one of the connectors

Image

Here is a picture of the jumper cable with connectors

Image



Step Three


Putting the AT90USB demo board in a case:


The wire wrap wiring is fragile and will not take a lot of abuse. That is
why I mounted my AT90USB demo board in a temporary case. I purchased the case
from Radio Shack and it is a perfect fit for the demo board. With the board
mounted at the top of the case it leaves room for another board underneath,
( This is where we are going to install the DC to DC converter later ).

I am sorry I did not do pictures while I was building the case but will show
closeups of the completed case.

1. Trim the case cover screw posts down about a quarter inch.
( These are the four posts with holes in them the cover screws to )

This allows the demo board to set down in the top of the case slightly


2. Take your sandpaper, or file, or Dremmel and make small notches at the
corners of your demo board so you can see the holes in the mounting posts
that you cut down.

Image

NOTE: Make sure and blow off the demo board when you are done as you may
have ground a little copper on the demo board and you do not want
to create any shorts.

3. Note the locations of the two main connectors on the demo board. One is the
9 volt power connector and the other is the USB connector.

A. Mark your case as we are going to make some slots in the case. Make sure
you mark how far the connector set into the case and add about a 1/10 of
an inch extra.

B. Remove the demo board and set aside.

C. Cut the plastic of the case to make your cutouts for the USB and Power.

D. Take two of the connector jacks that you obtained in Step Two and mark
the case on one of the long sides so the two connectors are spaced
equally lengthwise and about half way down from the top.

( make the hole tight as these connectors are not panel mount and we
will have to superglue them in place. )

E. Cut the holes for the two connectors in the case.

4. Take the Two four pin connectors and solder about 3 inches of wire wrap
wire to each pin of the connectors and let it stand out straight

5. Insert the two connectors through the holes you made for them in the case
and push them about 1/2 the way in. Super Glue the connectors in place.

6. The pins are numbered 1 to 4 starting at the left side of the connector
looking down from the top.

7. On the left connector fold the wire down on pin 4 and curl it up so it does
not touch anything. ( We will use this wire in future tutorials from the
DC to DC converter )

8. Jumper the left connector pins 1,2,3 over to the right connector pins 1,2,3
You are now left with the four wires sticking out from the right connector.
Fold them up along the side of the case so when you insert the demo board
they are sticking up in the air.

9. Insert the demo board and hold it in place with the four screws that were
made to hold the cover in place.
( The demo board is now captured in the case and won't move. )

Note: The connector we are using on the demo board is J4 it is located next
to the Jtag connector and is numbered like so:

Image

10.A. Pin number 1 (on the connector) is ground and we are going to hook that
to the demo board at J4 Pin 2
B. Pin number 4 (on the connector) is 3 volts and we are going to hook that
to the demo board at J4 Pin 1
C. Pin number 2 (on the connector) is tx data and we are going to hook that
to the demo board at J4 Pin 7
D. Pin number 3 (on the connector) is rx data and we are going to hook that
to the demo board at J4 Pin 6

Here is a picture of the completed unit

Image


Step Four


Making a PSP Connector Cable

Note: The colors of the wires vary according to who the manufacturer that
made the remote was. We will have to find the correct wire by using
our multi meter.

1. Use these pictures if you have a PSP 1000 (Phat)

Image

Image

2. Use these pictures if you have a PSP 2000 (Slim)

Image

Image


A. Take the cable that you obtained in step one

B. Get your surplus CD Rom cable

C. Cut the wire to one end of the cable about 1 inch from the connector

D. Remove the outer jacket insulator exposing the four wires.

E. Get the two sizes of shrink tubing

1. Cut 3 1/2 inch pieces of shrink tubing small size
2. Cut 1 1 inch piece of shrink tube larger size
3. Slide the larger shrink tube over the PSP cable

F. Find the wire that comes from the psp connector ground slide one
of the small pieces of shrink tube over the wire. Solder that
to the wire that comes from the CD plug pin 1 and then shrink
the tubing.

G. Find the wire that comes from the psp connector pin 2 and slide one
of the small pieces of shrink tube over the wire. Solder that
to the wire that comes from the CD plug pin 4 and then shrink
the tubing.

H. Find the wire that comes from the psp connector TXD (transmit data)
and slide one of the small pieces of shrink tube over the wire.
Solder that to the wire that comes from the CD plug pin 2 and then
shrink the tubing.

I. Find the wire that comes from the psp connector RXD (receive data)
and slide one of the small pieces of shrink tube over the wire.
Solder that to the wire that comes from the CD plug pin 3 and then
shrink the tubing.

J. Slide the large shrink tubing over all your connections so it covers
the small shrink tubing and supports the two different cables so
they appear as one continuous cable.


The finished cable should look like this:


Image



Step Five


RS232 Level Converter

This level converter is used for many things.

1. You can plug in your PSP cable to the converter and by running
Hyper terminal you can see debug information that is sent when
programming the PSP.

2. It plugs into the AT90USB demo board and allows you to see debug
information that is programmed into the demo board software.

3. You can plug in most RS232 devices and control or read from them
over the RS232 port.

Schematics:

http://mysite.verizon.net/restxsa0/PSP_ ... verter.pdf

Procedure:

1. Cut the proto board to fit in the 2 inch by 2 inch plastic box

2. Mount the 16 pin socket in the middle of the board

3. Wire the socket with all the caps inserted

4. Cut out the plastic box to mount the DB9 Connector at one end

5. Cut out the hole for the CD Rom audio connector

6. Attach the 4 three inch wires to the the CD Rom connector

7. Insert the CD Rom Connector 1/2 and glue with Super Glue.

8 Attach 3 three inch wires to the DB9 connector

9. Mount the DB9 Connector to the box

10.Solder the TXD,RXD, and ground wires from the DB9 to your proto board

11.Solder pin 1 of the CD Rom connector to the ground of your proto board

12.Solder pin 2 of the CD Rom connector to the TX data of your proto board

13 Solder pin 3 of the CD Rom connector to the RX data of your proto board

14.Solder pin 4 of the CD Rom connector to the Power of your proto board

Optional you can hook a led and resistor across the power and ground so
you can see when the PSP is powering the RS232 Level converter.

15.Plug the chip into the socket making sure you place it in the correct
direction.

Here is a picture of a completed interface:

Image

Note: The green over the CD Rom connector is a panel mount led lamp

Image

Note: The extra connector over the DB9 is power in so I can use this
interface on other projects.


Conclusion:


This concludes the hardware part of interfacing the AT90USB demo board
to the PSP. In the next part we will go over how to program the demo board
and set the PiKey software up in the PSP.
_____________________________
Ignorance is not fatal, it is curable
lingenfr_psp
Posts: 9
Joined: Mon Nov 24, 2008 10:34 am

Post by lingenfr_psp »

Any update on this? Not having to fool with the onscreen keyboard would be great.
User avatar
jean
Posts: 489
Joined: Sat Jan 05, 2008 2:44 am

Post by jean »

just a question: cost?
isles487
Posts: 10
Joined: Tue Nov 18, 2008 4:42 pm

Post by isles487 »

I'm really interested in this project as well. The goal of my project is to send and receive At commands with phone... this would be made immensely easier if I could simply use the USB interface with it. Of course, I'd have to write the serial over usb drivers for phone, but this would still be awesome. I hope new progress has been made.
User avatar
jean
Posts: 489
Joined: Sat Jan 05, 2008 2:44 am

Post by jean »

I'm really interested in this project as well. The goal of my project is to send and receive At commands with phone... this would be made immensely easier if I could simply use the USB interface with it. Of course, I'd have to write the serial over usb drivers for phone, but this would still be awesome. I hope new progress has been made.
What the heck are you speaking about??? every phone i've seen accepts at commands via a real serial interface or virtual serial line over bluetooth. This project is great but i don't think it can help you with phones...
isles487
Posts: 10
Joined: Tue Nov 18, 2008 4:42 pm

Post by isles487 »

Yes, I'm well aware that most phones did at one time have serial interfaces so that you could connect a serial cable to it, and send AT commands. My phone does not have a serial interface (rs232). The only compatible cable for it is USB (providing a serial over usb link). Bluetooth is awesome but it doesn't help for my project, because I would like to do this through PSP. Assuming I can build this, I should now be able to hook up my phone's USB cable to the PSP, without buying the USB cable for my phone and trying to adapt it to RS232.
lingenfr_psp
Posts: 9
Joined: Mon Nov 24, 2008 10:34 am

Post by lingenfr_psp »

Please don't hijack the thread. Move this telephone discussion somewhere else.
User avatar
jean
Posts: 489
Joined: Sat Jan 05, 2008 2:44 am

Post by jean »

Please don't hijack the thread. Move this telephone discussion somewhere else.
Uh? Dude, who do you think you are? the phone topic is not OT since involves communication from/to PSP via SIO interface like/via the proposed device, and has taken only 2 posts... i don't think this device can let phone control be any simpler, but discussion is not to be stopped like that; let's say your last intervent is more OT than ours.
User avatar
Wally
Posts: 663
Joined: Mon Sep 26, 2005 11:25 am

Post by Wally »

Image

NERD FIGHTS ARE WRONG GUYS!
NeoTechni
Posts: 15
Joined: Mon Oct 30, 2006 5:35 pm

Post by NeoTechni »

This seems very difficult to make.

I'd love a way to just plug a DS3/SIXAXIS or any usb controller into a box, plug the box into PSP's USB port and have it work.

This would only work with one model PSP, and would block sound/video out....

Could you find a way to make it work over PSP's USb port like the chotto cam and microphone?
Art
Posts: 642
Joined: Wed Nov 09, 2005 8:01 am

Post by Art »

My money says he's not going to pick it up and redesign it,
and write new software for the microcontroller after seven months of doing nothing with it because of that one post.
It's just not the way it normally works.

But good luck :)
If not actually, then potentially.
NeoTechni
Posts: 15
Joined: Mon Oct 30, 2006 5:35 pm

Post by NeoTechni »

My money is he or someone else would love to make a more elegant solution, most engineers/programmers do
isles487
Posts: 10
Joined: Tue Nov 18, 2008 4:42 pm

Post by isles487 »

Just wondering, with the information we have now, including the hardware tutorial, what are the next steps to get this device functioning? He was to release the software tutorial, but unfortunately, it looks like it's not to be. I'm guessing we still need info on how to program this chip. How feasible is it to move forward from here? Is the programming trivial? Does one basically have all the info to get this thing functioning from here on out?
NeoTechni
Posts: 15
Joined: Mon Oct 30, 2006 5:35 pm

Post by NeoTechni »

Oki, I would actually like to take up this project.

Problem is, can this MCB act as a host for 2 devices at one time?

IE: Can I plug a USB hub into it, plug a controller and the PSP into the hub and work from there?

I would love to actually use this as a multipurpose project. Take 360/PS3/USB HID controllers, and output them as 360 and PSP compatible. (No point in doing PS3, since it was designed properly and takes any USB HID device)
NeoTechni
Posts: 15
Joined: Mon Oct 30, 2006 5:35 pm

Post by NeoTechni »

I see hasn't posted anything. Sigh.

I asked Tyranid for info on USBhostFS and he basically has no documentation. I wanted to make it RemoteJoy compatible so no soldering whatsoever would be used, but no luck.
Post Reply