Using a 4n26 to seperate pic circuit from step motor circuit and have wired the optoisolator in the following way (power supply to 4n26 different to the pic supply):
pin1 (anode - input from pic)
pin2 (cathode - ground with a 475 Ohm resistor)
pin3 (unused)
pin4 (emitter - output to control step motor)
pin5 (collector - 5V)
pin6 (base - unused)
I have confirmed
the output from the pic (using leds and volt meter)
the wiring of the 4n26 (placing both 5V and 1.5V on the anode pin 1 - again leds and volt meter)
When I try to get output using the pic as the input to the anode, nothing on the emitter?? Now I know I am doing something wrong, I just cannot figure it out. Any ideas on what I can try?
In that schematic, it shows pin 6 (base) free floating.
The weird thing is, that if I apply voltage to pin 1 directly the circuit works (base not connected). It does not work when I apply voltage from the pic (using PORTB pins)!
I feel such a fool ... optoisolator ... isolating two circuits!! I was using the ground of the circuit that I was trying to isolate from (just like you identified!!).
Connecting the cathode to the correct ground, and voila, working very nicely now ... thanks for your help williB.
The base of an optoisolator output transistor is normally excited by the photons from the LED. Most optos do not even have a base terminal.
Correct me if I'm wrong, but wouldn't the base terminal just be another way to excite the output transistor? If so, it'd take a special set of needs to want to do this in a circuit. Otherwise, you'd float it.
The base of an optoisolator output transistor is normally excited by the photons from the LED. Most optos do not even have a base terminal.
Correct me if I'm wrong, but wouldn't the base terminal just be another way to excite the output transistor? If so, it'd take a special set of needs to want to do this in a circuit. Otherwise, you'd float it.