1
\$\begingroup\$

While phototransistors are often used in this common turbidity sensor application (at least in part) because of their gain, their response is not linear since the gain will depend on the intensity of the light.

I'd like to learn to model circuits here with CircuitLab, and while this one is a little challenging for a beginner, it's has everything I'd like to understand. My first problem is that I don't find a phototransistor in the library.

So I would like to ask if there is a way I could approximate the response of a phototransistor by connecting a photodiode to the base in order to inject a photocurrent. I understand it would not be correct, but at least it gets me started on my way.

Also I've assumed that there is a way to "shine" the LED into the photodiode with some fraction, like 1E-03 or 1E-06 of the light producing a photocurrent, but haven't figured out exactly how to do that. If it's not possible, should I just connect a variable current source to the base in place of the photodiode? (In that case I might leave the LED in place for more advanced tests like low-quality voltage regulation, ripple, etc.)

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
  • \$\begingroup\$ Several clever ways to generate the look and feel of a phototransistor in answers to this phototransistor question. \$\endgroup\$ – uhoh Mar 21 '17 at 7:17
1
\$\begingroup\$

Try a current-controlled current source (CCCS) going to the base of the transistor. The current in the LED controls the current going to the base. Typical photo efficiency of an efficient device is about 1%, so the base current will be 0.01 times the LED current.

I don't know anything about CircuitLab, but I assume it has a CCCS.

Since this is a sensor, just simulate with different CCCS gains such as you have suggested.

\$\endgroup\$
  • \$\begingroup\$ Thanks! That's a great suggestion and probably the best way to do the modeling, much better than the photodiode kluge. There indeed is one, but it only has two terminals, not four, so I'm not sure how to pass two different currents through it yet, but I am sure I'll find some documentation. \$\endgroup\$ – uhoh Mar 21 '17 at 8:03
  • 1
    \$\begingroup\$ Or you can use a 100MegOhm resistor to a VoltageSource. SPICE will not care. \$\endgroup\$ – analogsystemsrf Mar 21 '17 at 10:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.