Octocoupler Strange Open State Behaviour - Page 1
Forum section: electronics / projects

author: mattg443
author_rank: Newbie
timestamp: October 26, 2018, 05:26:05 pm
content: 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

author: madires
author_rank: Super Contributor
timestamp: October 26, 2018, 05:44:12 pm
content: 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.

author: SiliconWizard
author_rank: Super Contributor
timestamp: October 26, 2018, 06:16:13 pm
content: 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?

author: Wolfram
author_rank: Frequent Contributor
timestamp: October 26, 2018, 08:32:36 pm
content: 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.

author: mattg443
author_rank: Newbie
timestamp: October 29, 2018, 03:56:22 pm
content: 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.

author: Wolfram
author_rank: Frequent Contributor
timestamp: October 29, 2018, 05:57:02 pm
content: 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.

author: mattg443
author_rank: Newbie
timestamp: October 29, 2018, 06:24:35 pm
content: 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.

author: SiliconWizard
author_rank: Super Contributor
timestamp: October 29, 2018, 06:58:52 pm
content: 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).

author: mattg443
author_rank: Newbie
timestamp: October 29, 2018, 08:15:02 pm
content: 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.

author: tooki
author_rank: Super Contributor
timestamp: October 29, 2018, 11:32:14 pm
content: P.S. It's optocoupler, not octocoupler. "Opto" as in optical coupler.

author: SiliconWizard
author_rank: Super Contributor
timestamp: October 30, 2018, 03:01:49 am
content: Quote from: mattg443 on October 29, 2018, 08:15:02 pmYou 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.

author: David Hess
author_rank: Super Contributor
timestamp: October 31, 2018, 08:05:42 pm
content: 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.