7082Views17Replies

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 

Discussions

0
None
iceng

7 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
0
None
MarkFWiceng

Answer 7 years ago

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

0
None
aessam1MarkFW

Answer 7 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

0
None
MarkFWaessam1

Answer 7 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

0
None
aessam1MarkFW

Answer 7 years ago

looking forward to seeing it

0
None
steveastrouk

7 years ago

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

0
None
MarkFW

7 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)

ArduinoOptoIsolatorSetup.jpg
0
None
aessam1MarkFW

Answer 7 years ago

what kind of Opto-isolator are you using ?

0
None
MarkFWaessam1

Answer 7 years ago

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

0
None
aessam1MarkFW

Answer 7 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 ?

0
None
MarkFWaessam1

Answer 7 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?

0
None
MarkFWaessam1

Answer 7 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.

0
None
aessam1aessam1

Answer 7 years ago

which one of these ?

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

0
None
MarkFWaessam1

Answer 7 years ago

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

0
None
MarkFWaessam1

Answer 7 years ago

its a photo-transistor opto-isolator

0
None
aessam1

7 years ago

may you just put a simple circuit ?

0
None
MarkFWaessam1

Answer 7 years ago

Please refer to the diagram i roughly drew above