Maker Pro
Maker Pro

USB ports turn on LEDS when device is plugged in

Krylonix

Jul 5, 2011
6
Joined
Jul 5, 2011
Messages
6
I made a dual usb harness for my car out of a rear PC usb port. I plan to hook it up to the usb input on my stereo and use it to power my GPS and Phone, as well as read data. I want to know if it is possible to hook up and led to each port so when a cord is plugged in the led turns on? I was trying to think how to put a super tiny push switch somewhere or use the prongs inside the port to establish a ground to the LED when plugged in. Any thoughts would be appreciated.
 

TBennettcc

Dec 4, 2010
292
Joined
Dec 4, 2010
Messages
292
Won't you have to physically plug and unplug the cables? So won't you know if a cable is plugged in or not? By the way, USB ports are only rated for 500 mA MAX at 5VDC. You might want to take a look at the specs for your radio and make sure that front USB port can put out a full amp plus a little more for wiggle room. There's probably a reason there's only one USB port in the front of your stereo.

Another way to go would be to get a 5V 2+ amp wall wart and a DC-to-AC inverter (yeah, it's a waste of energy, but unless you really want to make a 12V-to-5V buck converter yourself, personally, this seems like the easiest route). Take the power from the wall wart to the V+ and V- of the wall wart, and connect it to the V+ and V- rails of the dual USB port. Make sure to leave the V+ disconnected from the original cable going back to your head unit! Then take the data lines from your head unit and connect them to the data lines on the dual USB port.

Welcome to the forums.
 

Krylonix

Jul 5, 2011
6
Joined
Jul 5, 2011
Messages
6
Thanks, I didn't even think about the power issue, probably would have found out later. unfortunately the usb from the stereo only puts out 500mA like you said. I wanted the lights to come on when you plugged in something just for show. I went to Radio Shack and found some super tiny switches and installed them with some fingernail sized circuit boards with SMD leds on them. They work great! I kind of understand what you suggested but I might need some more clarification. I understand that you have to convert the power with the inverter but I was still a little confused about how to wire the wall wart. I really don't want to splice into my USB harness, on the second try I made a flawless harness and I really don't want to hurt it:( So any 5V brick that puts out 2+ amps will work? Will the brick replace the power to both ports? A diagram would be great!
 

TBennettcc

Dec 4, 2010
292
Joined
Dec 4, 2010
Messages
292
Some pictures of your current setup would be good, as it sounds like you mostly have what you want. See if you can get detailed shots of the front, back, and side of your USB extender, where you would want to mount it, and what something would look like plugged into it.

Maybe from there I can give you some detailed instruction on how to finish what you want while leaving your USB harness intact. I don't know if it's possible, but we'll see.

For my idea posted above, you would need a DC-to-AC inverter, just a small one would do. 100 watts would be fine. If you find something smaller, fine. Then you'd need a 5VDC, 2A wall wart that you would plug into the inverter. Cut the DC plug off the other end of the wall wart cord, and test with a multimeter to see which wire is + and which is -. Figure out which USB is + and -. Tie both V+ and V- from the wall wart into the USB jack assembly on the appropriate pins. Disconnect the V+ going from the harness to your head unit.

Yes, the wall wart should replace the power to both ports.

I'd be interested to know the part numbers you used from RadioShack to construct those LEDs, boards, and switches. A pic of how you put everything together would be great, too. I love seeing what people can imagine and then build.
 

Krylonix

Jul 5, 2011
6
Joined
Jul 5, 2011
Messages
6
I'm just gonna remake the harness. I wasn't thinking when I made it and I combined both data wires from both usbs into one. Big no no, as there is only one usb port on the stereo. So, I've decided they both can't be data. One will be data and power and the other one just power. I'm not looking to charge anything up on these ports but the little extra juice to my phone will help while I'm using resource intensive media apps. I'll work on this some more next week and will post pics soon.


Come to think of it, how is the internal design of a usb hub. Is there a circuit board with an IC on it to determine how the data is routed or what? I know there still will be a power issue even with a hub, because it's designed to get all the power it needs from a PC.
 
Last edited:

TBennettcc

Dec 4, 2010
292
Joined
Dec 4, 2010
Messages
292
I know there still will be a power issue even with a hub, because it's designed to get all the power it needs from a PC.

Not necessarily. They have externally-powered USB hubs for just that reason. They are usually powered by a wall-wart. You might just want to go that route, with a USB extension cable if needed, to get the hub where you want it. Sure beats trying to wire your own harness. The Universal Serial Bus protocol can address up to 127 devices on a single host controller, with a maximum of 5 tiers/layers/hubs. The maximum cable length for USB 2.0 is 16 feet.

Keep it simple.
 

Krylonix

Jul 5, 2011
6
Joined
Jul 5, 2011
Messages
6
Here's what I found on eBay:

Inverter


http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=250850883348&ssPageName=STRK:MEWAX:IT
Inverter.jpg



Powered USB Hub

http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=200628828736&ssPageName=STRK:MEWAX:IT
usb.jpg


I'm going to tear apart that hub as soon as I get it. I only wanted 2 ports side by side and all the 2 port hubs have them on top of each other, plus a powered 2 port hub is impractical. It might be awhile before I get back on this project but I'll post pics of the led install when I'm done. Also, for the inverter do I just cut off the cigarette lighter plug and add a fuse to the positive side and wire it to the battery?
 

TBennettcc

Dec 4, 2010
292
Joined
Dec 4, 2010
Messages
292
Why are you going to tear apart the hub?

As far as the inverter, yeah, you should be fine wiring it (with a fuse in-line) straight to the battery. Make sure to keep the positive and negative leads identified correctly. Wouldn't want to let the magic smoke out so soon...
 

Krylonix

Jul 5, 2011
6
Joined
Jul 5, 2011
Messages
6
I'm tearing it apart to position the ports how I want and make a custom plate as well as install the lights/switches I made. You'll see :)
 

Krylonix

Jul 5, 2011
6
Joined
Jul 5, 2011
Messages
6
I finally got around to finishing this project. Here are the pics I promised.
IMG_20110802_005005.jpg


I took the USB harness I made, with the switches in it, and replace the two USB ports on top. The board is going to be hidden and I have no use for the other 5 USB ports anyway.

IMG_20110802_005330.jpg


IMG_20110802_005017.jpg


IMG_20110802_005025.jpg


This is a close-up of the little circuit boards I made for the SMD LEDs. The USB hub just happened to have an empty spot on the board labeled LED so I used it as my 3v power source, which is better than dialing down another 12v wire somewhere.

These last few pics are of the LEDs on when a cord is plugged in.


IMG_20110802_005135.jpg


IMG_20110802_005259.jpg


IMG_20110802_005311.jpg


It may look crude but it will be hidden in the front of the center console in my car. All you will see is the ports and the LEDs shinning through a piece of tinted lexan. I'll post pics of that too when I get it done. Thanks again for all your help.
 
Top