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

Thread: T4.1 ETH+USB combo breakout testing

  1. #1
    Senior Member
    Join Date
    Mar 2016
    Posts
    198

    T4.1 ETH+USB combo breakout testing

    I've designed a breakout board for a combo ethernet and USB A jack. It seems to work fine for ethernet but I'm scratching my head about the easiest way to test the USB host capability. I've been looking at various posts here but most options seem fairly complex. I would appreciate any suggestions on a fairly simple way to test.

    By the way, I will make this available on OSHPark if anyone wants.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	picture.png 
Views:	12 
Size:	54.6 KB 
ID:	20597   Click image for larger version. 

Name:	IMG_20200614_135357.jpg 
Views:	16 
Size:	190.8 KB 
ID:	20598  


  2. #2
    Senior Member
    Join Date
    Aug 2017
    Posts
    305
    Quote Originally Posted by PhilB View Post
    I've designed a breakout board for a combo ethernet and USB A jack. It seems to work fine for ethernet but I'm scratching my head about the easiest way to test the USB host capability. I've been looking at various posts here but most options seem fairly complex. I would appreciate any suggestions on a fairly simple way to test.

    By the way, I will make this available on OSHPark if anyone wants.
    Probably the easiest way would be to use the example programs in the USBHost_t36 library. Maybe try a USB keyboard or mouse.

    Edit: I would be interested this. Looks like it take minimal soldering of those dinky little SMT parts
    Last edited by wwatson; 06-14-2020 at 09:32 PM. Reason: Added infomation

  3. #3
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,831
    Quote Originally Posted by PhilB View Post
    I've designed a breakout board for a combo ethernet and USB A jack. It seems to work fine for ethernet but I'm scratching my head about the easiest way to test the USB host capability. I've been looking at various posts here but most options seem fairly complex. I would appreciate any suggestions on a fairly simple way to test.
    The simplest way as wwatson says is to use USBHost_t36 -> examples -> Serial -> Mouse -> Mouse.ino. Plug in a 5 pin cable that has a USB B port on the other side, such as the cable PJRC.COM sells, and hook up a standard USB wired mouse. Move the mouse around and you should see the movement on the normal USB serial output.

    Quote Originally Posted by PhilB View Post
    By the way, I will make this available on OSHPark if anyone wants.
    I would be interested.

    I would imagine that an improvement might be to provide an additional pin-out to allow powering the USB host with separate 5v power (similar to the solder pads under the Teensy 3.6, but preferably one that can be easily switched).

    And I suspect several people would like a bigger board that had through hole connections for attaching the resistors and capacitors. I'm just about to try and solder some SMT resistors and capacitors (I've done the memory chips with their extended legs, but I haven't yet done it with no legs).

    But good work!

    A different approach might be a PCB that fits directly on top of a Teensy, so you don't need the cable between the Teensy and the Ethernet/USB.

  4. #4
    Senior Member
    Join Date
    Mar 2016
    Posts
    198
    Thanks. I went and got USBHost_t36 off github and installed it. Had trouble compiling the simple test program (examples/test/test.ino) because of undefined references (attachRawPress and attachRawRelease) and a missing Serial.begin() but once I got those straightened out, it seems to work ok with a keyboard. No heavy testing on it as yet...

    I need to do a little documentation (mostly BOM info) and will make it available, probably in about an hour.

  5. #5
    Senior Member
    Join Date
    Mar 2016
    Posts
    198
    A TH version would be pretty simple. Will consider it. Though, to be honest, 805 caps and resistors are pretty easy to solder with a pair of tweezers to hold them. Personally, I find TH actually 2X harder than SMD.

    The alternate power version - I have a header to disconnect VUSB from the plug. I think you are asking for a separate header (+5V and gnd) to feed the plug. Easy enough to do.

    By the way, I just don't see how this could be made to mount on top of the T4.1. Apart from the issue of finding pinheaders that would allow enough clearance (which, as I think you well know, is needle vs haystack), the size makes a stable mount almost impossible. The clearance issue is that the USBmicro has to clear which means about 300 mills of extra height. Better to integrate it into a base board (which I am doing for my CNC controller). If someone has a way to mount it on the T4.1, I'd be happy to consider.

  6. #6
    Senior Member
    Join Date
    Apr 2020
    Location
    DFW area in Texas
    Posts
    118
    Quote Originally Posted by PhilB View Post
    I need to do a little documentation (mostly BOM info) and will make it available, probably in about an hour.
    PhilB:

    This is excellent, thanks !! One slight mod that I might suggest: make the board a little wider & provide corner mounting holes to make it easy to incorporate into a box of some sort using studs or stand-offs.

    Thanks much for creating this !! I would be interested !!

    Mark J Culross
    KD5RXT

  7. #7
    Senior Member
    Join Date
    Apr 2020
    Location
    DFW area in Texas
    Posts
    118
    PhilB:

    BTW, is the USB connector on your new board reversed or is the cable in your picture connected backwards ?? The double-ground on the T4.1 is farthest away from the microUSB connector. Per your layout picture, the double-ground on your new board is also farthest away from the connectors. However, the light blue wires in your cable do not seem to connect in that same relationship ?!?

    Mark J Culross
    KD5RXT

  8. #8
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,831
    Quote Originally Posted by PhilB View Post
    A TH version would be pretty simple. Will consider it. Though, to be honest, 805 caps and resistors are pretty easy to solder with a pair of tweezers to hold them. Personally, I find TH actually 2X harder than SMD.

    The alternate power version - I have a header to disconnect VUSB from the plug. I think you are asking for a separate header (+5V and gnd) to feed the plug. Easy enough to do.

    By the way, I just don't see how this could be made to mount on top of the T4.1. Apart from the issue of finding pinheaders that would allow enough clearance (which, as I think you well know, is needle vs haystack), the size makes a stable mount almost impossible. The clearance issue is that the USBmicro has to clear which means about 300 mills of extra height. Better to integrate it into a base board (which I am doing for my CNC controller). If someone has a way to mount it on the T4.1, I'd be happy to consider.
    One way would be a PCB that mounts underneath the Teensy, connecting the 6 pins from the ethernet, 5 pins from USB host, VUSB, and VIN. These would be soldered directly to the Teensy with normal male pins. They bring out to one of the sides the pins, and you have mounting holes for the combo board you are using, and any necessary capacitors, resistors, etc.

    I could imagine a 5v connection (either 2 2.54mm pins, a USB micro-B header, or a 5.5mm x 2.1mm power jack), and two switches. One switch is between VUSB and the external power connection and it connects to VIN. The other would be between VIN and the external power connection and it connects to the USB Host power pin. That way you can switch to use VUSB to power the Teensy, but external power for USB host. Or you can power both with VUSB. Or you can power both with external power.

    With stacking headers, the stacking headers are tall enough that it would not interfere with the normal USB micro-b connection, and you could just have the ethernet/usb directly on top. But that can be problematical if you want something like the audio shield mounted on top of the Teensy.

  9. #9
    Senior Member
    Join Date
    Mar 2016
    Posts
    198
    Quote Originally Posted by kd5rxt-mark View Post
    PhilB:

    BTW, is the USB connector on your new board reversed or is the cable in your picture connected backwards ?? The double-ground on the T4.1 is farthest away from the microUSB connector. Per your layout picture, the double-ground on your new board is also farthest away from the connectors. However, the light blue wires in your cable do not seem to connect in that same relationship ?!?

    Mark J Culross
    KD5RXT
    Sharp eye! Yes, I've fixed it in the next rev which I showed in the original post.

  10. #10
    Senior Member
    Join Date
    Mar 2016
    Posts
    198
    Quote Originally Posted by MichaelMeissner View Post
    One way would be a PCB that mounts underneath the Teensy, connecting the 6 pins from the ethernet, 5 pins from USB host, VUSB, and VIN. These would be soldered directly to the Teensy with normal male pins. They bring out to one of the sides the pins, and you have mounting holes for the combo board you are using, and any necessary capacitors, resistors, etc.

    I could imagine a 5v connection (either 2 2.54mm pins, a USB micro-B header, or a 5.5mm x 2.1mm power jack), and two switches. One switch is between VUSB and the external power connection and it connects to VIN. The other would be between VIN and the external power connection and it connects to the USB Host power pin. That way you can switch to use VUSB to power the Teensy, but external power for USB host. Or you can power both with VUSB. Or you can power both with external power.

    With stacking headers, the stacking headers are tall enough that it would not interfere with the normal USB micro-b connection, and you could just have the ethernet/usb directly on top. But that can be problematical if you want something like the audio shield mounted on top of the Teensy.
    Some good ideas there. For now though, I think I will just finish this one up. Will consider a base board approach for later. The problem with a base board is that it screams for lots of features! I'm not opposed, just don't have a huge amount of time right now and don't want to do something fractionally-assed.

  11. #11
    Senior Member
    Join Date
    Apr 2020
    Location
    DFW area in Texas
    Posts
    118
    Quote Originally Posted by PhilB View Post
    I think I will just finish this one up.
    Did mounting holes make the cut ??

    Mark J Culross
    KD5RXT

  12. #12
    Senior Member
    Join Date
    Mar 2016
    Posts
    198
    OK, Here's the OSHPark link https://oshpark.com/shared_projects/5LjFDf2O
    Ugly BOM included in the link (I can't get their version of markdown to work for me).

    Slightly prettier BOM here:
    Part Value Package Mouser DigiKey
    C1 1nF 2KV C1206 791-1206B102M202CT 478-1206GC102MAT1ACT-ND
    C2 100nF C0805 710-885012207072 399-1177-1-ND
    C3 1 uF C1206 80-C1206C105M3R 1276-3086-1-ND
    C4 100nF C0805 710-885012207072 399-1177-1-ND
    C5 1 uF C1206 80-C1206C105M3R 1276-3086-1-ND
    J1 0821-1X1T-36-F BEL MAGJACK 530-0821-1X1T-36-F 507-1424-ND
    J2 2X3-2MM 2X3-2MM 855-M22-202030 849-1000-ND
    R1 1M R0805 652-CMP0805-FX-1004L 311-1.00MCRCT-ND


    Here's the schematic:
    Click image for larger version. 

Name:	schematic.jpg 
Views:	30 
Size:	78.2 KB 
ID:	20599
    Last edited by PhilB; 06-15-2020 at 12:23 AM.

  13. #13
    Senior Member
    Join Date
    Apr 2020
    Location
    DFW area in Texas
    Posts
    118
    Quote Originally Posted by PhilB View Post
    PhilB:

    Thanks for making this available.

    Mark J Culross
    KD5RXT

  14. #14
    Senior Member
    Join Date
    Mar 2016
    Posts
    198
    Quote Originally Posted by kd5rxt-mark View Post
    Did mounting holes make the cut ??

    Mark J Culross
    KD5RXT
    Sorry, my internet connection died yesterday afternoon and just got it back.

    Mounting holes are worthwhile though it requires a wider board and the MagJack presents an issue for screw head clearance. I made a small mod to the one that's on OSHPark - slots by the MagJack and holes at the end. The slots and holes are 1/8". I'll upload it if you want. $8.35.
    Click image for larger version. 

Name:	wide.jpg 
Views:	6 
Size:	50.0 KB 
ID:	20609

  15. #15
    Senior Member
    Join Date
    Apr 2020
    Location
    DFW area in Texas
    Posts
    118
    PhilB:

    Thanks, but no need to go to any extra trouble. I don't have a specific project in mind. So, for now, a loose board connected with "flying leads" is sufficient . . . don't need to mount anything in a box . . . yet.

    Thanks again,

    Mark J Culross
    KD5RXT

  16. #16
    Senior Member
    Join Date
    Mar 2016
    Posts
    198
    Not really any trouble. Here it is. https://oshpark.com/shared_projects/jfk7KJcO
    Same BOM and schematic as this one

    Cavaet, I haven't tested this one but expect it will work the same as the narrow one.

  17. #17
    Senior Member
    Join Date
    Apr 2020
    Location
    DFW area in Texas
    Posts
    118
    PhilB:

    Excellent, thanks !! PCB order has been placed. Now off to order parts. I'll let you know how it goes . . .

    Mark J Culross
    KD5RXT

  18. #18
    Senior Member
    Join Date
    Apr 2020
    Location
    DFW area in Texas
    Posts
    118
    Quote Originally Posted by kd5rxt-mark View Post
    PhilB:

    Excellent, thanks !! PCB order has been placed. Now off to order parts. I'll let you know how it goes . . .

    Mark J Culross
    KD5RXT
    Parts rx'd earlier this week & notification rx'd from OshPark that PCBs went off to FAB yesterday . . . looking forward to testing soon !!

    Mark J Culross
    KD5RXT

  19. #19
    Senior Member
    Join Date
    Mar 2016
    Posts
    198
    Let me know how it goes. I'm interested in any feedback or suggestions.

  20. #20
    Senior Member
    Join Date
    Apr 2020
    Location
    DFW area in Texas
    Posts
    118
    Rx'd notification from OshPark that PCBs have shipped. Could very well be testing early next week . . .

    Mark J Culross
    KD5RXT

  21. #21
    Senior Member
    Join Date
    Apr 2020
    Location
    DFW area in Texas
    Posts
    118
    Boards were received & I finally made time to populate & connect them (which forced a refresh on my surface mount soldering skills - I usually do my SM soldering under a stereo microscope at work with a fine tip iron, but since I'm WFH right now, I had to do this assembly without access to any of the nice tools that I usually have at my disposal !!). The attached picture shows that I hard mounted one of the boards to one of my T4.1s (with an Audio Shield under the T4.1, unrelated to this activity) for testing purposes. Successfully set it up to DCHP an IP address using the NativeEthernet library & it's actively serving out a simple webpage. Works like a champ !!

    Thanks again,

    Mark J Culross
    KD5RXT

    Click image for larger version. 

Name:	20200703_125448[1].jpg 
Views:	14 
Size:	55.1 KB 
ID:	20845

  22. #22
    Senior Member
    Join Date
    Mar 2016
    Posts
    198
    Excellent - have you tested out the USB connection yet?

  23. #23
    Senior Member
    Join Date
    Apr 2020
    Location
    DFW area in Texas
    Posts
    118
    @PhilB: Rgrgr. First thing I did was program it with my TeensyMIDIPolySynth project & the USBhost likewise works like a champ, allowing the same functionality (hooking up & using my MIDI keyboard) as the typical USBhost adapter cable (not the new ethernet MagJack) available on the Teensy website (which I was previously using) !! Probably won't merge my Frankenstein mashup into anything permanent, but it is certainly excellent for prototyping & testing, leaving the other two PCB copies from OshPark (which I also fully soldered up) as a solution looking for a project to serve in !!

    Mark J Culross
    KD5RXT

Posting Permissions

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