Interfacing the PS2 wireless controller to Robot controller

The PS2 wireless controller is a standard controller for the PlayStation 2 and is identical to the original DualShock  controller for the Play Station console. It features twelve analog  (pressure-sensitive) buttons     ( Χ, O, Π, Δ, L1, R1, L2, R2, Up, Down, Left and Right), five digital button (L3, R3 Start, Select and the analog mode button) and two analog sticks.

Here we have interfaced the PS2 controller with robot controller. We are showing how to interface a rover with robot controller and the rover is controlled with PS2 joystick. Only Analog stick is used to control the rover.We followed the standard PS2 protocol for realizing the communication algorithm, identical to the SPI protocol. Our program on the arduino detects Analog stick values and decides the movements.

Connection Details:

 The PS2 receiver CLK line and ATT lines are held normally high. The ATT operates like the Slave Select line under SPI. You pull it low to tell the controller you are talking to it and then send it back high once a communications cycle is complete. CMD is the data line to the controller and DATA is the data coming from the controller. Here in our application we are not using the acknowledge pin.

The Data pin (1) on the receiver is connected to the D12 pin on arduino. The Command pin (2) is connected to D11. The Attention pin (6) is connected to D10.The clock pin (7) is connected to D13. The 4th pin on receiver is GND and 5this VCC(3.3V). The 2-pin RMC connector K3 is used to power up the board. The power is in between 7 to 12V. K11 and K13 are 2-pin RMC connectors where the motor is connected.K9 is a 2-pin RMC connector where we connect the appropriate voltage for DC motor.

 

Leave a Reply