Serial optoisolation

Iain_C

Member
Serial optoisolation / galvanic isolation

Hi all,

I'm basing this on Wilf's UIO circuit, but I want a bidirectional opto-isolated serial link.

Should the below work, or have I done SERIN incorrectly?



Best,
I.
 
Last edited:

hippy

Technical Support
Staff member
If this connects directly to a PC serial cable, and assuming I'm correct that opto isolators have low R when LED on, high R when LED off ...

For RX/Serial In - When the RX line is high, Pin 2 must also be high. RX high, LED lights, transistor becomes a low R, Pin 2 pulled high - Looks like that is okay. With +12V on the RX line you may want a larger than 200R current limiting resistor.

For TX - When Pin 7 is high, TX line must also be high. When Pin 7 is high, LED off, transistor becomes high R, TX floats - That's also okay but you'll probably need a pull up resistor to +5V/+12V for the PC to register a high.
 

Technical

Technical Support
Staff member
As hippy says you will need a pullup on the computer side ofTX, and that is not as easy as there is no 5V supply on the serial port.
 

Iain_C

Member
Thanks both.

Indeed, it doesn't currently work for me on breadboard.

I expected the Tx side to be fine as it's taken from Wilf's Universal IO schematic - Wilf, care to comment on lack of pull-up in that circuit?

Edit: Aha - perhaps you never intended that circuit to communicate with a PC :( Is there another way I can get galvanic isolation?
 
Last edited:

papaof2

Senior Member
You *might* be able to pick up power for the TX line at the PC by using a diode OR plus a resistor from the control leads (RTS, DTR, etc).

John
 

hippy

Technical Support
Staff member
I'm intrigued ... why the need for opto-isolation of the download interface anyway ?
 

andrew_qld

Senior Member
Talking of programming through opto's, this Reminds me of a commercial SMS alarm sender we use at work. It has 6 opto inputs and one of them is set up for programming the micro (an 8051) over 2 wires using proprietry software.

The "special" opto is a high speed one.

I have thought about using this idea in some Picaxe projects. I always liked the idea of protecting the poor innocent Picaxe from the nasty outside world with Opto's on all its inputs, even the programming interface.

Mind you, unless the opto's are socketted (or otherwise easilly replaceable), if you kill one opto you disable the whole board regardless of weather the processor survives.
 

hippy

Technical Support
Staff member
Lost in the Big Server Crash ....

Or use a 9V/PP3 battery or 6V battery pack.
 

Iain_C

Member
Also lost before the forum burped, my reply that I need full isolation for my EEG project :)

I'll try a couple of CR2032 (BIOS batteries) in series with the serial Tx line - many thanks for the great suggestion.

Andrew, the opto's are more for user protection than picaxe protection - good point though, I'll socket them, then they're perfectly welcome to blow if they feel the need to!
 

hippy

Technical Support
Staff member
Probably wasn't very clear in that brief comment; the battery's just for the pull up on the opto, PC-side :)
 
Top