I s there any sample electronic circuit for using 4N25SM opto coupler after a PWM signal.
Try google: "4N25SM PWM" second result is http://www.technogumbo.com/proje...
If that circuit does not work, perhaps explain your desired use in detail.
It all starts with a mental vision.
I'm just a bit mangler but surely if you play PWM into an opto all you'll achieve is varying the brightness of the LED - not passing the varying width square wave across the barrier?
The transistor is much faster at detecting the on-off's than your eye's.
Still learning, don't shout at me, educate me.
Starting the fire is easy; the hardest part is learning how to keep the flame!
Cliff, you might be thinking of the old ldr couplers. Who remembers the orp-12?
Cliff, you might be thinking of the old ldr couplers.
things have moved on then?
Whether or not an opto isolator will handle a PWM signal depends entirely on the timing of the PWM signal.
Generally, run-of-the-mill opto isolators are a bit slow. The LEDs are fast enough. THe photo transistor is the culprit. They have very large base areas (in order to capture the light from the LED). This gives them a very high collector-base capacitance AND low Ft. They are slow to turn on and slow to turn off. BUT, so long as the minimum PWM pulse width (one PWM clock interval) is long compared to the switching speed, it will work quite well.
For the quoted device, the worst case turn on and turn off times are 10us. So, if you clock your PWM with a 100KHz clock or slower, it will work just fine even with one count on or one count off.
Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net
There's a much bigger problem than the slowness of a cheap optocoupler and that's it's sensitivity to temperature; the current transfer ratio very largely depends on the temperature of the device and the biggest source is the LED; these tend to emit a lot less light at elevated temperatures.
Switching speed also depends on temperature but also on the load the transistor has to switch and what pin of the transistor is used as output.
It's a compromise between LED current and transistor current. More LED current increases the amount of charge on the base, slowing down it all over again. There's a certain optimum somewhere in the middle.
There are few ways to compensate for this temperature dependency though.
Of course, it all depends on the application on how accurate the transfer should be.
At 100KHz and 10us switching time you certainly cannot faithfully reproduce a PWM signal. At 8 bits resolution, each PWM count is an increase of only 39ns.
I meant 100KHz PWM clock rate, not PWM period. Each count worth 10us.
Yes, there are major problems with the inexpensive optos. Switching gets even worse when the transistor saturates. 10us is the "non-saturated turn-on" (or turn-off) time. Saturation causes the turn-on and turn-off to be asymmetrical and this will be particularly noticeable at minimum on or off times, but it generally skews the duty cycle unless the clock rate is reduced substantially.
Temperature is a big issue, as was pointed out.
So, there is a lot more than just "can you show me a circuit?" What does the OP need to do?
I have used a low frequency PWM opto-system to measure voltage on an isolated high voltage supply. The high side AVR used ADC and PWM to drive Opto. The isolated low side with another AVR, using input capture to measures the opto out duty cycle. It worked well at 8 bits. Speed was not an issue in the application. It used Tiny13s and there were more things to do on each side.
One way to compensate is to use an optocoupler like the IL300, which has an extra phototransistor that can be used inside a feedback loop to compensate for the varying characteristics. Even a separate optocoupler works. With this system you can transfer analogue signals with quite good precision. Basically two optocouplers and one opamp, so it's not complicated either.
For purely digital signal two optocouplers can be used to transmit a complementary PWM signal, which are fed to an SR FF on the receiving side. This also results in a tempco of almost zero % over a wide temperature range. I recently tested this in a climate chamber between -40 and +85.
Interesting and educational thread!
As with many of those, this one also displays the complete detectable absence of the OP after the OP. Please keep up the good work in spite of this!
As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here.
No guarantees, but if we don't report problems they won't get much of a chance to be fixed! Details/discussions at link given just above.
"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]
As an alternative you could use a galvanic isolator like this one:
They are cheaper, and usually MUCH faster than optoisolators.
© 2018 Microchip Technology Inc.