I got a powerbank powering a raspberry pi over the micro usb port of the raspi. The usb cable I use, has only to lines, Vcc and GND. When the powerbank is off due inactivity and I connect the raspberry pi, the powerbank does not turn on by itself, only if it is turned on by its hardware button. But when I connect my smartphone to the powerbank, it turns on automatically. So my question is, how does the powerbank detect when an USB device gets connected and how can I make it to automatically detect my raspberry pi on connection?

Thanks for all help.

  • \$\begingroup\$ Are you using the same cable to connect the phone? \$\endgroup\$
    – Eugene Sh.
    Commented Jul 22, 2016 at 16:43
  • \$\begingroup\$ Nop, I am using a cable with "all" lines. Maybe there is a pullup resistor on a data line \$\endgroup\$
    – user117503
    Commented Jul 22, 2016 at 16:50
  • 1
    \$\begingroup\$ Have you tried it when your phone is fully switched off? \$\endgroup\$
    – Andy aka
    Commented Jul 22, 2016 at 16:52
  • \$\begingroup\$ So you just answered your question. Try to use the two wires cable, and it will probably won't switch on. \$\endgroup\$
    – Eugene Sh.
    Commented Jul 22, 2016 at 16:53
  • 1
    \$\begingroup\$ But the microusb port of the rpi has afaik no data line. Therefore it does not work with a cable with 4 lines (I have checked that). \$\endgroup\$
    – user117503
    Commented Jul 22, 2016 at 17:00

1 Answer 1


Usb power banks tend to detect in two ways. One is by the pull up and pull down resistance on the data lines. As the RPI power input has no data lines connected, it won't detect a change of state. The other is by how much current is pulled once the plug is connected. If the RPi doesn't pull enough for the bank, the bank will think it's done and goes to sleep.

  • \$\begingroup\$ Thx, the raspberry pi pulls about 600mA with connected hardware, so I guess I have a powerbank detecting the pull up and down resistance. \$\endgroup\$
    – user117503
    Commented Jul 22, 2016 at 17:24
  • \$\begingroup\$ Are you sure it pulls that at start up? The detection on these are pretty quick. Do you have the same effect when you plug in a fully charged phone? \$\endgroup\$
    – Passerby
    Commented Jul 22, 2016 at 17:27
  • \$\begingroup\$ Could not test with fully charged phone, but you are right, the raspberry pi takes much less current at startup. \$\endgroup\$
    – user117503
    Commented Jul 22, 2016 at 17:43

Your Answer

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