6744Views17Replies

Author Options:

can anyone help me with Opto-isolator and Arduino problems Answered

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.

Cheers
Mark 

17 Replies

user
iceng (author)2011-07-29

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

Select as Best AnswerUndo Best Answer

user
MarkFW (author)iceng2011-07-30

Cheers ill try that in a bit and let you know how i get on

Select as Best AnswerUndo Best Answer

user
aessam1 (author)MarkFW2011-07-30

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

Select as Best AnswerUndo Best Answer

user
MarkFW (author)aessam12011-07-30

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

Select as Best AnswerUndo Best Answer

user
aessam1 (author)MarkFW2011-07-31

looking forward to seeing it

Select as Best AnswerUndo Best Answer

user
steveastrouk (author)2011-07-30

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.

Steve

Select as Best AnswerUndo Best Answer

user
MarkFW (author)2011-07-29

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)

Select as Best AnswerUndo Best Answer

user
aessam1 (author)MarkFW2011-07-29

what kind of Opto-isolator are you using ?

Select as Best AnswerUndo Best Answer

user
MarkFW (author)aessam12011-07-29

http://www.maplin.co.uk/opto-transistor-isolator-2198?ordercode=YY62S

Select as Best AnswerUndo Best Answer

user
aessam1 (author)MarkFW2011-07-29

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 ?

Select as Best AnswerUndo Best Answer

user
MarkFW (author)aessam12011-07-29

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?

Select as Best AnswerUndo Best Answer

user
MarkFW (author)aessam12011-07-29

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.

Select as Best AnswerUndo Best Answer

user
aessam1 (author)aessam12011-07-29

which one of these ?

http://en.wikipedia.org/wiki/Opto-isolator#Types_of_opto-isolators

Select as Best AnswerUndo Best Answer

user
MarkFW (author)aessam12011-07-29

it also says its made up of Optically coupled infrared emitting diodes and phototransistors

Select as Best AnswerUndo Best Answer

user
MarkFW (author)aessam12011-07-29

its a photo-transistor opto-isolator

Select as Best AnswerUndo Best Answer

user
aessam1 (author)2011-07-29

may you just put a simple circuit ?

Select as Best AnswerUndo Best Answer

user
MarkFW (author)aessam12011-07-29

Please refer to the diagram i roughly drew above

Select as Best AnswerUndo Best Answer