0

I'm designing a microcontoller wherein I want to use conventional chargers or draw power from USB port so I used a type C micro USB.

In my initial design, I'm assuming that I only need the Supply line from the USB and ground. so what I did was I connect the Supply line to a regulator via a bypass cap, then I'd shorted all the other pins to ground.

I've found that that is wrong (got my line smoking) and I'm now changing my design.

Can I ask what is the best way to draw power from USB? I mean what should I do on the D-, D+ and ID lines? A Google search shows different circuits like voltage dividers for D- and D+ or shorting them as a Dedicated Charging Port.

However, most of the circuits I'm finding involves having another chip to manage this. I'm not making something like a charger, just want to use the USB to power my device.

Is there any possible way to draw power from USB without any sophisticated circuitry? Will shorting the D- and D+ lines and leaving the ID line hanging work?

My last resort would be to just use a DC jack. But that's a shame since micro USB is almost everywhere.

noobiejp
  • 56
  • 4
  • USB controllers usually enable downstream power when a downstream device is detected (by having the D lines pulled- which way I do not currently recall). – Peter Smith Aug 08 '18 at 14:53
  • You need to make your mind up. Making "Type-C" is different from making "micro-USB". It is not clear from your question if you want to feed your "microcontroller" from external chargers, or you want your "microcontroller" to suplly power. Which one is it? Or both, called "dual-role-power"? – Ale..chenski Aug 08 '18 at 15:15
  • @AliChen sorry for confusing. It should have been just micro-USB. And I want to feed my MCU from external chargers, not the other way around. – noobiejp Aug 08 '18 at 15:51
  • @PeterSmith - Incorrect. USB controllers usually have 5v VBus enabled *unless* something trips a hopefully present and hopefully resettable overcurrent protection. Your idea would preclude bus powered devices as how would they signal by pulling *up* a signal line without VBus? – Chris Stratton Aug 08 '18 at 15:58
  • @ChrisStratton; See https://www.maximintegrated.com/en/app-notes/index.mvp/id/4803 – Peter Smith Aug 08 '18 at 16:17
  • @PeterSmith how exactly are you claiming that huge document supports your claim? Whatever you think you are seeing is a misreading, as **your claim is false**, something proven by all the silly gadgets that use USB power without connecting the data lines, and because as previously mentioned, a bus powered device **could not pull up a signal line unless the host were already sourcing VBus**. If you still don't believe, cut a cable in half, connect your voltmeter, and plug it in. – Chris Stratton Aug 08 '18 at 16:30

1 Answers1

1

The way to do this for a regular USB is to only use the +5V line and ground, do nothing (leave them floating) with the data lines, they are connected to a digital line driver on the other end.

If you need something other than +5V use a regulator to lower the voltage:

enter image description here

Source: http://www.wb5rvz.com/sdr/ensemble_rx_ii_vhf/02_ps3.htm

Voltage Spike
  • 75,799
  • 36
  • 80
  • 208
  • Just to be clear, I should leave the other lines floating? – noobiejp Aug 08 '18 at 15:52
  • @noobiejp Yes. Otherwise bad things will happen – scotty3785 Aug 08 '18 at 15:59
  • But you need to make sure that the device doesn't consume more than 500 mA, for technical correctness. If the device needs more, it should implement some intelligence to determine "charger signature" on D+/D- wires. – Ale..chenski Aug 08 '18 at 16:27
  • @AliChen Though I'm quite convinced that I won't be drawing more than 500 mA from the line, for sanity's sake, what would be the simplest way to tell whatever USB port I'm connected to, that they should just be charging? Will shorting the D lines be enough to tell the port to be a DCP? I will probably connect this device on wall chargers for power through this port. – noobiejp Aug 08 '18 at 17:19
  • 1
    @noobiejp, you are confusing "charger port signature" with detection of the signature. Shorted D+/D- is a property of a charger/port, one of variants, your job would be to detect it. You don't "tell the port", the port "tells you". See https://electronics.stackexchange.com/a/271681/117785 – Ale..chenski Aug 08 '18 at 17:26