opto isolation for usart...

Go To Last Post
18 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

I'm not at all familiar with opto isolation components. Does anyone have a recommendation for optically isolating signals between a PC and uC using:

standard rs232 (I am using you would isolate before something like a max232 chip)

-or-

I have a FTDI usb to ttl level cable I have been playing around with. It outputs 0v or 5v instead of the rs232 voltages. What could/would you use to opto isolate this?

Thanks,

Alan

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

When you opto-isolate, you need to figure out WHERE the power comes from on the other side of the isolator.

USB, for example, can be powered from the USB host. That would power an FT232 and that side of the isolator. So, that one is relatively easy.

But, standard RS232? You have a problem. The logical place is between a MAX232 and the micro, but then you have to have isolated power for the MAX232. You might be tempted to replace the MAX232 with an opto-isolator, but you would still need an isolated power source for the transmitter. No easy way, here!

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Jim,

Why not before the MAX232? Is it difficult to find an optoisolator that will work with rs232 voltages? What is commonly done in rs232 (non usb) circuits to handle this?

Thanks,

Alan

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

http://www.pkfamily.com/users/solson/eeg/isoRS232.gif

This is worth looking at. What speeds do you need?

oddbudman

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've build a FTDI based isolated USB->UART converter. It contains an isolated DC-DC converter and 6N137 optos. The converter is completely self powered and requires no other power than the USB power. Works like a charm with UART levels in the range of 1.5V to 14V. I've posted some pictures here.

Regards
Sebastian

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I have a FTDI usb to ttl level cable I have been playing around with. It outputs 0v or 5v instead of the rs232 voltages. What could/would you use to opto isolate this?

http://www.silabs.com/products/power/isolators/Pages/default.aspx

these work well (there are other vendors like Analog Devices) and are inexpensive (mouser and elsewhere)... use the 5v coming from the FTDI usb to ttl level cable to power one side of the isolator device and of course "the other isolated power supply" powers the other side of the isolator device. Decide on how many channels you need RXD + TXD only and/or handshake signals and pick an isolator...takes very little space or power compared to many opto solutions..used them extensively to replace optos in several designs.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Honestly, I have never needed isolated RS232. I can imagine where it might be useful, but if it were really needed, I'd go to optical fiber and forget the RS232 or USB for the transmission medium.

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

S-Sohn wrote:
I've build a FTDI based isolated USB->UART converter. It contains an isolated DC-DC converter and 6N137 optos. The converter is completely self powered and requires no other power than the USB power.

I've looked at the 6N137 datasheet and it shows when the input is L the output is H and vice versa. Why is it inverted and if using this between my FTDI cable and uC, wouldn't this be an issue?

*edit* I am guessing that more is needed to drive this properly. For those of you using something like a 6N137 to isolate a 0-5V signal, do you need a pullup resistor and inverter?

Thanks,

Alan

Last Edited: Wed. Jun 23, 2010 - 06:27 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ka7ehk wrote:
Honestly, I have never needed isolated RS232.
I wouldn't be surprised if you actually have isolated RS232 on your bench - factory build into some measuring instrument with RS232.

Stealing Proteus doesn't make you an engineer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Honestly, I have never needed isolated RS232. I can imagine where it might be useful, but if it were really needed, I'd go to optical fiber and forget the RS232 or USB for the transmission medium.
Sometimes I had ground trouble when trying to measure signals. Isolating my computer from my test setup helped me to avoid those issues.

Quote:
Why is it inverted and if using this between my FTDI cable and uC, wouldn't this be an issue?
This is not an issue because you can configure the FT232R to invert signals. The FT232R configuration can be done with the MProg tool which is available at ftdichip.com.

Regards
Sebastian

EDIT: I just saw that MProg is now replaced by FT_PROG. Both tools are available at the FTDI homepage.

Attachment(s): 

Last Edited: Wed. Jun 23, 2010 - 06:32 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Alan,

I did a project a few years ago that needed isolation to send data to a PC.

As Jim already noted, both sides of the circuit typically need power, and if you use USB for the PC interface then you have USB power available for that half of the circuit.

One option is to use a small DC-to-DC isolated power converter. For me it is much easier to purchase one than to design my own. One example would be the Murata Power Solutions DC-DC Converters, (Mouser), which come in a number of input and output voltage configurations, 1 KV isolation.

My project notes show I wanted to use C&D Technologies NMV Isolated 1 W DC/DC converters, which have 3 KVDC isolation rating. They are very small, much smaller than a 9V battery. I have a data sheet for them, but can't find a link to them at this second.

Turns out I couldn't get the module in time to ship the project out, so I ended up using two x 9V batteries for the isolated side.

I would do this project a bit differently these days, but such is life's learning curve... :roll: You can see the USB circuitry on the right hand side of the board, with the spacing between it and the remainder of the circuitry.

Project measured the output energy of a defibrillator, and plotted it's waveform. The defibrillator is the device you see on medical shows that is used to ZAP a person's heart to make it "beat again", (not really, but that is another discussion). They put out lots of amps at high voltage. Not good for a direct connection to a PC!

PC captured the data and generated a data plot, one example shown.

JC

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Sebastian,

Excellent; thanks for the screenshot!

Thanks,

Alan

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi JC,

Looks cool. I've got two things I am thinking about.

For one idea it would be completely USB bus powered (<75ma) and I am guessing there may not be a reason or point to isolate it.

The other thing I'd like to make for fun is a mains line monitor that watches and reports mains quality. One thought is isolating the interface between the FTDI and uC. It occurs to me that perhaps it would be better to make all of it including the uC USB powered and just isolate the parts that connect to mains which would be one ADC input. Would I need an analog type opto for that? Would I still need to generate a DC signal on the mains side to bias it to keep it a positive voltage after using a voltage divider?

Thanks,

Alan

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think my first approach would be to use a small step-down transformer, 120:12 VAC,or similar.
The transformer would provide the isolation, and the output voltage would track the input voltage.
One would put a resistive divider (and load) on the output, and feed your ADC input.
By tying one end of the transformer output/divider to Gnd, the output sin wave would ride "on top of Gnd".
Note well that you would need to clamp / protect the ADC input, there can be significant voltage spikes on the AC Mains, (Think nearby lightning strike during a thunder storm, or nearby motor noise, (air conditioner, refrigerator, etc.)
At 60 Hz it is easy to measure the voltage and frequency, and note power glitches.

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Maxim has isolated chips up to 15Kv. Perhaps instead of using the Max232, you could use the Max3380 or Max3232 or some other isolated part. They have a few to pick from.

Jeff

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Note well that you would need to clamp / protect the ADC input, there can be significant voltage spikes on the AC Mains, (Think nearby lightning strike during a thunder storm, or nearby motor noise, (air conditioner, refrigerator, etc.)

How timely, this event just occurred 1/2 hour ago, in town, as a storm passed through. Yet another cause for "Power Line Surges".
Mailman was trapped inside his vehicle, with wires down on it. Fortunately he knew enough not to step out of the vehicle!
You can see many of the wires all smushed together, harder to see the ones that snapped.

JC

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ka7ehk wrote:
Honestly, I have never needed isolated RS232. I can imagine where it might be useful, but if it were really needed, I'd go to optical fiber and forget the RS232 or USB for the transmission medium.

Jim

Standard requirement on any medical equipment. They also have pretty strict leakage current requirements anyway, compared to consumer electronics.

Also good for your bench, like multimeters and oscilloscopes. A non-isolated communication link to computer makes your battery operated multimeter grounded, and it will ground your oscilloscope so an isolating transformer is useless.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Black Box makes adapters off the shelf to do the job. Since you are going to the PC anyway why roll your own when you can get these..

http://www.blackbox.com/Store/Detail.aspx/USB-to-RS-232-Opto-Isolator/SP385A

And

http://www.blackbox.com/Store/Results.aspx/Power/Opto-Isolators/n-4294958596