Monday, October 7, 2013

PlayStation Joystick Control

So I now have a Toy Car, with a basic remote that can make the car go forward backwards and turn in both directions. This is really not something new to my kid nor that of a unique toy, but I have some plans to spice it up but this will have to wait to the next post.

Let's focus on the title of the post, the PlayStation joystick. I have one laying around from the old days, it's a wireless one and also came with a dual port converter to USB.
The USB converter seems to have become broken for some reason that I care little about (I have another one). It does show signs of life as you see in the picture, but nothing much happens beyond the USB port.
Great, now lets take it apart! :).

Yeah, I really don't give a damn about the board, but I only need the connectors. The connectors can be attached to an Arduino that is programmed with the relevant software and see what happens.

I took the first connector and attached some wires to it to see if this is really any good or if it even works.

I connected the wires and uploaded the sketch taking from:
I used the picture of the connector to connect the wires.
The communication with the controller is rather simple but require some effort.
1. Send an "Attention" to the controller so that it will be ready to receive a command via the "attention" line. This is actually the "Control Select" line which is used to indicate which control is currently in use. Each controller has it's own line. The rest of the wires (lines) are shared between all controllers (sort of a bus like).
2. Send a command to the controller via the "command" line.
3. Receive the data via the "data" line.
4. should receive and ACK from the "acknowledge" line, but the library simple doesn't use it, I can understand why :).
The "clock" line, well it's a clock line what do you think it does? :).

The wires that are required for the connector to function are 4:
1. Attention (or Select)
2. Command
3. Data
4. Clock

Seems to do the job. The joystick functions rather well, let's use the other connector and make a more convenient connector to plug into whatever PCB I will make.




Although the "ACK" line is not required, I still connected it, and also maintained the coloring as described in the link above just to get a better reference when connecting the plug to the Arduino.

No comments:

Post a Comment