usb connector - use the "5th" wire

Hi Guys,

Im making an handheld device with buttons and lights. This is connected with an usb to the "main device"

things i need to send/recieve

5 v
data (to LEDs from main)
data (from buttons to main)

now i like to hook up a LED when you plug the usb in the LED wil get on.

is it possible to use the "5th wire" for this?

Mini/Micro-USB-leads do have 5 wires, although the cable does not carry 5 wires.

The 5th pin is usually used as ID, wired to ground directly or trough a resistor.

// Per.

The 5th pin is "insert detect", and that's exactly what the pin is for. I think it's connected to ground when plugged in? You can check what it's connected to with your multimeter.

But it has been frequently used for headsets and such.

Connecting pin4 to pin5 creates an "OTG" cable for USB Host applications. Pinout