78Views6Replies

Author Options:

LED light up USB Answered

Working on a project of mine and I'm stuck.  I'm trying to get an LED to light up when the USB port is in use for a charger, not when it's plugged into an outlet, but when someone plugs their chord in the USB port I want it to light up then.  How would I go about doing this?

Tags:LEDUSB

6 Replies

user
Ryan Hebron (author)2014-08-23

here is a simple schematic you will have to do the math on what values the resistors need and the threshold voltage of the transistors and the voltage on the power buss but if its done right it will work by the way this schematic was done in a program called Kicad

Select as Best AnswerUndo Best Answer

user
Downunder35m (author)Ryan Hebron2014-08-23

I admit that I am far from perfect when it comes to interpreting shematics, but correct me please if I'm wrong:

The circuit seems to monitor the voltage on the USB port and not the current.

The voltage output for USB is regulated so adding a load won't automatically cause a breakdown in voltage.

If the circuit is added like this (green on positive, blue on negative) I fail to see how it can work.

Select as Best AnswerUndo Best Answer

user
Ryan Hebron (author)Downunder35m2014-08-23

im not perfect and i don't do a lot of circuit design. but its meant so that a small voltage drop causes the led to turn on.

even in today's atx power supplies there is a small voltage drop when a load is applied that's why the transistors sit on the very edge of the threshold voltage needed. mabe it will not work but the idea is right

Select as Best AnswerUndo Best Answer

user
Ryan Hebron (author)Downunder35m2014-08-23

im not perfect and i don't do a lot of circuit design. but its meant so that a small voltage drop causes the led to turn on.

even in today's atx power supplies there is a small voltage drop when a load is applied that's why the transistors sit on the very edge of the threshold voltage needed. mabe it will not work but the idea is right

Select as Best AnswerUndo Best Answer

user

I'm sorry about this, but I'm not all that good with electronics so I have no idea what I'm looking at. I can see LED, and im guessing R1-R4 is the resistor. No idea what the rest is. Is there anyway you can explain what to do with this and what math I have to do? Thanks

Select as Best AnswerUndo Best Answer

user

the green wires at the top are power the blue wires at the bottum are ground the parts labled BC547 are NPN transistors they are also labled Q1 or Q2.

when nothing is pluged in the USB port Q1 is active and activates Q2 which causes current to flow between the resistor and ground bypassing the led and keeping it turned off when something is pluged in to the USB port it turns off Q1 and subsequently Q2 activating the led.

im not completily sure how to calculate what resistor is needed but the critical one is R1 and R2. in theory the circuit works you will have to try it out and see. R1 and R2 need to be the same valueand im not sure that R3 is nessesary

Select as Best AnswerUndo Best Answer