Opto Isolator Help

Good advice.

I’m short on time so just having it working as I need it to is good enough for now but I will probably come back to looking this deeper if I see the same issues with a slightly different version of the unit I had issues with since I plan on using a different model in the future.

1 Like

@RWB - I have a couple of thoughts:

Most of these were already mentioned above but I wanted to lay them out for you.

  • When using an electronic component such as an opto-isolator, it is critical that you download the data sheet and use that.

  • Using Resistor values that “Seem” good enough can work, but it can also lead to dramatically increased troubleshooting time. Take the time to do the math, and if you don’t know that math, take the time to learn it.

  • That opto-isolator is going to have a maximum switching frequency that could limit your baud rate for your solution. (Check the data sheet, do the math)

  • My gut feeling is that when you have all of the devices connected, you are probably getting a device which is trying to pull a pin high when not in use, and it is overpowering or distorting your serial signal. A grounding issue is also particularly likely.(@bko) You might try a serial data logger / protocol analyzer. Also, you could be getting some serial collisions if both of your devices are trying to respond at the same time. Check your protocol and device addresses. (This is pure speculation, not knowing anything about your serial devices.)

My (somewhat extensive) experience with industrial serial devices has shown me that connecting multiple different types of serial devices to a single Serial RS-232 bus and hoping for the best has a low chance of success in the best of circumstances. Just some food for thought.

Finally, I am in complete support of hacking things together because the parts are available and time is short, but I strongly recommend using a fit for purpose IC as suggested by @seulater for your final prototype / implementation.

Good Luck!

3 Likes