Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 6 of 6

Thread: Teensy 3.2 USB Host Mode and USB library status

  1. #1
    Junior Member
    Join Date
    Oct 2019
    Posts
    8

    Teensy 3.2 USB Host Mode and USB library status

    Hello,

    I am trying to build an accessory for the Vive Tracker and require the USB connection. From what I can tell I need USB host mode and USB HID feature reports for communication. I was reading very conflicting information about this and how to get it to work. It may be very simple and I just don't know enough or it might be near impossible for a single human being. I would really like some clarification about the possibility of this project with a Teensy 3.2 and the state of USB libraries for the Teensy and where to find and use them. You can also reference me a documentation I should read if the information is in there and you don't want to explain it yourself.

    I will be very happy for every answer I get

    Thanks, SkryptX

  2. #2
    Senior Member vjmuzik's Avatar
    Join Date
    Apr 2017
    Location
    Florida
    Posts
    425
    Here is a link to the current library for this: https://github.com/felis/UHS30
    Link to forum page: https://forum.pjrc.com/threads/28173...VIEW-AVAILABLE
    Of note, Teensy 3.2 only has one USB port while a Teensy 3.6 or 4.0 have 2, what this means is you canít connect it to a computer and use it in host mode at the same time.

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,813
    Quote Originally Posted by SkryptX View Post
    or it might be near impossible for a single human being.
    As far as I know, Andrew (author of UHS30) is the only person in the entire world who has ever made host mode work on Teensy 3.2. He used some pretty substantial hardware hacks to get a workable dev system to do it.

    If you have to ask, I'm going to go with "near impossible" as the answer.

    Do yourself a huge favor and get a Teensy 3.6 (the easiest) or Teensy 4.0 (connecting to bottom side pads & DIY on 5V current limiting) which do support USB host mode. Many people have successfully built projects with those boards using host mode. Andrew's UHS30 and my USBHost_t36 both support Teensy 3.6. As far as I know, UHS30 does not yet support Teensy 4.0. So if you want the easiest path with the most software choices, get a Teensy 3.6. Also get this cable.

    Seriously, just save that Teensy 3.2 (and your sanity) for another project.

  4. #4
    Junior Member
    Join Date
    Oct 2019
    Posts
    8
    This is very sad to hear :/

    One of the main reasons I picked the 3.2 over any other is because of the low cost, the small form factor (3.6 is kinda too big already) and the good availability. And having only one USB connector is not a big deal as long as I can develop on it. The firmware, once it is done and works, has to be never touched again and it mainly maps like 5 interrupts to 5 fixed size and static USB commands, so no complex software once USB works.

    What would be required to make USB host mode work in theory? I read something about the 150uF capacitor on the bottom and so on. Or better use an OTG-Adapter or what is the deal?

    Alternatively, would it also be possible to use a bit-banging USB-implementation like on the low-end AVRs just over the digital pins?

    Or do you see any other alternatives?

  5. #5
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,368
    Well if size is the primary issue, bear in mind the Teensy 4.0 is the same size as the 3.2, though you would need to solder two wires to get the D-/D+ pads underneath the Teensy. If you have already laid out the board with the T3.2, you may need adjust things for the 4.0 as the main things (Serial1, I2C0, SPI0, analog pins) are in the same location, but some of the secondary things are in different locations.

    If you can tolerate an extra 0.2" width (but with the same length), you might want to look at the blackketter PCB which brings out all of the pins underneath the Teensy in a parallel row, and in particular, brings out the USB in 5 position slot like the 3.6. The Teensy 4.0 is roughly the same cost as the 3.2.



    Do read the thread to see what the issues are for the thinner board, and also what kind of protection is needed for the USB.

  6. #6
    Junior Member
    Join Date
    Oct 2019
    Posts
    8
    Size is one factor, but not THAT much of a problem. Imagine you want to mount this board on a flash light for example. The 3.6 is too long and very unhandy for that. The 3.2/4 is about what I can reasonably build upon and getting any smaller than that would require a custom PCB and I'm just not gonna do that. Also... If it weren't for USB I would have picked a ATMega8 or something like that since it really does not need to compute anything at all... So I ended up here.

    The Teensy 4.0 is kinda out of question because it is not available in my country and shipping it without waiting 3 weeks costs like 100$.

    So I'm really out of ideas. Probably have to search for other chips and boards that could do this.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •