CL's photodiode and a 555 timer SOLVED

I saw an interesting 555 example originally from @Alexis using a CL “photodiode” and wanted to try how to “virtually” couple D1 and D5 (which I’ve reversed).

a) But I found “U1 out” ranging from 0.3V to only 5.1 Volts instead of the expected 7.8V or more (supply is 9V). Is this a CL 555 model issue?

b) With “U1 out” is high: 11.7mA at 220 Ohm = 2.6V, remain 2.4 Volts at the QED123. This seems to be too high for the small current, how come? CL model / parameter issue?

With “U1 out” is low: 33mA at 220 Ohm = 7.3V, remaining 1.7V for the diode, hmmm … Anyway, the diode should be at 100mA (1.9V), but this is a design question.

A simple resistance coupling will invert the “reality” but would not hurt to see the second 555 in action.

c) Also the second 555 output (Buzz) is only 5V. To see full action the stop time should be 30 msec. Playing with different values for C3 and R17 suddenly there are strange plots to be seen. E.g on very low R17 (200 Ohm) the node “Trig” seems to be connected to C3 ??? (Takes ages here, reduce stop time to 10m to see details).

But my main question is the photodiode D5. Is this a phantasy device or does anybody know a certain type (to access a data sheet)? I wanted to know if the interface for the 555 would work like that. However, steady light would block the alarm, a capacitive (AC) coupling behind D5 is mandatory.

For a simulation model the device should have a kind of input (expression) to work in a simulated circuit?

Regards, Sancho

by Sancho_P
December 09, 2012

" ... my main question is the photodiode D5. Is this a phantasy device or does anybody know a certain type (to access a data sheet)? "

The answer to that question is pretty much irrelevant.

Here's why.

The circuit below shows the most basic way to simulate a photodiode (in this case as part of an optocoupler device):

Note that the photodiode does not appear at all in this model!

This next shows a slightly more detailed model in which the photodiode appears but only to represent the reverse leakage (Dark) current and junction capacitance:

This shows the same photodiode model used with an opamp transimpedance amplifier:

and this last is basically the same circuit but for an optical receiver where the LED transmitter and the photodiode receiver are physically separated:

The only difference here is that the CTR of the optocoupler is replaced by the product of the photodiode Responsivity and the optical attenuation between the LED and the photodiode.

So unless you really are concerned about the dark current and/or the effects of the junction capacitance (usually minimal until you get to 100M Ethernet data rates) then apart from the CTR in an optocoupler or the Responsivity of an isolated receiver diode, you can usually ignore the photodiode in a model.

by signality
December 10, 2012

Thanks for your example circuits! Such basic examples should be permanently linked to the toolbox’ elements.

What you say is correct because CL’s photodiode has no “input” to accept “light” from, thus it’s a bit useless (as your examples show). On the other hand I thought it would be very important which device is used as some parameters (e.g. capacitance) depend on external data (e.g. reverse voltage). Dark current and noise of course would be important for a real photodiode amplifier.

See: http://ecee.colorado.edu/~ecen4827/hw/hw1/PhotodiodeAmplifers.pdf

But it seems designing a special p.d. amplifier wouldn’t be CL’s domain.

I don’t know if it’s useful to have such an unresponsive generic element in CL’s toolbox. The common (?) elements nowadays I’d like to have are

a) a phototransistor (but requires “input” !!! )

b) an optocoupler

And very important would be

c) a solar cell (solar panel?) element

but also with some kind of energy input (you know, we need it for our windmill - challenge).

The elements “icon” should include the functional model, similar to your examples.

BTW: https://www.circuitlab.com/circuit/v28w66/optocoupler-03/ takes veeery long time (4 min) to solve for DC sweep, strange ...

by Sancho_P
December 10, 2012

Ole!

CL really could do with a better way to search for circuits and forum entries. It's very inefficient at the moment.

(I thought I'd posted something about the CL 555 timer model a while ago but I cannot find it now.)

" ... CL’s photodiode has no “input” to accept “light” from, thus it’s a bit useless ... "

It is very misleading for new and inexperienced CL users who don't just want to draw a circuit diagram with a photodiode in it but want to simulate it too, to find that the diode does nothing optically in a simulation.

However, we're back to the "Sorry but that's what industry standard simulators do". If you look at any spice model for photodiodes and opto coupler/isolators, they all basically work the way my examples:

https://www.circuitlab.com/circuit/95w75k/

https://www.circuitlab.com/circuit/v28w66/

and

https://www.circuitlab.com/circuit/tne4sa/

show.

There's a diode for the dark current, junction capacitance and any noise behaviour and the rest is entirely a behavioural circuit using arbitrary current controlled current sources.

Same thing is true for PV panels. They're just arrays of photodiodes after all.

Amongst all the opto device modelling I've done over the years, I did some PV panel modelling a while ago. If I get the time I'll see if they can be ported to CL.

I might have to break them though - just a tiny bit - so they make windmills look even more efficient ...

Though that's not why CL takes so long with:

https://www.circuitlab.com/circuit/v28w66/optocoupler-03/

That's just CL having a solver tizz.

It would probably run faster if I replaced the opamp with a simple behavioural model but that's not really the aim of the excercise.

You'd be pushed to design a realistic photodiode receiver for anything faster than a few hundreds of kbps in CL because you haven't got enough control over the device models. Transistor capacitances and junction transit times aren't available for the user to edit and at higher speeds they start to significantly affect the simulation.

by signality
December 11, 2012

BTW:

Ictr1 and Q1 in:

https://www.circuitlab.com/circuit/bdxks2/

and

https://www.circuitlab.com/circuit/95w75k/

are examples of how phototransistors are modelled.

A dig around vendor's opto coupler spice models will show that they do get a bit more detailed than those in the CL examples but not much.

Darlington, Triac, SSR and logic opto's get quite a lot more complex but the photodiode at their core is always the same basic thing shown here.

by signality
December 11, 2012

Your examples are quite sufficient for functional simulation purposes, they simply lack the “icon” wrapped around, not very intuitive without. Alexis probably would have seen that the sender diode current is a bit low for a physically separated device.

But:

“That's just CL having a solver tizz.”

  • Right, the solver has to have priority.

Changing a resistor’s value in a very simple circuit must not result in dramatically changed runtime of the solver.

Before thinking of any other improvement or feature the simulator should either run without strange behavior or tell the user exactly where it is - and why it doesn’t really make progress.

For now CL has a very nice GUI (editor and graphs) and hides several obstacles from the unexperienced user (compare e.g. GnuCap), but the solver is the core part anyway.

So it’s up to CL (if someone is still there …).

Regards, Sancho

by Sancho_P
December 11, 2012

Of course there’s room - - - always.

However, Sire, we just close a window to be back in reality, whilst CL Central are left in the lonely planes of La Mancha, surrounded by whirring windmills and horrifying crap,

  • until Don_Q, Sancho_P or other protagonists open a new window into CL’s bitter darkness.

;-)

Regards, Sancho

by Sancho_P
December 12, 2012

About your observation of the 555 output:

https://www.circuitlab.com/forums/support/topic/5yc7a6mu/bug-report-high-level-voltage-at-output-pin-of-cl-555-timer/

Is it me or is it getting darker ... ?

by signality
December 12, 2012

Post a Reply

Please sign in or create an account to comment.