can anyone help me with Opto-isolator and Arduino problems

Basically i have tried to connect a Remote control to an opto-isolator via positive and negative wires running from the sides of a button, and then connected the opto - isolator to the arduino via ground and digital pin. I am a programmer and have written a home automation program to control this digital pin on the arduino, and when the pin is set to high the button is pressed on the remote control.

Now here is the tricky part.

I know that the pos/neg wires are correctly soldered on because you touch them and they make the connection and turn the Remote controlled socket( which is controlled by the remote control) on and everything is lovely. But when the opto-isolator is involved you get the nice blinking LED on the remote control to signal it is sending, but the socket does nothing.

Again i have tried the output circuit on the end of the opto-isolator with a 9v batteries and an LED and they are fine.  Working nicely. Another thing to note is that te multimeter showsthat when using the opto-isolator and the remote control the power is the same as if you pressed the button.  

I seem to be tearing my hair out here, so anyone who can give me an answer would be on my lifesavers list for life! Before anyone suggests using anything else like a transistor,Relay etc, it must be an opto-isolator as this is a project i want to do centering around opto-isolators.


sort by: active | newest | oldest
iceng6 years ago
There are amazingly WRONG Opt-Isolator wiring on the web.
Here is a 4N25 properly wired to a computer input with
No weak pull up on the Input Pin,
Usually the LED in the package runs on 4 to 10 ma........... A
OPTOISO -sw.jpg
MarkFW (author)  iceng6 years ago
Cheers ill try that in a bit and let you know how i get on
aessam1 MarkFW6 years ago
in addition to MR. iceng circuit
you are saying that you are using a blinking led software.
if the freq. is fast,maybe the remote can't send the full data in the right way
MarkFW (author)  aessam16 years ago
I have just tried using a BFY51 NPN Transistor and this seems to work fine in place of the opto coupler.I tried these once before but they didnt work so i am not sure why it has now, but hey ho its solved. Once i get a finished product that looks professional i will be writing an instructable for this project.

Thanks for your help

aessam1 MarkFW6 years ago
looking forward to seeing it
I don't see a current limiting resistor for the led driven by the arduino for a start, in your circuit diagram. Put some pin numbers on the circuit too.

MarkFW (author) 6 years ago
thats a basic one i drew a while ago to post to maplin to see if they could help (where i bought the opto-isolators)
aessam1 MarkFW6 years ago
what kind of Opto-isolator are you using ?
MarkFW (author)  aessam16 years ago
aessam1 MarkFW6 years ago
are the collector and emitter connected in the right way ,not reversed ?
and also are you sure about your code that it gives continuous signal not square wave ?
MarkFW (author)  aessam16 years ago
I just checked the circuit with another higher powered LED and there seems to be a difference in power when connected to the Opto-isolator and when not. I am thinking that the opto-isolator is taking too much power from my connection thus the LED illuminating on the Remote Control but no switching happening. What can i do to boost this power or reduce the power taken from the opto-isolator?
MarkFW (author)  aessam16 years ago
It seems that there is only one way to wire these things up to get any sort of output and thats how i am using it at the moment. As i said above i tested it with a simple led circuit and it works fine. The code i am using to test is just a simple Blink LED sketch that came with the Arduino software, turning a digital pin high and low.

aessam1 aessam16 years ago
which one of these ?
MarkFW (author)  aessam16 years ago
it also says its made up of Optically coupled infrared emitting diodes and phototransistors
MarkFW (author)  aessam16 years ago
its a photo-transistor opto-isolator
aessam16 years ago
may you just put a simple circuit ?
MarkFW (author)  aessam16 years ago
Please refer to the diagram i roughly drew above