USB connector for new platforms

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
Post Reply
User avatar
jgriessen
Posts: 191
Joined: Mon Sep 29, 2014 4:20 pm
Contact:

USB connector for new platforms

Post by jgriessen » Mon Nov 28, 2016 11:13 pm

I notice the pyboard uses a type AB micro USB 2.0 connector, (rectangular opening), instead of type B.
As I have read about USB specs, a cable pin shunted to ground signals that cable end is host mode or peripheral mode, and the type B connector is supposed to be peripheral mode -- but is it really?

As I was asking for type AB connectors to build a new platform around the STM32F401CC with 256k of RAM,
a Taiwan company said, "The use of USB AB type is less common these days and thus we’ve stop the production due to its low demand.
Attached is waterproof (IP67 rating) micro usb.". That connector is type B (supposed to be for peripherals).

So, do cell phones not care about USB host mode, just doing that special transfer mode from android?

Is type AB still what to use for practicality?
Are there micro USB 2.0 cables made for host to peripheral that use type B on both ends?
John Griessen blog.kitmatic.com

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: USB connector for new platforms

Post by dhylands » Tue Nov 29, 2016 12:01 am

If you want to support OTG then you want to be able to use either type of connector.

You can get cables with a Micro B on both ends. I've not used one before, but I believe that one end will have the ID pin grounded, and one end will be +ve.
http://www.amazon.com/Meenova-Mobility- ... 00ZYB44UW/

And you can get Micro B on one end and USB female on the other (which is what you would use if you wanted the pyboard to look like a host).
http://www.amazon.com/CNE28224-Female-M ... 0081CRXGI/

To use host mode on the pyboard, there are pads on the back of the board where you can solder on a power switch
http://www.digikey.ca/product-detail/en ... ND/2062462

User avatar
jgriessen
Posts: 191
Joined: Mon Sep 29, 2014 4:20 pm
Contact:

Re: USB connector for new platforms

Post by jgriessen » Tue Nov 29, 2016 12:16 am

I came across this USB OTG update from Synopsys: https://www.synopsys.com/Company/Public ... 015q3.aspx

"Creating a standard high-speed device with Type-C connectivity is easy to implement with a standard USB 2.0 PHY.

Modify or design the PCB and enclosure for a Type-C receptacle
Route USB D+/D- from the PHY to both pins A6/A7 and B6/B7 on the Type-C receptacle
Connect USB Vbus and GND to all Vbus and GND pins on the receptacle
Leave the ID pin on the PHY floating
Connect two pulldown resistors (Rd) with nominal value 5.1kOhm to CC1 and CC2

Just as with a standard-B or micro-B device, USB operation starts when Vbus is detected. "

Sounds like using the latest USB connectors will be possible with the same MCU and two pulldown resistors...

For now, I guess type AB is the way. They show how to do host mode with type C also, but it's not simple. It *IS* low power aware though:

"Unlike a standard-A host, Vbus is not provided to the receptacle at all times. Vbus can only be provided when a device is attached. After Vbus is provided, normal USB device detection, high-speed chirp and USB operation will commence. Mobile devices will save power as they do not need to enable Vbus at all times."
John Griessen blog.kitmatic.com

User avatar
jgriessen
Posts: 191
Joined: Mon Sep 29, 2014 4:20 pm
Contact:

Re: USB connector for new platforms

Post by jgriessen » Tue Nov 29, 2016 4:57 pm

Does anyone use micro USB 3.0 connectors and cables with two side by side -- one backwards compatible to 2.0 micro-B?

Some web sites predict that is dropped in favor of micro type C, even though no phones use either that I've seen.
John Griessen blog.kitmatic.com

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: USB connector for new platforms

Post by dhylands » Tue Nov 29, 2016 5:56 pm

I have a couple of USB 3 hard drives, and my newer Saleae Logic Analyzer has a USB 3 connector as well.

User avatar
jgriessen
Posts: 191
Joined: Mon Sep 29, 2014 4:20 pm
Contact:

Re: USB connector for new platforms

Post by jgriessen » Tue Nov 29, 2016 8:41 pm

my newer Saleae Logic Analyzer has a USB 3 connector as well.
That sounds like something that might work in backward compatible USB 2.0 mode. Have you tried that -- using a cable of micro USB 2.0 type-B to USB-A 2.0 plugged into your computer and the micro USB 2.0 plug into the USB 3.0 receptacle?
John Griessen blog.kitmatic.com

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: USB connector for new platforms

Post by Roberthh » Tue Nov 29, 2016 8:54 pm

I just tried it with my USB drive & it works.

User avatar
jgriessen
Posts: 191
Joined: Mon Sep 29, 2014 4:20 pm
Contact:

Re: USB connector for new platforms

Post by jgriessen » Tue Nov 29, 2016 9:14 pm

Thanks Roberthh,
I'm getting the idea that the twin connectors have been put into products that need USB 3.0 speed
and can ship with the cable for customers to use, and that does not include cell phones or tablets.
Type C is still a ways off from being the mainstream cable laying around, so I'm going to use micro type-AB
rectangular connectors on my new building block platform based on STM32F401CC with 256k flash.
John Griessen blog.kitmatic.com

Post Reply