4
\$\begingroup\$

I cut the wire of a USB keyboard to supply 5V power to my Arduino. I expected to find Red wire for +5V, Black for GND, White for D-, and Green for D+. However, there is no Black, instead, there is a yellow wire! (I cut off the mouse cable too, but it has the same colors.)

I suspect that yellow wire is playing a role of black. So I connected the yellow wire to a LED's short leg (cathode) and red wire to LED's longer leg (anode). But, no light was emmitted.

When I tried yellow wire as -5V and white one for +5V, it works, but it is blinking. I understand this to mean that this is not stable power.

If I want to take stable 5v power from a USB port to illuminate an LED, what colors should I use?

\$\endgroup\$
  • \$\begingroup\$ Do you know how big current your Arduino needs? USB 2 and lower should provide up to 100 mA (150 for USB 3) with no problems, but if Arduino needs more, it could have problems with current limiting form the motherboard or risk motherboard just cutting off the power. Also, if you don't have a multimeter, get one! It's the most basic tool and the cheapest will be better than none. \$\endgroup\$ – AndrejaKo Jun 8 '11 at 14:06
  • 1
    \$\begingroup\$ Check if the yellow cable is going to PIN1 and Black to PIN4. Sometimes the motherboard needs a load on the Data to give full power otherwise it is just checking the port if device is attached or not. Maybe it think no device is connected and pulses the ports. Where do you connect Data to? \$\endgroup\$ – Piotr Kula Jun 8 '11 at 14:32
  • \$\begingroup\$ Make sure you have a current limiting resistor on your LED. \$\endgroup\$ – Kellenjb Jun 8 '11 at 15:08
10
\$\begingroup\$

The cable colours will vary from cable to cable. Use a continuity checker or ohmmeter to determine which wire is connected to which pin on the plug.

http://pinouts.ru/Slots/USB_pinout.shtml

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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