• Redesign #1

    malo07/04/2022 at 02:18 0 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:

    https://store.curiousinventor.com/guides/PS2#low_level

    https://github.com/turnimator/ps2pi

    http://www.lynxmotion.com/images/files/ps2cmd01.txt

    https://gist.github.com/scanlime/5042071

  • Cleaning, Prototyping and Repository-ing

    malo06/17/2022 at 01:26 0 comments

    This is my first log entry for my first fully documented project. I'll do my best to be as clear as possible in the building instructions and hopefully the logs will document my journey building this. I don't expect anyone to read this but it's nice to leave a trail for posterity.

    I started by taking apart the controller, since one of the joysticks was stuck in a weird position. I also looked around and managed to get an idea of how things worked, or so I thought, since when I put it back together the triggers and the buttons on top of them wont press right. I dont think it's that big of a deal, but I'll take it apart again if I need to. I also cleaned it up a bit.

    I made a little prototype circuit with a generic pro mini and an hc-05 BT module I had lying around. Struggled a bit to get everything working since the Uno I was using to program the pro mini was having some issues related to drivers, but I managed to upload some basic programs.

    I started my first GitHub repository as well! It seems complicated but it'll help me organize my coding a little bit. It's here.

    Hopefully keeping logs motivates me to actually finish a project for once.