My notes for converting a Wired PS2 Controller to Wireless using ESP32 + PS2X lib
https://www.raphnet.net/electronique/psx_adaptor/Playstation.txt
https://docs.espressif.com/projects/esp-idf/en/v4.2.3/esp32/api-reference/peripherals/spi_master.html#overview-of-esp32-s-spi-peripherals
https://www.whizzbizz.com/en/ps2.controller
https://github.com/MyArduinoLib/Arduino-PS2X-ESP32/blob/master/examples/PS2X_Example_ESP32/PS2X_Example_ESP32.ino
SPI2 SPI3
Pin name GPIO #
CS0* 15 5
SCLK 14 18
MISO 12 19
MOSI 13 23
QUADWP 2 22
QUADHD 4 21
PS2 Controller Pinout (Facing)
1 2 3 4 5 6 7 8 9
Data CMD Vibr Gnd VCC Attn CLK NC Ack
VCC: 3.3V – 5V
Vibr: 7.6V – 9V
PS2X pinout
- define PS2_DAT 19
- define PS2_CMD 23
- define PS2_SEL 5
- define PS2_CLK 18
PS2 Controller <–> Adapter header <–> Black project box
Black project box –> ESP32
–> Battery (4 x 18650 @ 14.8)
–> 5V LDO 3.3V regulator LD1117V33
–> 1 x 0.1 uF ceramic cap
–> 9V regulator L7809A / L7809CV
–> 1 x 0.1 uF ceramic cap
–> Antenna?
–> Switch
–> LED (Green?)
–> LED (Red when V is less than 7.2V)
18650 & Lipo
3.7V * 1 = 3.7V
3.7V * 2 = 7.4V
3.7V * 3 = 11.1V
3.7V * 4 = 14.8V