Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: Ocelot on February 05, 2014, 01:51:21 PM

Title: Isolation?
Post by: Ocelot on February 05, 2014, 01:51:21 PM
Hi all,

I'm looking for a low cost way to isolate a sensor (both power supply isolation and output isolation). Is it possible to do both with optoisolators? I looked at DC/DC converter isolator power modules but they are too expensive. I'd like to power this sensor with an Arduino but I need to isolate it.

Any thoughts?

Thanks
Title: Re: Isolation?
Post by: jwatte on February 05, 2014, 02:46:28 PM
Is the sensor digital or analog?
Does it require bi-directional communications?
In general, digital isolation (any number of lines) can be done with optoisolators.

If it's an analog sensor, you have to use something like an instrumentation amp to isolate it instead of an optocoupler.

Power isolation cannot be done with optoisolators, because they do not transfer power.
To do full isolation, you have to use an isolation DC/DC converter, or a separate battery.
You can build a DC/DC converter using a 555 timer or other PWM source, a transformer (winding ratio depends on input/output voltage,) a diode bridge, a capcitor, and a linear regulator. It won't be very efficient, but it'll work.
Title: Re: Isolation?
Post by: Ocelot on February 05, 2014, 02:48:58 PM
If it's an analog sensor, you have to use something like an instrumentation amp to isolate it instead of an optocoupler.

It's an analog sensor. Doesn't require bi-directional communication.

Why can't you use a optocoupler with an analog sensor? I was thinking about using PS2506. http://www.cel.com/pdf/datasheets/ps2506.pdf (http://www.cel.com/pdf/datasheets/ps2506.pdf)

Can you recommend a DC/DC converter?
Title: Re: Isolation?
Post by: waltr on February 05, 2014, 06:48:42 PM
Why can't you use a optocoupler with an analog sensor? I was thinking about using PS2506. http://www.cel.com/pdf/datasheets/ps2506.pdf (http://www.cel.com/pdf/datasheets/ps2506.pdf)
That opto is not a good choice due to its CTR varies greatly (200 to 2000%) with current, temperature and opto to opto. Look at the graphs in that data sheet.

It can be done but it is not easy as it requires a very carefully design circuit to do successfully. The best parts to do this is a lamp (light bulb) and a photo-resistive sensor (CDS) and a few Op-Amps. I've seen this done plenty of time in circuits built before the 1980's. Today, with cheap and readily available digital chips it is almost never done analog.

Quote
Can you recommend a DC/DC converter?

What is the input Voltage, output Voltage and current (or power) you require. There are hundreds available and yes there can be a bit pricey.
Title: Re: Isolation?
Post by: Ocelot on February 05, 2014, 07:20:20 PM
Why can't you use a optocoupler with an analog sensor? I was thinking about using PS2506. http://www.cel.com/pdf/datasheets/ps2506.pdf (http://www.cel.com/pdf/datasheets/ps2506.pdf)
That opto is not a good choice due to its CTR varies greatly (200 to 2000%) with current, temperature and opto to opto. Look at the graphs in that data sheet.
Can you suggest a better one? Also, why is the CTR important if I'm only concerned about the signal voltage. I'm trying to separate an ECG sensor from an Arduino analog pin.

It can be done but it is not easy as it requires a very carefully design circuit to do successfully. The best parts to do this is a lamp (light bulb) and a photo-resistive sensor (CDS) and a few Op-Amps. I've seen this done plenty of time in circuits built before the 1980's. Today, with cheap and readily available digital chips it is almost never done analog.
I'm not sure I follow you here. I still don't understand why it is difficult for an analog signal. Will an opto like the one I linked not work?

Quote
Can you recommend a DC/DC converter?

What is the input Voltage, output Voltage and current (or power) you require. There are hundreds available and yes there can be a bit pricey.

The sensor is an ECG sensor so the current needed is in the mA range. I'd like it to accept voltages between 4 and 9V and output the same voltage.
Title: Re: Isolation?
Post by: jwatte on February 05, 2014, 09:30:19 PM
Quote
Will an opto like the one I linked not work?

Not without VERY careful circuit design, that includes temperature compensation and per-device calibration.
Look at this diagram from the data sheet:

(http://watte.net/current-transfer.png)

This tells me that, at 25C, 0.95V gives me a forward current of 0.05 mA, and 1.3V gives me a forward current of 80 mA. However, at 0C, those move up by at least 0.5 volts! Same thing at 50C, etc.
The reason current transfer matters, is that you have to derive the output voltage using a voltage divider.

If the supply voltage on the output is 5V, and there is a 50 Ohm current limiting resistor on the output, then a forward current of 80 mA means the total resistance should be (5/0.08 = 62.5) ohms, so the optocoupler will be 12.5 Ohm impedance. A forward current of 10 mA (from that diagram) means the total resistance should be (5/0.01 = 500) ohms, so the optocoupler will be 450 Ohms impedance. A forward current of 1 mA means the optcoupler will be 4950 Ohms impedance. And the voltage differential between the current limiting resistor and the optocoupler will be the same -- 50:12.5, 50:450, 50:4950, which also means that the lower the output current, the more precision your analog converter needs to be.

An instrumentation amp with separately adjustable gain is a lot easier to deal with!
HCPL-7840 is available in DIP and seems legit, although a little pricey at $6.80 in singles:
http://www.digikey.com/product-detail/en/HCPL-7840-000E/516-1482-5-ND/669909 (http://www.digikey.com/product-detail/en/HCPL-7840-000E/516-1482-5-ND/669909)
Note that it contains an A/D converter powered from one end, and a D/A converter powered from the other end, with no galvanic contact in between!
I know that AD has some cheaper ones, but likely only in surface mount these days.

Digi-Key has a list of isolated board-mount DC/DC converters: http://www.digikey.com/product-search/en/power-supplies-board-mount/dc-dc-converters/4325599?k=isolated%20dc%20converter (http://www.digikey.com/product-search/en/power-supplies-board-mount/dc-dc-converters/4325599?k=isolated%20dc%20converter)
Note that these seldom give "the same voltage" out as in; rather, they give a fixed (or adjustable, specific) voltage out for a possible range of input voltages.
The Recom RE-0505S seems to be the cheapest. If you can live with 5V in, 5V out, isolation, you can get it for $2.75 in singles: http://www.digikey.com/product-detail/en/REE-0505S/945-1654-5-ND/3461633 (http://www.digikey.com/product-detail/en/REE-0505S/945-1654-5-ND/3461633)

Title: Re: Isolation?
Post by: waltr on February 06, 2014, 08:19:42 AM
Yep, jwatt laid out the CTR issue well.
How accurate do you need the Analog signal to be on the isolated side?

Quote
The sensor is an ECG sensor
If this is going to be attached to a human body you need very good PS isolation and preferably devices that have a Medical rating. This does up the cost a bit.

Since your sensor only requires a few mA would a battery be an option?
Title: Re: Isolation?
Post by: Ocelot on February 06, 2014, 08:59:19 AM
Yep, jwatt laid out the CTR issue well.
How accurate do you need the Analog signal to be on the isolated side?

Quote
The sensor is an ECG sensor
If this is going to be attached to a human body you need very good PS isolation and preferably devices that have a Medical rating. This does up the cost a bit.

Since your sensor only requires a few mA would a battery be an option?

Battery option is definitely on the table but if possible I'd like to power the sensor with an Arduino to simplify things. If it just makes thing much hairer then I'll just go with the battery option.

Is the output signal isolation as important as the PS isolation?
Title: Re: Isolation?
Post by: Ocelot on February 06, 2014, 09:20:51 AM
Quote
Will an opto like the one I linked not work?

Not without VERY careful circuit design, that includes temperature compensation and per-device calibration.
Look at this diagram from the data sheet:

(http://watte.net/current-transfer.png)

This tells me that, at 25C, 0.95V gives me a forward current of 0.05 mA, and 1.3V gives me a forward current of 80 mA. However, at 0C, those move up by at least 0.5 volts! Same thing at 50C, etc.
The reason current transfer matters, is that you have to derive the output voltage using a voltage divider.

If the supply voltage on the output is 5V, and there is a 50 Ohm current limiting resistor on the output, then a forward current of 80 mA means the total resistance should be (5/0.08 = 62.5) ohms, so the optocoupler will be 12.5 Ohm impedance. A forward current of 10 mA (from that diagram) means the total resistance should be (5/0.01 = 500) ohms, so the optocoupler will be 450 Ohms impedance. A forward current of 1 mA means the optcoupler will be 4950 Ohms impedance. And the voltage differential between the current limiting resistor and the optocoupler will be the same -- 50:12.5, 50:450, 50:4950, which also means that the lower the output current, the more precision your analog converter needs to be.

An instrumentation amp with separately adjustable gain is a lot easier to deal with!
HCPL-7840 is available in DIP and seems legit, although a little pricey at $6.80 in singles:
http://www.digikey.com/product-detail/en/HCPL-7840-000E/516-1482-5-ND/669909 (http://www.digikey.com/product-detail/en/HCPL-7840-000E/516-1482-5-ND/669909)
Note that it contains an A/D converter powered from one end, and a D/A converter powered from the other end, with no galvanic contact in between!
I know that AD has some cheaper ones, but likely only in surface mount these days.

Digi-Key has a list of isolated board-mount DC/DC converters: http://www.digikey.com/product-search/en/power-supplies-board-mount/dc-dc-converters/4325599?k=isolated%20dc%20converter (http://www.digikey.com/product-search/en/power-supplies-board-mount/dc-dc-converters/4325599?k=isolated%20dc%20converter)
Note that these seldom give "the same voltage" out as in; rather, they give a fixed (or adjustable, specific) voltage out for a possible range of input voltages.
The Recom RE-0505S seems to be the cheapest. If you can live with 5V in, 5V out, isolation, you can get it for $2.75 in singles: http://www.digikey.com/product-detail/en/REE-0505S/945-1654-5-ND/3461633 (http://www.digikey.com/product-detail/en/REE-0505S/945-1654-5-ND/3461633)

Thank you very much! That explanation was extremely helpful. I get why they won't work now. I'll take a look at the isolation amplifiers. Do you know if they can use single supplies? I think I looked at them previously but it looked like they were all dual supply.

BTW I actually prefer SMD packages. =)
Title: Re: Isolation?
Post by: jwatte on February 06, 2014, 11:24:37 AM
I think almost all isolation amps are dual supply, but given that you need a supply for your sensor, you could just use that supply for the amp, too.

To me, it looks as if the iso amp and the DC DC converter I linked will solve your problem, for < $10 (plus some soldering.)
Title: Re: Isolation?
Post by: Ocelot on February 06, 2014, 11:37:11 AM
I think almost all isolation amps are dual supply, but given that you need a supply for your sensor, you could just use that supply for the amp, too.

To me, it looks as if the iso amp and the DC DC converter I linked will solve your problem, for < $10 (plus some soldering.)

For the isolation amplifier, if I were to connect the low side to an Arduino would VOUT+ to an analog pin and both VOUT- and GND2 to the Arduino GND?
Title: Re: Isolation?
Post by: Ocelot on February 06, 2014, 01:40:00 PM
Would these be good substitutions to the ones you recommended?

PS Isolation
http://www.digikey.com/product-detail/en/R1SE-0505-R/945-1659-2-ND/3593408 (http://www.digikey.com/product-detail/en/R1SE-0505-R/945-1659-2-ND/3593408)

Output Isolation
http://www.digikey.com/product-detail/en/ACPL-C870-000E/516-2578-5-ND/3523705 (http://www.digikey.com/product-detail/en/ACPL-C870-000E/516-2578-5-ND/3523705)
Title: Re: Isolation?
Post by: jwatte on February 07, 2014, 11:16:57 AM
On the "internal" end:

Arduino +5V -> VCC
Arduino Analog Pin -> Output +
Arduino Ground -> Output -
Arduino Ground -> GND

On the "external" end:

DCDC +5V -> Sensor VCC
Sensor output -> Input +
DCDC GND -> Input -
DCDC GND -> Sensor GND

The DC DC converter you linked to looks fine, except you linked to the 500-lot listing. Are you building a lot of these? :-)
It's only $3.98 in singles, though, so not so bad.

The ACPL-C87 also seems fine -- note the "0 to 2 V Nominal Input Range" part, though! You may need a resistive divider on the input. Also, the negative output does not want to be tied to ground -- you need to read the positive and the negative outputs separately (two analog pins) and subtract the negative from the positive. At 0V in, they are both at +1.23V out.