Author Topic: Could somebody help me decode this circuit?  (Read 1287 times)

0 Members and 1 Guest are viewing this topic.

Offline Drake122Topic starter

  • Contributor
  • Posts: 17
  • Country: hu
Could somebody help me decode this circuit?
« on: March 06, 2018, 03:07:11 pm »
Hey guys!

So, I came across this neat little circuit in a Conrad electronics kit, and would like to know why, and how it works. It is light sensor circuit, according to the description, but don't know how it works.
Uploaded a not so great paint drawing of it :P The part I don't get is, what is the Op-amp doing? why does it activate when the transistor is closed? I believe the transistor is open, when the light sensing diode's current is great enough, but then what gets amplified, when the non-inverting side of the op-amp is on the collector.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21672
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Could somebody help me decode this circuit?
« Reply #1 on: March 06, 2018, 03:32:31 pm »
Heh...

This looks like nonsense, but I think it will actually work (turn off the red LED when the green is illuminated, assuming that was the intent!).

The tricks are several:
1. LEDs are photovoltaic.  There's nothing wrong with that, apply current get light; apply light get current.  How much current?  Well, as you might guess, the efficiency is crap.  But one important thing: it has to be an LED, because the voltage associated with that current is proportional to the diode type.  A green (GaP) LED has a forward drop of about 2V, so expect 1-1.5V before the current runs out.  This is enough to forward bias the BJT.
2. The BJT pulls down on the op-amp.  But the op-amp input is not biased!  Ah, but it is: the input bias current of the LM358 happens to flow out of the input pins, because it uses PNP transistors internally, and that base current serves as bias.

The transistor need only sink a few uA to do this job.

Important for this to work: the transistor itself needs low leakage current.  Typically this is in the single nA, at room temperature; expect it not to work at 100C+, say.  It also needs high hFE (more than 10, say) to get a good transition, which can be challenging as hFE falls off at low current, but most types are okay.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: macboy

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19514
  • Country: gb
  • 0999
Re: Could somebody help me decode this circuit?
« Reply #2 on: March 06, 2018, 03:45:04 pm »
Yes, the op-amp's bias current is used to power the transistor. It's an ugly hack. As mentioned above, it probably won't work at high temperatures, not only because the transistor will have a higher leakage, but because the bias current will also fall, as the Hfe of the LM358's input stage will have a positive temperature coefficient.

Try building it with a different op-amp, such as the TS272, a MOSFET input with a typical bias current of 1pA and you'll find it won't work.
 

Offline ArdWar

  • Frequent Contributor
  • **
  • Posts: 372
  • Country: sc
Re: Could somebody help me decode this circuit?
« Reply #3 on: March 06, 2018, 04:43:20 pm »
Yes, the op-amp's bias current is used to power the transistor. It's an ugly hack. As mentioned above, it probably won't work at high temperatures, not only because the transistor will have a higher leakage, but because the bias current will also fall, as the Hfe of the LM358's input stage will have a positive temperature coefficient.

Try building it with a different op-amp, such as the TS272, a MOSFET input with a typical bias current of 1pA and you'll find it won't work.

Be careful when selecting a substitute part if you intend to use that as "feature" ;D
Some OpAmp have negative input bias current and some have positive. It might results in unexpected operation. Things get tricky when dealing with compensated precision OpAmp. Depends on how matched the compensation is, it may result in bias polarity variance between part sample within the same part number. The two inputs within one OpAmp may even have different bias polarity.
 

Offline Drake122Topic starter

  • Contributor
  • Posts: 17
  • Country: hu
Re: Could somebody help me decode this circuit?
« Reply #4 on: March 06, 2018, 04:45:33 pm »
Okay, but what is that "feature"?  I get it, that when the green led senses light, it opens the BJT and it grounds the non-inverting pin. But if the BJT is closed, there is still 0 volts on the non-inverint. So when the BJT is closed, what causes the op amp to let current through? Or is that some noise voltage is on the non-inverting, and because of the high gain, the op-amp amps that up?
Also, it came in a kit, to practice smd and tht soldering, they also showed the part numbers for a reason I think :P
 

Offline ArdWar

  • Frequent Contributor
  • **
  • Posts: 372
  • Country: sc
Re: Could somebody help me decode this circuit?
« Reply #5 on: March 06, 2018, 05:21:53 pm »
As what said before by others, the design might use the input bias current of the OpAmp.

OpAmp isn't an ideal device. Its input use two transistor, obviously to drive these transistors you need a small amount of currents (IB+ and IB-). How much current, and which direction they go depend on what transistors are used on the input (NPN/PNP/N-FET/P-FET/both/combination). On most practical case these currents are undesirable, it cause additional error in the output or even mess with the input.

In this case, the LM358 sources about -45nA current from its inputs (check datasheet, negative because it sources current, opposite to the arrow from schematics below). This current can be utilized to generate voltage across the input, depends on how much resistance it encounters. I guess in this case the BC547 acts as variable resistance depends on photovoltaic current from green LED.
« Last Edit: March 06, 2018, 05:24:15 pm by ArdWar »
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19514
  • Country: gb
  • 0999
Re: Could somebody help me decode this circuit?
« Reply #6 on: March 06, 2018, 08:20:34 pm »
You need to look at the internal circuitry for the LM358 to understand why the input source a tiny current. Below is a simlified schematic of the LM358. I believe you need to be logged on to see it, as I posted it as an attachment elsewhere. Q2 and Q3 from a differential pair and Q1 and Q4 are emitter followers, which buffer the input signal and add a diode voltage drop to both inputs. A small current flows out of the bases of Q1 and Q4 in order to bias them on slightly and it's this current which powers the transistor in your circuit.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf