Author Topic: Octocoupler Strange Open State Behaviour  (Read 1725 times)

0 Members and 1 Guest are viewing this topic.

Offline mattg443Topic starter

  • Newbie
  • Posts: 4
  • Country: au
Octocoupler Strange Open State Behaviour
« on: October 26, 2018, 05:26:05 pm »
I'm using an CPC1018N octocoupler to switch on/off a 3v3 UART signal.

The first attachment shows the circuit setup. I turned off the octocouplerby lifting a pin on the control side, so no current can flow.

I'm having unexpected results when the octocoupler is off (open circuit) and send data on the UART. (Shown in the second attachment)

The problem is fixed when I add a 10k resistor and 10nF cap to VDD. (Third attachment)

I was under the impression that the load terminals should be extremely high impedance when no current flows through the control side.

When current flows through the control side, the signal passes through with no problems.

Is there an explanation of why the signal is able to pass through the switch, even though the switch *should* be in the open state? Possibly something related to the output of the switch floating?

Thanks,
Matt
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 8164
  • Country: de
  • A qualified hobbyist ;)
Re: Octocoupler Strange Open State Behaviour
« Reply #1 on: October 26, 2018, 05:44:12 pm »
The two back-to-back MOSFETs in the optocoupler have a leakage current. The datasheet states max. 1µA. This is the reason why you need a pull-up resistor.
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15360
  • Country: fr
Re: Octocoupler Strange Open State Behaviour
« Reply #2 on: October 26, 2018, 06:16:13 pm »
Leakage current in the off state as madires said.

Even if it were a perfect switch, a pull-up resistor would still be necessary anyway, otherwise, in the off state, the input of your buffer would be left floating, which would cause other problems.

Is the capacitor necessary though?
 

Offline Wolfram

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: no
Re: Octocoupler Strange Open State Behaviour
« Reply #3 on: October 26, 2018, 08:32:36 pm »
What's the capacitance across the optocoupler when it's off, and what's the input capacitance of your logic gate? These will form a capacitive voltage divider, potentially transmitting a significant fraction of your logic signal even when the optocoupler is off. Loading the logic line with 10 nF seems excessive, you can probably use a much lower value capacitor here.
 

Offline mattg443Topic starter

  • Newbie
  • Posts: 4
  • Country: au
Re: Octocoupler Strange Open State Behaviour
« Reply #4 on: October 29, 2018, 03:56:22 pm »
Thanks for the replies. It helped with pointing me in the right direction to start looking.

I found that with a 10k pullup, some of the pulses from the input where still present on the output, even when the device was in the "off state". The pulses where reduced with a 1k pullup, but still present at the output of the buffer.

I agree, 10nF is likely too much capacitance, but it's what I had handy at the time to test.

After some more reading, I understand that there is a this part is a solid state relay, slightly different from an octocoupler.

Ultimately, I would like to implement a SPDT switch using SPST solid state relays. I would like to see a good app note/reference design on how to do this, especially with reference on where pullups/pulldowns are required for using solid state (as opposed to electromechancial) devices.
 

Offline Wolfram

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: no
Re: Octocoupler Strange Open State Behaviour
« Reply #5 on: October 29, 2018, 05:57:02 pm »
Does the control signal need galvanic isolation from the signal that you are controlling? If not, the 74LVC1G3157 could be a candidate, being a SPDT switch, you can configure it to ground the output when in the off-state to minimize feed-through. Of course, if the signal you are controlling is a pure unidirectional logic signal, a simple AND gate will solve the problem in an elegant way.
 

Offline mattg443Topic starter

  • Newbie
  • Posts: 4
  • Country: au
Re: Octocoupler Strange Open State Behaviour
« Reply #6 on: October 29, 2018, 06:24:35 pm »
Yes, I need galvanic isolation and the signal is bidirectional (RS485). So unforunately, those won't work.

So far, I've tried variations of pullup resistors like I posted above with no success in stopping the signal flowing through when in the "off" state. But it works fine in a SPST configuration.
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15360
  • Country: fr
Re: Octocoupler Strange Open State Behaviour
« Reply #7 on: October 29, 2018, 06:58:52 pm »
From your schematic, you're only trying to isolate the control signal. I'm not sure why you're trying to switch a digital signal (UART TX) with some kind of analog switch?
You could just connect the UART TX to a tristate buffer for instance, with its output pulled-up, and controlled by your control signal after isolation (with a simple optocoupler or any other kind of digital isolator).
 

Offline mattg443Topic starter

  • Newbie
  • Posts: 4
  • Country: au
Re: Octocoupler Strange Open State Behaviour
« Reply #8 on: October 29, 2018, 08:15:02 pm »
That was a bad example in terms of isolation requirement.

One example of where we want to use the switch with isolation is to tie the TX+ to the RX+ and TX- to the RX- of an RS422 line, to convert between RS422 and RS485 with isolation from the control side.
 

Online tooki

  • Super Contributor
  • ***
  • Posts: 12669
  • Country: ch
Re: Octocoupler Strange Open State Behaviour
« Reply #9 on: October 29, 2018, 11:32:14 pm »
P.S. It's optocoupler, not octocoupler. "Opto" as in optical coupler. ;)
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15360
  • Country: fr
Re: Octocoupler Strange Open State Behaviour
« Reply #10 on: October 30, 2018, 03:01:49 am »
That was a bad example in terms of isolation requirement.

One example of where we want to use the switch with isolation is to tie the TX+ to the RX+ and TX- to the RX- of an RS422 line, to convert between RS422 and RS485 with isolation from the control side.

You should maybe show us with a diagram what you want to achieve - still a bit unclear to me.

All I can say so far is that with an RS485  transceiver, you can actually disable its output (which is the whole point), which will make it high impedance. There is no need for an extra switch, you could just control the output driver enable with an isolated digital signal, combined with the existing enable signal.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17167
  • Country: us
  • DavidH
Re: Octocoupler Strange Open State Behaviour
« Reply #11 on: October 31, 2018, 08:05:42 pm »
The leakage might not be a problem but the capacitance across the output is more than 100 picofarads at low voltages.  This is a common issue with analog multiplexers and made worse in this case because of the large output devices used.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf