I purchased Numato Lab's Opto Isolator breakout board to use between an Arduino Mega and and Arduino Uno.
I tried using i/o pins input and output and had issues with the Uno affecting the Mega
I have a question as to how to connect this and how to confuigure the pins for input output to digital write and digital read.
The Mega is setting pins low when I want the Uno to react by reading that change from high to low
I'd suspect the communication protocol you're using (which you haven't described)
Are you just at the stage of it detecting when high? Or did you jump ahead and attempt to send data at some arbitrary baud rate? Or are you using some library (which you haven't described)
Yes, I believe it is a baudrate issue which is why I wan to use the opto isolators. Yhe Uno is using standard 9600, but the Mega is set to 500,000. There is a reason for this. I just need to trigger the Uno to play.
I am thinking of opto islators or a relay module to isolate them
What is causing the interference is not an issue at this point. I just want to know how to connect the opto isolator in the image and how to configure the pins.
So you're not sending data, you only want a trigger? What do you mean 'Uno is using standard 9600'?
If I understand what little you've provided, you want board1 to write the LED (in the opto) HIGH, and have board2 read it. Correct?
Start by not using the opto. Use a simple visible LED. Does it turn on when you want it to? If so, then that board is done. The opto on that side is nothing more than an LED.
For the receiving side, you want +v going into the opto, and out the other side into a pin that is being read. This only works in one direction (as typical diodes do). You'll need a pulldown.
INTP:
For the receiving side, you want +v going into the opto, and out the other side into a pin that is being read. This only works in one direction (as typical diodes do). You'll need a pulldown.
The module ha resistors built in R1 and R2 1K. Should I add more resistors?
thanks
I will read between the lines such that INPUTS=UNO and OUTPUTS=MEGA
Why are the inputs connected to the LEDs?
What input and output voltage is the board designed to handle, as you mention is has built in resistors (not shown in the drawing, by the way).
Goes-outtas always connect to Goes-innas. Outputs to inputs. The output of the Mega needs to connect to the input of the opto. The input to the opto is the LED. The output of the opto (the transistor connects to the inputs on the UNO.
The LED side is easy. Output pin->current limiting resistor->LED->ground. (OP drawing is correct other than the LED is connected to the block label INPUTS, connected to OUTPUTS would be perfect).
The transistor side is trickier. There must be power and ground available to supply to the input pin of the UNO. We are working with 3 connections 5V, Ground, and input. How to make those?
Connection 1: Connect 5V to the transistor (as shown)
Connection 2: The other side of the transistor to the resistor and to the UNO input
Connection 3: Resistor to ground
In short, the as INTP alluded to, you don't have a connection to ground (no pulldown) therefore you have nothing available to supply a power logic 0 to the UNO.
I don't have access to draw the schematic, but if you repost the modified one we can check it again.
If that schematic is correct, yes you need to add pull-down resistors. Those go between the output pin of the board (or the input pin of your Arduino) and GND.