Opto Isolated Serial

Status
Not open for further replies.

FAlameda

Active member
Hi all,

I'm planning to interface a Teensy 3.5 system to a RAMPS 3D printer type motion driver. The motion system uses a 5V Arduino with a 5 Volt Serial TX/RX communication port.

As the two systems are going to use different wall plugs, different power supplies and long cables, I would like to use an opto-isolated interface with separate GNDs for de level shift (3V -> 5V, 3V <- 5V)

Is there a ‘bidirectional’ breakout board ready to use, with two channels one in each direction?

Or can someone recommend me a simple schematic preferably with thru hole components?

Speed is not critical, a baud rate of 9600 bps would be enough.

And another question: When a Serial port is idle between transmissions, is the inactive TX pin HIGH or LOW?

Many thanks
 
Yes, I was studying those schematics but there are several problems.

They are unidirectional, they only isolate the Midi input. We must assume that the Midi device at the other end has its own opto-insulated input.

I do not have 5V in the Teensy system, which seems to be needed to power the 6N138 thing.

I'm not sure those opto-insolation circuits are non-inverting (I think that Serial communication will stop working if the 1 and 0 are interchanged.)
 
The answer to your last question depends on the signal type.

And another question: When a Serial port is idle between transmissions, is the inactive TX pin HIGH or LOW?

The signals at Teensy's pins are called called "TTL level" serial. The signal is high when idle.

RS232 signal levels, commonly used on 9 pin D-sub serial port connectors have higher voltage and the opposite polarity. Typically those are -5V to -12V when idle.
 
Yes, I was studying those schematics but there are several problems.

They are unidirectional, they only isolate the Midi input. We must assume that the Midi device at the other end has its own opto-insulated input.

I do not have 5V in the Teensy system, which seems to be needed to power the 6N138 thing.

I'm not sure those opto-insolation circuits are non-inverting (I think that Serial communication will stop working if the 1 and 0 are interchanged.)

As part of the MIDI spec every input of a device has an opto-isolator, every communication line only needs one opto-isolator so the output line does not have it’s own because when it’s plugged into the input of another device the opto-isolator for that line is thus satisfied. That being said, there is nothing stopping you from having another opto-isolator on the output in conjunction with the input it’s just not strictly necessary.

As far as I know opto-isolators can be made to invert depending on how you connect the led side of it, but in the case of standard MIDI it is not inverted. Some MIDI circuits may recommend you place a buffer after the opto-isolator and in which case there are inverting and noninverting buffers, so you would either use two inverting or one noninverting buffer for that and again not strictly necessary.

If you are powering a Teensy from a standard usb then you do have 5v that you can use to power the 6N138, obviously usb is inherently always at or close to 5v so you can solder a pin or wire to VUSB or if you haven’t cut the trace separating them you could use VIN as well.
 
Many thanks.

I will study and try these ideas.

I thought that this would be a more widespread problem and that someone would have developed a ready-to-use Tindie breakout board.
 
Status
Not open for further replies.
Back
Top