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

Opto-coupler, slow turn off

+2
−1

I have an opto-coupler circuit where is very slow turn off.
I can't figure out what is the cause of this problem.
It's for UART isolation, with speed 9600 baud.
Datasheet: EL357NC

Do I have some error in my schematic?
Or is actually opto-coupler IC faulty?

This is schematic:
schematic

This is input signal (METER_RX_IC), which goes from MCU through 220 Ω: input signal

This is output signal (OPTO_RX_E): output signal

Opto turns on as expected, but the fall-time is very slow.
I tried to remove Q301, no change.

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

0 comment threads

2 answers

+0
−0

I changed value of resistor R318 from 10 kΩ to 1 kΩ, and that alone significantly improved off-time. From 200 μs to around 25 μs. That is much better.

Improved off-time

So I looked into datasheet again. I found the answer on page 5, figure 8:
Switching time vs load resistance

Test circuit:
Test circuit

It's surprising for me, that load resistance has such significant influence on the off-time.

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

0 comment threads

+0
−0

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 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Ω pullup to 3.3 V on the collector of Q301, the transistor needs to pass only 330 µA. 1/10 of that is plenty to keep a 3904 in saturation, so 33 µ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Ω for reasonably fast turnoff. At 750 mV on the base, that would draw 375 µ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 µA. Plus the current needed to turn on the transistor, 433 µ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 µA) = 5.08 kΩ, so 4.7 kΩ it is.

So in summary, move R318 to be directly on the base of Q301, change it to 2 kΩ, and change R317 to 4.7 kΩ. 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.

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

1 comment thread

Thanks for quick answer. I have added link to that opto. I mentioned target speed to be 9600 baud. Cu... (1 comment)

Sign up to answer this question »