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.

How to detect a small flowing current?

Not open for further replies.


New Member
I've a black box containing a resistor and a led connected in series to the resistor by it's anode.
The black box has two accessible terminals: terminal 1 (which is the free resistor's lead) and terminal 2 (the led's cathode)
So I connect the black box to a voltage source and begin a sweep from 0 to 5V.
When I reach the led's drop voltage, about 1.2V, it obviously turns on, and current starts flowing thru the black box.

Now my question is: how can I detect that the led is on? I would need a circuit that gives me a logical 1 if current is flowing by the led and a logical 0 if not.
How could I easily do it?

Thank you very much!!

Well there are several ways of detecting whether the LED is on or not:

1. Connect the output to the base of a trasistor switch.

2. Connect the output to an Opamp IC.

3. Put a photoresistor near the LED and use that as the output.

4. Put a infrared transistor detector near the LED.

Anything in particular ?
Thank you for your reply.
Answers 3 and 4 not possible!!! I have a BLACK box, and have no access to the led itself. Cannot place any light sensor or something similar.
The answer 2 is also discarded because I must keep the component count and size at a minimum, and I can not aford adding another IC to the board.
So I have one solution left.
I've tried the first one by simulating it in pspice, but I don't know why, the transistor gets fired too early, before Vs reaches the led's drop voltage.
Could you explain me exactly how would you implement this solution?

Thanks a lot!!!
At what current level do you want to define the LED as being on? How many components can you use, or how much space do you have for them? What sort of indication do you need?
For the life of me i dont see what the purpose of this circuit would be.

Some questions for ya:

How big is the "black box" ? if it contains just an LED and resistor in series im assuming its quite small ? and who made it? or where did you get it?
how do you know the voltage drop of the LED is 1.2 V ? (remember theres a resistor connected in series with it)

What type of transistor did you use in your pspice sim? and what configuration did you use?
arlin said:
sounds like a homework assignment
Yeah, that's what I thought. How about measuring the difference between the temperature of the box and ambient? The response time might be a little slow, unless the voltage sweep time is measured in minutes. :(
Shhhhh! guys you're spoiling all the fun. :lol:
Ok. I'll explain the whole thing for those who don't have enough imagination :)

I have a microcontroller with a 8-bit DAC attached to it, so my program can set the DAC's output from 0 to 5V by setting its value from 0 to 255.
Connected to the DAC output I have the resistor-led pair.

So now I want my microcontroller to be able to find out, automatically, the greatest possible dynamic range available to light the led in a linear manner.
In other words: assuming that the maximum intensity is flowing when dac val = 255, I need a method for the microcontroller to detect which is the minimum value (corresponding to the led's drop voltage point), so my program can use any value from the min-max range and hope the led's intensity will respond linearly.

Hope this enlights you a little more :wink:


P.S. I'm a hobbyist. It's not homework assignment. I swear it!!
I think you're barking up the wrong tree. An LED's light output is fairly linear vs current, especially red ones. Linearity for your circuit will suck very much bad. You need a voltage-to-current converter between your DAC and your LED. Tell me what supply voltages you have available, the maximum current required, and the maximum LED voltage drop expected and I'll gin one up for you.
The wrong tree? I think I'm barking up the wrong forest!!! :oops:
A voltage-to-current converter sounds to me like "op-amp". Unfortunately, I cannot aford adding one more IC to the board. It's a space problem. :(
:idea: Another possibility I'm considering is to forget the dac and make the microcontroller output a PWM with a 0 to 100% duty cycle, with the resistor and the led directly connected to it, setting the PWM frequency high enough to avoid flickering.
So a 0% duty cycle PWM would obviously correspond to zero light intensity, and a 100% would correspond to the maximum intensity set by the resistor.
But would I have linearity in the middle? I hope so.
What do you think about it?

Thank you very much again,

You're right, it does require an op amp for good linearity. The PWM sounds like an excellent idea.
Not open for further replies.

Latest threads