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.

  • \$\begingroup\$ 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). \$\endgroup\$ Commented Aug 8, 2018 at 14:53
  • \$\begingroup\$ 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"? \$\endgroup\$ Commented Aug 8, 2018 at 15:15
  • \$\begingroup\$ @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. \$\endgroup\$
    – noobiejp
    Commented Aug 8, 2018 at 15:51
  • \$\begingroup\$ @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? \$\endgroup\$ Commented Aug 8, 2018 at 15:58
  • \$\begingroup\$ @ChrisStratton; See maximintegrated.com/en/app-notes/index.mvp/id/4803 \$\endgroup\$ Commented Aug 8, 2018 at 16:17

1 Answer 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

  • \$\begingroup\$ Just to be clear, I should leave the other lines floating? \$\endgroup\$
    – noobiejp
    Commented Aug 8, 2018 at 15:52
  • \$\begingroup\$ @noobiejp Yes. Otherwise bad things will happen \$\endgroup\$
    – scotty3785
    Commented Aug 8, 2018 at 15:59
  • \$\begingroup\$ 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. \$\endgroup\$ Commented Aug 8, 2018 at 16:27
  • \$\begingroup\$ @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. \$\endgroup\$
    – noobiejp
    Commented Aug 8, 2018 at 17:19
  • 1
    \$\begingroup\$ @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 electronics.stackexchange.com/a/271681/117785 \$\endgroup\$ Commented Aug 8, 2018 at 17:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.