Use of PS5 Controller with Teensy 3.5

Status
Not open for further replies.

mjs513

Senior Member+
Hi all

I am looking at using a PS4 controller with the teensy 3.5 but not sure of best approach. The first thing I looked at was using the pro-mini host adapter with the USB Host Shield Library that I found on PRJC but can't seem to find the mini-shield (have to check a little more). The second thing I was wondering is if I need an adapter at all. The 3.5 does seem to have a second usb = or am I reading the spec incorrectly. If so could I still use the ps4 lib with a Bluetooth adapter attached directly.

Any help would be appreciated in getting this started.

Thanks
Mike
 
The 3.5 does not have the second USB. The 3.6 does have it. Unfortunately, the 3.5 uses the same PCB as the 3.6, so the 5 pins for the second USB (on the inside of the 3.6) are still marked with USB pins. Instead the 3.5 offers two more ground pins, two additional pins that can only be used for analog input (A25 and A26) and the 5th pin is not used.
 
If you want to try on a 3.6, you would still need to write a USB driver for the Teensy anyway. I guess several people would appreciate to have this feature (there have been several posts on this topic in the past, not specifically for PS4 though), but it is currently not supported.
 
Michael

Thank you for that clarification. Looking at the backside of the 3.5 it showed those 2 pins as D+ and D-. When I looked at the posted schematic for the 3.5/3.6 it showed the that they shared the D+ and D- pins to the MCU. So the next question is if I can get a hold of pro mini usb would the usb lib work on the 3.5?

Thanks
Mike
 
The D-/D+ pads at the front of the 3.2/3.5/3.6/LC are the D-/D+ pins for the micro-USB jack that connects the Teensy to a PC or power supply. As far as I know, this USB is only usable as a slave USB (i.e. you need to connect it to a USB master like a PC). This is primarily useful if you want to use a different USB connector for the Teensy, or if your micro USB has broken off.

On the 3.6, there are a series of 5 pins on the inner row on the left side if the micro USB jack is at the top. These can provide a secondary USB master that can control devices. This would be the device you connect to the PS4 controller. As others have said, the software to run a USB master is not in finished state (I think there are works in progress to bring it up, but I haven't kept track of it). On Arduinos and other Teensys, there is a add-on board that provides USB master support, and there is software to use this board.

As I mentioned the PCB is shared between the 3.5 and 3.6, and it is unfortunate for 3.5 users that for the 3.5 the 5 pins that are the USB master on the 3.6 are labeled for USB. Instead on the 3.5, these pins provide two extra grounds, two extra analog input only pins, and one pin that is not connected. I would have to imagine that the PCB is shared as a matter of cost savings, since PJRC would not have to commission two separate boards.
 
@squeeek = I did find a source for the pro mini usb host shield (tkelectronics in Denmark). If it works with the USB host library (it does support the teensy 3.x) its a starting point. Its probably the easiest approach. If I have to make modifications it will be another project :)
 
@MichaelMeissner. Thanks for additional information. Would have been nice if the 3.5 had the usb master but I stuck with it now. I am using 5v SR-04 and Sharp distance sensors which are 5v and the 3.5 makes it easier for the connections plus the motor controller plus servos. I ordered the usb master board from tkelectronics and a ps4 controller. Will keep you all posted if it works with the 3.5.
 
@MichaelMeissner. Thanks for additional information. Would have been nice if the 3.5 had the usb master but I stuck with it now. I am using 5v SR-04 and Sharp distance sensors which are 5v and the 3.5 makes it easier for the connections plus the motor controller plus servos. I ordered the usb master board from tkelectronics and a ps4 controller. Will keep you all posted if it works with the 3.5.

I suspect it is due to the characteristics of the K64 chip vs. K66.
 
@mjs513 this is good news then ! I was talking about using the embedded USB master on 3.6, for which there is no gaming device driver yet. But if a shield and the appropriate library can do the trick for you, this is great ! Please keep this thread alive with your progress on your project as some other people might be interested in the results for their own projects ;-)
 
Ok just finished soldering up the usb host shield (mini version) and connected to the Teensy 3.5. Used same connection methodology as posted at https://www.pjrc.com/teensy/td_libs_USBHostShield.html. Ran the qc sketch with a dualshock 4 controller attached and no issues. Next test was running the PS4USB example sketch. Guess what - it worked like a charm right out to box. The touchpad worked, pressing the buttons got me different controller vibrations, option button got me pitch and roll, and of course the joy sticks worked fine as well.

Waiting for a Bluetooth dongle to run the Bluetooth version. Will update this post when I test the dongle out.
 
Status
Not open for further replies.
Back
Top