Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Device Connection LED indicator

Status
Not open for further replies.

find_beat

New Member
I want to design a LED indicator circuit so that it lights up when device is connected.

For example:

Phone --- connected to circuit --- connected to power source for charging = phone charging + LED ON.....
and........
Nothing connects to circuit --- circuit still connected to power source = LED off

What is a simple way to do this?
 
Last edited:
The method used would depend on the power source. What is it? Mains? USB? Other?
 
You could try something like this, which should light the LED if the phone or other attached load draws at least 50mA.
View attachment 65552
 
Last edited:
The source is USB 5v, 2A

Hello,

You mean USB adapter.

Can you measure the current load and the impedance of the device ?

EDIT:

Here, what do you think about this circuit ?View attachment 65572



When there is no load (i.e : The phone isn't plugged, there is no return path and there is no current flowing. When it's plugged, there is a small amount of current flowing through RB, and this saturates the transistor, which means the LED is lighting).


You can also remove the led and put it in the Collector side rather than the Emitter (transistor sinking current).. You can try both and see what suits you better.
 
Last edited:
I will use both alec_t's and Jurgurtha's approach.

I'll get back with the results.

Thank You so much.

I had a current sensing circuit, but as soon as device fully charge, LED gets dimmer than turns off.
 
In the post #5 circuit the left side of Rb is grounded, so the LED won't light :(
 
Yeap, Alec. I was thinking of removing it, but then again .. The path would be Plus 5V, load, Rb, VBE, Ground (supposing that the LED has been moved to the collector side) .. Which doesn't arrange things, as the current that flows through the load is the same as IB which is small. I forgot it there.

I think that, BJTs being current controlled and not voltage controlled as FETs, either there would still be some current flowing through RB in that configuration... BUT.. One of the reasons I wanted to move the LED up to the connector instead of letting it in the Emitter, is that for the transistor to conduct, although being current controlled, its Base voltage needs to be slightly higher than its Emitter voltage (about .7v higher). If I left the LED there, the voltage at the Emitter with the LED lighting would be about 2.5 volts (for a green LED, I think I'm not mistaken..) so the Base voltage would need to be at least 3.2 volts. Moving the LED simplifies this a bit.

So, having that in mind .. What do think about adding a resistor instead of the wire, so that to keep the Base voltage higher than the Emitter voltage ? (The LED being on the Collector side).

We'd need to figure out how much current the load draws to calculate that resistor, in order to know which value would cause full saturation for the transistor.

Maybe even a diode that can withstand the load current, but cause a convenient voltage drop. Or a Zener diode .. How does it look ?
 
Last edited:
That should work, but the voltage drop is 0.7V whereas using an opamp the drop is only a few mV.
 
Yeah. Few millivolts are clearly better. I had in mind components count and simplicity of design / surface on the board, etc. I thought than an Op-Amp would have at least an 8 pin package (supposing it's a single Op-Amp, but I doubt so. Lots of them come in 2 and 4 OA in a single package). Plus I didn't want to waste an entire Op-Amp on just "indicating a battery". So it depends what's a priority for him. But maybe the Op-Amp circuit can be done in a compact manner.

Find_beat, are you going to do a PCB for it ?
 
Yes, I have tested the circuit. It works nicely. It is similar to the circuit I already had before. My problem was that I forgot about Rgain so the gain was infinite which is why LED was always on. I have fixed the issue. Will post pictures later.

One more concern I have is how can I get the impedance of data line as a differential pair with 90 Ohm characteristic impedance?
and ground guard on both line side and via to make the connection to the ground plane?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top