Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

50%
+0 −0
Q&A Opto-coupler, slow turn off

Some optos are really slow. What off time is yours specified for? Your circuit could be better. The transistor is turned on thru 1 kΩ, but off thru 11 kΩ. You are also giving it way more base c...

posted 2mo ago by Olin Lathrop‭

Answer
#1: Initial revision by user avatar Olin Lathrop‭ · 2024-10-12T15:29:25Z (2 months ago)
Some optos are really slow.  What off time is yours specified for?

Your circuit could be better.  The transistor is turned on thru 1 k&Omega;, but off thru 11 k&Omega;.  You are also giving it way more base current than needed, slowing turn-off.

Move R318 to the other side of R317 and adjust both values.

Do some actual calculations.  With a 10 k&Omega; pullup to 3.3 V on the collector of Q301, the transistor needs to pass only 330 &micro;A.  1/10 of that is plenty to keep a 3904 in saturation, so 33 &micro;A into the base when the opto is on.

Let's decide that R318 (which is now directly between base and ground) should be 2 k&Omega; for reasonably fast turnoff.  At 750 mV on the base, that would draw 375 &micro;A.  To provide some margin, let's make sure everything works even if the B-E drop is 800 mV.  R318 would now draw 400 &micro;A.  Plus the current needed to turn on the transistor, 433 &micro;A needs to come thru the opto when it is on.

You didn't provide a link to the opto datasheet, so I'll pick 300 mV as the maximum guaranteed on-voltage of the opto.  With 800 mV on the base and the 3.3 V supply, that leaves 2.2 V across R317.  (2.2 V)/(433 &micro;A) = 5.08 k&Omega;, so 4.7 k&Omega; it is.

So in summary, move R318 to be directly on the base of Q301, change it to 2 k&Omega;, and change R317 to 4.7 k&Omega;.  I think you'll see a significant decrease in off-time that way.

Again, all this assumes the opto is fast enough to support your desired switch-off time in the first place. Since you didn't provide a link to a datasheet, I'll leave it for you to check.