Close

PS3 controller I2C hookup

A project log for Building the Thor robot

Building a 6-axis robot based on the Thor robot. When size DOES matter!

olaf-baeyensOlaf Baeyens 03/28/2017 at 20:370 Comments

I finally managed to make the PS3 controller function with the USB Host controller v2.4 through I2C

http://www.hobbytronics.co.uk/ps3-controller-bluetooth

The issue is that the Ultratronics pro v1.0 board is an Arduino Due in disguise. This PS3 controller functioned normally on my Arduino mega but failed on the Due.


The first mistake seems to be that I used the 2x4 pin headers I2C on the Ultratronics board. Only later I realized that there was another one on the analog 2x6 pins.

It is not marked on the board only to be found on its documentation.

The analog 2x6 header is found here SDA0 pin 2, SCL0 pin 4.

However the story is incomplete since I did try these pins and I had no working PS3

Danny gave me the final clue that it was missing a pull up resistor of 1.5K for SDA0 and SCL0.

Temporarily I have stuck them into the header (hidden in the blue plastic so they don't cause shortcuits)


I also had a 0.5 second response time when I pressed the controller and received the command but that was resolved by hooking it up to a USB to serial adapter, (Rx to Tx and Tx to Rx) and send the command "SERIAL OFF".

The lagging was probably because of the 9600 baud data transmission. It was sending the data both to the Serial and the I2C.


Still one mystery left that only seems to exist when I use this USB Hub controller. The code that pulls the I2C data may cause hangs of the ultrasonics board. It is unclear because without the controller it appears to function normally.

To be resolved....

Discussions