An optocouplter or optoisolator is a cool little device that allows you to completely separate sections of an electrical circuit. From what I understand, the MIDI protocol requires the use of optocouplers in all devices. I want to use an optocoupler for separating a circuit powered by USB (5V) from one powered by a 7.2V RC Car battery. The idea behind this is that I want to protect the USB based circuit(and my computer) from the large amperages, inductance, higher voltages and other things going on in the RC Car side of the circuit, but still want to be able to control it using a USB device. I am writing this after successfully using a Fairchild 4N25 Optocoupler to deliver pulse width modulation from a USB based circuit to the 7.2V circuit in order to control a servo.
The Fairchild 4N25SM has large enough pin spacing despite being surface mount, that you can easily solder wires directly to the pins for experimentation. I made a breakout board for this part and after a week found out the that optocoupler was not preforming as it should have. I think I got the pins on the optocoupler too hot while soldering them to the breakout board.
Before actually working with the part, I did not understand that you have to configure the optocoupler in such a way that when the signal you are trying to reproduce goes low, the optocoupler should turn ON.
This is echoed in Paul Hill's Speed Control Examples Using the 4N25 as well as the
test diagram that is shown in the Fairchild datasheet:
When doing research for working with the 4N25 I always saw diagrams of the base not being connected at all, or being connected to ground by a very large resistor in the 100k and above range. Initially I did not connect pin 6, the base to anything.
However, after sending a pulse width modulation signal through the optocoupler to control a servo, I noticed the servo would not hold its position without rapidly jerking a small amount back and forth. I tested the output of the optocoupler with two servos and noticed the same behavior.
I then hooked a large range potentiometer between the base of the transistor(pin 6) and ground. As I ran the resistance on the base of the transistor from zero to around 80K ohms, I could visibly see the jerking motion on the servo increase and decrease to smooth operation.
The diagram to the left is what I used to test the 4N25; You can click it for a higher resolution schematic. When I supplied power to the LED side of the optocoupler(pins 1, 2, 3), I would see the dimly lit LED turn OFF. The LED would turn back on again when I removed power from the LED side of the optocoupler.
Comments

Muslem,
If you don't have enough amperage/voltage available to actually turn on the LED inside the optocoupler, you may have issues.
The first 4N25 that I fooled with was broken. You should be able to tell my doing continuity tests between the different legs of the transistor.
Is it also possible that your switching speed for your application is too high to notice much of a change?

Hi,
In the same optocoupler i give input pulse but I do n't get any output. wheter o or 1. whats the problm? Can any one response me ?
Thanks to all

Hi Joi. I don't remember exactly what the resistance value of the potentiometer was. I know the pot that I used has a range up to 70,000Ohms.

Hi! I'm doing exactly the same thing. My servo also has this jitter. Do you know approx. how big your bias resistor is in ohms? I'd like to decrease board size by just having a fixed resistor instead of a pot.. :) Thanks in advance, Joi

Thanks Albie. Your exactly right. I crossed out what I had and changed it to output.

In the last line of paragraph 2, I think you might mean "output" instead of "input". The output would go low when it turns on causing the transistor to sink current.