Redesign #1

A project log for BT PS2 Controller for 3D Modelling

Turning a wired PS2 controller into a tool for 3D modelling through bluetooth and a Raspberry Pi Zero.

malomalo 07/04/2022 at 02:180 Comments

After a few days of research and trying things out, I realized that the bluetooth module I was using (HC-05) was a problem. Mainly because I need to be able to emulate HID (human interface device) communication protocols, and the firmware on the HC-05 does not allow that. I found some tutorials online on how to modify the module so that it did, but I decided to go another route.

I am replacing the Arduino and HC-05 with a Raspberry Pi Zero W! It is overkill for this project, but hopefully it will lay the groundwork for future development (universal controller maybe ??)

I started by chopping off the connector and soldering on some female jumper wire connectors. I connected them to the GPIO port headers on my raspberry according to this diagram:

I'm not sure if this configuration will work, but it will stay like this for the time being. I set up my raspberry so that I can ssh in and test everything out, but I haven't been able to find a python library to port the PS2 inputs, so I'll probably end un making one of my own. I've spent these last few days doing logic analysis on the controller's communication, and I've found tons of great info on some websites i'll link at the end of this log.

Apparently, the PS2 uses a full duplex communication system, in which the clock pin is held on high until it sends a byte. It then turns to low for 20 microseconds and then high again, 8 times. I haven't been able to completely figure out the packet structure yet, even though there is some great documentation on the subject, but packets have a three byte header followed by an additional 2, 6 or 18 bytes of additional command and controller data (like button states, vibration motor commands, button pressures, etc.).

Hopefully, I'll have another update soon. In the meantime, I highly recommend the following sites and blogs on the subject: