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

Comments on Opto-coupler, slow turn off

Parent

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

Post
+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)
Thanks for quick answer. I have added link to that opto. I mentioned target speed to be 9600 baud. Cu...
Chupacabras‭ wrote 2 months ago

Thanks for quick answer. I have added link to that opto. I mentioned target speed to be 9600 baud. Currently the on-time is about 5 μs, so I would be absolutely fine with such off-time. As I understand, you blame transistor Q301 is not switching-off fast enough. It's probably not the case. I mentioned, that I removed transistor Q301 from the circuit. It didn't decrease that turn-off time at all. I'm measuring at node "OPTO_RX_E". So there's effectively only U304 and R318 connected on the output side. Now I changed value of R318 from 10 kΩ to 1 kΩ and everything else remains the same, the turn-off time decreased dramatically . From 200 μs to 25 μs. I did not expect that turn-off time is proportional to value of R318.