Shop OBEX P1 Docs P2 Docs Learn Events
Optocoupler vs. Optoisolator — Parallax Forums

Optocoupler vs. Optoisolator

Alex41Alex41 Posts: 112
edited 2008-03-02 02:51 in General Discussion
Hello all,

I am using my SX chip in an automotive environment. Right now it is still in a breadboard and not yet installed in an electrically noisy environment. According to other posts a sort of isolation is highly recommended. I recently bought some LTV-826 Optoisolators, thinking that they are what·I needed to isolate the SX pins from a noisy input. I see there are also Optocouplers. Which do·I need and how are they best used? The datasheets I found don't help me with this. Any help to point me in the right direction would be greatly appreciated.

I've also discovered that the vehicles on-board computer (ECU) has a different ground that the chassis ground. All the sensors seem to run off of 5v and the source of this comes from the ECU itself. I need to power the SX chip and a few basic components. I'll make the assumption that any source from the vehicles·ECU doesn't have enough current to run the SX chip. I don't want to try it either as I don't want to buy another ECU!! Running the SX off of the battery is no problem with the correct voltage regulator, but what about the grounds being different? Is this where an optocoupler/isolator also comes to the rescue?

Thanks for any help,
Alex

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
If at first you don't succeed, then skydiving is not for you.

Comments

  • crgwbrcrgwbr Posts: 614
    edited 2008-02-18 21:23
    I believe optocouplers and optoisolaters are the same thing.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My system: 1.6 GHz AMD Turion64 X2, 4GB DDR2, 256MB ATI Radeon Graphics card, 15.4" Widescreen HD Screen

    I have a duel boot of Ubuntu Linux and Windows Vista. Vista, because it came with the PC, Ubuntu because I like software that works.

    "Failure is not an option -- it comes bundled with Windows."

    Use The Best...
    Linux for Servers
    Mac for Graphics
    Palm for Mobility
    Windows for Solitaire
  • Alex41Alex41 Posts: 112
    edited 2008-02-18 21:39
    That could certianly be true, I haven't found a lot of info on the web.

    Can anyone confirm this?

    Alex

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If at first you don't succeed, then skydiving is not for you.
  • stamptrolstamptrol Posts: 1,731
    edited 2008-02-19 01:54
    Alex,

    While they both do more or less the same job, there are slight differences, largely based on the original designs.

    The early opto-isolators used a light source (including an incandescant bulb) shining on a light-dependant resistor (ie a photo-cell). As the light source got brighter, the LDR responded by changing resistance. The light source and the LDR were mounted in a piece of bakelite tubing.

    When LEDs came along, it made sense to replace the light source with the LED; when photo-transistors came along, it made sense to replace the LDR.
    To distinguish things, it generally came about that the LED-based units were called opto-couplers.

    I've seen the old style opto-isolators at Digikey from time to time. Very expensive compared to modern opto-couplers.

    Cheers,

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2008-02-19 12:04
    Language changes over time and I suspect today that they have evolved to mean the same thing as the older product disappears. What you really want is to make sure the product has a spec sheet that verifies your desired use.
    Both perform the same function of isolation and the newer ones are much better.

    In some cases, terms are regional. For instance, those funny glass octal precursors to the transistors: the Brits call them valves, but Americans call them tubes. Go figure. {Their cars have boots and bonnets, while American cars don't wear clothes}

    Some terms linger in linguistic hell forever. After 14 years, I have yet to be able to get Chinese learners to understand the differences between electric and electronic. But that is another story.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    PLEASE CONSIDER the following:

    Do you want a quickly operational black box solution or the knowledge included therein?······
    ···················· Tropically,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • ChrisPChrisP Posts: 136
    edited 2008-02-20 00:01
    In a really nasty high noise environment it pays to do the math when you lay out your pullup and current limiters. Look at the current transfer ratio of your favotire device and then do the math so your just above the threshold to switch.
    I use PS2505's from digikey, single channel versions are in the 60 cent range.

    Thanks again to Beau Schwab for turning me on to em and explaining it originaly, its made my life soooo much easier. Learned the hard way, in noisy environments, they arent just a good idea, they are an absolute necesity to avoid false triggering.

    Attached is a sample, Capacitor C is optional for really extra mean nasty noisy environments.

    Post Edited (ChrisP) : 2/20/2008 12:18:04 AM GMT
    368 x 520 - 25K
  • Alex41Alex41 Posts: 112
    edited 2008-02-20 02:08
    ChrisP,

    Thanks for the help, I see that theoptcoupler has 2 leds to allow it to work if the current flows in either direction. Is that needed for DC, or just a good idea?

    I see one side you have 5v and the other is 12v, with the 12v side powering the optocoupler. I read the max voltage on these things is about 35v, so just about anything with a 12v system should work.

    Thanks for the simple schematic, that helps a lot.


    Alex

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If at first you don't succeed, then skydiving is not for you.
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2008-02-20 16:31
    As indicated this may just be semantics, but I always thought of an Optoisolator as something completely sealed where the "light beam" could not be interrupted other than from the light source itself, where as a Optocoupler (could) have the "light beam" interrupted by some external object between the light source, and the light receiver.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • ChrisPChrisP Posts: 136
    edited 2008-02-22 03:33
    Alex,
    The 12v side would be the interface to the outside world in a typical automotive application, and the 5v side is the nice comfy well regulated and filtered microcontroller side of things. The PS2505's that I'm partial to actually have an 80 Volt rating, however thats on the output <microcontroller side> in this case, so its the LED current that your concerned with. With the proper current limiting resistor you can light a 2.5 volt led from a 100V supply.

    What I ran into early on learning the SX was random input triggering on a motorcycle application, what I learned here after beating my head against the wall for a few days was even with a zener etc etc, the SX input uses so little current and is so fast that in practical application its almost entirely voltage based. With minimal current, almost anything can induce enough voltage to trip your input.

    (My lesson learned)
    An optoisolater makes your input current based instead of voltage, the schematic above takes about 5ma or so on the 12V side to trip the the transistor which grounds your IO pin pulling the 1k resistor on the 5V side low.

    Yes, that is an AC opto, works just fine on DC as well, and in my case I use a voltage divider on the 12V side so it can be triggered with either a negative or positive signal. For me its just handier because since it works either way it covers many applications for me. As long as you observe polarity for DC a standard one with one led works just fine.

    In practice, its a really fantastic noise filter as well as protecting whatever you have it hooked up to and interfacing with various voltage sources for your inputs all in one little chip.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2008-02-23 13:25
    ChrisP,
    I have been thinking that the optosolators were just to avoid zapping the microprocessor, but it is very interesting that they can also avoid the production of voltage spikes causing false highs. A lot of 120 AC equipment is running with a pilot light that is merely a diode, a current limiting resistor, and an LED. So high voltage is not a problem if it doesn't translate into high wattage.

    Beau,
    This is a typical situation in modern technology. Different groups begin to differentiated in different ways that are useful among themselves unless some authority standarizes the lexicon. With the fast pace of change and rapid dispersal of technology, you may never get one definition.

    Here we have:
    1. older device vs newer device
    2. light path isolated vs light path can be interrupted
    3. AC transmission vs. DC transmission

    Similar things happen with pronunciation and I still am not surehow to say Viagra. It is generally not in dictionaries.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    PLEASE CONSIDER the following:

    Do you want a quickly operational black box solution or the knowledge included therein?······
    ···················· Tropically,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan

    Post Edited (Kramer) : 2/23/2008 1:31:51 PM GMT
  • ChrisPChrisP Posts: 136
    edited 2008-02-24 06:06
    Kramer said...
    ChrisP,
    I have been thinking that the optosolators were just to avoid zapping the microprocessor, but it is very interesting that they can also avoid the production of voltage spikes causing false highs. A lot of 120 AC equipment is running with a pilot light that is merely a diode, a current limiting resistor, and an LED. So high voltage is not a problem if it doesn't translate into high wattage.

    Kramer, it was Beau who pointed it out to me a couple of years ago when I was having false triggering problems due to noisy supply voltage and my wiring being routed with other wires in a harness. The diode in a PS2505 is rated for 80ma max, triggers down to 5ma easily, and will take a 1 Amp 100us peak hit with 1% duty cycle. Depending on how you pullup the output, and current limit the input you can avoid triggering on some pretty big spikes. I imagine that they do light the internal LED, but without enough current transfer to overcome the pullup or pull down on the output.

    Current based instead of voltage, without X watts of power, no trigger. On a 12 volt system its easy to soak up a few milliamps without getting a false trigger, and survive very short spikes over 100 volts. That may sound ludicrous but an Npowershot solenoid OS does NOT have an internal diode and will generate very short spikes upwards of 70+ volts if left unclamped.

    Dual purpose, filter and protection!!

    Thanks again Beau, its still one of the most important things that I learned!

    ·
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2008-02-25 06:32
    Thanks, apparently all automotive is most problematic because large loads are switches on a closed system. Mainly, the horn, the high beams, brake lights, and alternator are the offenders. At least on house wiring, the system is open ended and allows spikes to disperse over distances.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    PLEASE CONSIDER the following:

    Do you want a quickly operational black box solution or the knowledge included therein?······
    ···················· Tropically,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • Alex41Alex41 Posts: 112
    edited 2008-02-26 21:07
    Thanks for all the good info.

    One problem I'm facing is that various sensors on a car have a different ground than the chassis ground. but at the same time I need to bring them together, meaning power my SX chip from the vehicles power and use the pins to read some sensors. I know the car's computer will flip out if I ground it to the chassis ground. So what do I do about this? Can an optocoupler work or maybe a high value resistor. I'd rather get some more info before possibly damaging something.

    Thanks,
    Alex

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If at first you don't succeed, then skydiving is not for you.
  • ChrisPChrisP Posts: 136
    edited 2008-02-27 02:48
    For on and off an opto should work fine depending. A lot of what your looking for depends on "which" sensor your trying to intercept or splice into, or replace, or or or...... More information would make it a lot easier for someone to offer help.
  • Alex41Alex41 Posts: 112
    edited 2008-02-27 05:19
    The sensors I have come across so far, and the ones I'd like to read, either put out a frequency or a voltage.
    Due to the help from this thread, I think I've got the frequency ones figured out. Basically just ON/OFF.
    The voltage ones have me puzzled, hence the questions. The grounds are different than the vehicle grounds. The voltage range is from 0 to 5v. I'd like to read them with an ADC. Perhaps an optocoupler on the data stream to/from the SX?

    Thanks,
    Alex
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2008-02-27 12:56
    Well if the voltage output of the sensors may not have any power. If that is the case, you might have to include an op amp to drive the ADC. If all you want is to have an ON/OFF toggle and not a measurement, you can have the op amp or comparator drive the LED in the optoisolator directly. The op amp [noparse][[/noparse]comparator] can be adjusted to trigger the LED at just the right level via a potentiometer.

    IN fact, the SXes have one built in comparator that you can use if you only need one.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    PLEASE CONSIDER the following:

    Do you want a quickly operational black box solution or the knowledge included therein?······
    ···················· Tropically,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • Alex41Alex41 Posts: 112
    edited 2008-02-27 14:08
    I would like to measure the full voltage range of a sensor. No trigger at a certain voltage level. I am using a ADC independent of the SX chip. If I use an op-amp I still need to power it. My research so far indicates that one isn't needed. How do I do that on a voltage that has an independent ground of the rest of the electrical system?

    Alex

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If at first you don't succeed, then skydiving is not for you.
  • Junk_BotJunk_Bot Posts: 15
    edited 2008-02-27 15:39
    It is possible to use the full range of a Analog to digital converter without worrying about zapping it with voltage spikes.

    This can be done in different ways, one method I have seen is putting a zener diode in between the input and ground.

    Like in the diagram attached. Note that the zener is placed in such a manner that voltage cannot usually flow through it.

    The zener diode has a certain voltage at which point it allows current to flow through it.

    For a·5 volt ADC you would choose a 5.1 volt zener diode, any voltage spikes above 5.1 vots are sent to the ground.

    I am not sure how you can handle the independant ground problem, but this should help with limiting the voltage spikes.

    NOTE: This can be used on any type of input.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Never give up,·Never submit to the seemingly invincible enemy.
    812 x 613 - 18K
  • Alex41Alex41 Posts: 112
    edited 2008-02-27 16:16
    Junkbot,
    thanks for that idea. I'll incorporate that to keep the voltage spikes at bay.

    Still puzzled on the ground problem though.

    Alex

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If at first you don't succeed, then skydiving is not for you.

    Post Edited (Alex41) : 3/1/2008 1:19:45 AM GMT
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2008-02-28 04:09
    You can remove the extra posts and the apology, but other's cannot. After you do so, I'll remove this comment.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    PLEASE CONSIDER the following:

    Do you want a quickly operational black box solution or the knowledge included therein?······
    ···················· Tropically,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • Junk_BotJunk_Bot Posts: 15
    edited 2008-02-28 17:36
    The problem with the independant ground has me stumped, it might be the car battery's ground, but I am not sure.

    However, a workable alternative might be to interface the SX chip with the car's ECU diagnostic's port.

    I know you can read all sorts of data from these ports, such as fuel consumption, rpm, ect.

    It is also possible to read individual sensor data from the diagnostics port.

    You can buy attachments for laptops that interface in between the ECU and a USB port on the laptop.

    I am pretty sure you could do the same thing with a SX chip.

    I don't know how the ECU diagnostics port works however.

    You would have to look that up.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Never give up,·Never submit to the seemingly invincible enemy.
  • ChrisPChrisP Posts: 136
    edited 2008-02-28 23:43
    Think I'm starting to understand what your trying to do.... The ECU of course has various internaly regulated power supplies. Most of the sensors are 5 volts.

    You should be able to access the ECU's logic ground through the diagnostic port, normally there is a ground wire there thats tied directly to logic ground in the ECU. Be very careful tying electronics into your ECU, they tend to be expensive and without knowing the power supply architecture it may be somewhat dangerous to its health.

    On the flip side, something may be wrong with your measurements, schnitz racing manufactures something they call a TPRMS or close to that, its a RPM and throttle position window switch, works on cars, bikes, etc etc. Samples the throttle position sensor through only one wire. So its possible to do but I have no idea how without tying the grounds together........
  • Alex41Alex41 Posts: 112
    edited 2008-03-01 00:27
    Yes,

    The ECU has its own electronics and power supplies. The ground of the ECU·has a different potential than the vehicle chassis and battery ground.

    I would guess the voltage going to a sensor does not have the amperage to run the SX chip, and I'm not willing to try it - too expensive if I'm wrong. The diagnostic port may be a solution. I'd like to stay with running the SX chip off of battery power and having it read the sensors directly, so I still need a way of combining the grounds without having the vehicles ECU flip out.

    Is perhaps an isolation transformer an answer?

    I'm kind of stumped right now, I thought perhaps an optocoupler was an answer, but it doesn't seem that way.

    Alex

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If at first you don't succeed, then skydiving is not for you.
  • ChrisPChrisP Posts: 136
    edited 2008-03-01 23:54
    As others stated above, the answer is most likely some type of unity gain op amp to carry the load and read the sensor directly. All I was saying is that even though the ground potentional may be different as long as its stable this can be compensated in your op amp circuit [noparse]:)[/noparse]
  • Alex41Alex41 Posts: 112
    edited 2008-03-02 02:51
    Chris,

    I think I'm beginning to understand this a bit more. I'll try an op amp and see how that works. Amplifying the sensor's signal isn't a bad idea as the amperage on these are very low, just enough to run the sensor itself.

    I do believe the ground potential is stable, but will do some testing to make sure.

    Thanks,
    Alex

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If at first you don't succeed, then skydiving is not for you.
Sign In or Register to comment.