Photo MOSFET for switchable CAN termination resistor - Page 1
Forum section: electronics / projects

author: jars121
author_rank: Regular Contributor
timestamp: December 08, 2020, 01:33:39 am
content: Hi,I found the following thread which addresses this same topic, but figured I wouldn't revive/pollute that thread given my specific questions.https://www.eevblog.com/forum/projects/switchable-can-bus-terminating-resistor/I'm trying to add the ability to programmatically turn on/off a CAN termination resistor. I've done a fair amount of research on this, and have evaluated numerous designs using analog switches, FETs, optocouplers, etc. I'm using an isolated CAN transceiver design, such that the CAN_H/CAN_L and CAN_GND/CAN_PWR circuitry is all isolated from the rest of the board. The requirement to maintain isolation for the termination resistor component has steered me away from certain methods, and has made the photo MOSFET option seem quite reasonable.I found the attached schematic in an RS485 App Note by EXAR (https://www.maxlinear.com/appnote/an212_rs485-termination-resistor-switch-solution_080911.pdf):My questions:Is there any reason why this same approach using the AQY282S wouldn't work for my isolated CAN termination resistor? Note that I'll be enabling the LED with a 3V3 signal from an MCU, not 5V as shown.The AQY282S has a maximum 'on' resistance of 2.5 Ohms; would a single 118 Ohm resistor between CAN_H and the AQY282S be sufficient, or would it be better to use 59 Ohm resistors on both CAN_H and CAN_L traces?Do the connections between the CAN_H and CAN_L (via the resistor(s) and the AQY282S) need to be symmetrical, or can I get away with the trace connections being slightly asymmetrical? I'm mindful of the space available for placement of the AQY282S and the resistor(s), so I might need to get creative with routing.Any clarification would be greatly appreciated!EDIT: Follow up question: if this is a suitable approach, is anyone aware of a similarly performing photo MOSFET in a smaller package? It may be quite a challenge to fit the AQY282S SOP-4!

author: BrianHG
author_rank: Super Contributor
timestamp: December 08, 2020, 05:36:34 am
content: You can do this with a CMOS analog switch as well. Logic input, no LED current to drive. But, your control logic will need to fit within the CAN +&- voltage range.Example:https://www.onsemi.com/products/interfaces/analog-switches/mc74vhc1gt66Note that the 'ON' resistance is 45ohm when powered from 5v. So you need to calculate that from your 120ohm in your termination circuit.If you have access to a negative supply, you can just use 2 back-2-back N-channel mosfets which supports a positive and negative gate input voltage. Or if you have a higher + rail to access, you can do the same trick with 2 P-channel mosfets.

author: jars121
author_rank: Regular Contributor
timestamp: December 08, 2020, 05:53:42 am
content: Thanks for your input Brian.My issue with the CMOS analog switch (or back-to-back FETs in general), is that I'm not sure how they provide isolation between the CAN circuit (CAN_H and CAN_L via the termination resistor) and the control logic circuit.I understand the benefit of not having to drive the LED, but I'm not sure how to maintain galvanic isolation of the CAN circuitry with an analog switch. I completely recognise that I may be missing the bigger picture here, so I'm more than happy to be corrected!

author: Berni
author_rank: Super Contributor
timestamp: December 08, 2020, 06:13:19 am
content: Yep this is pretty much the easiest way to do it and should work fine.No need to worry about symmetry or the resistance being slightly off. At the speeds CAN runs its not really a problem and the cables used for CAN typically don't have very tight tolerance impedance anyway.As for using a CMOS switch chip for this. It is a bad idea. While theoretically CAN signals are only a few volts in practice CAN transceiver chips are designed to handle very large common mode voltages. A good proper CAN transceiver can receive a signal on the bus even if it is riding on top of +24V or -24V of DC offset, they also have very robust inputs that can survive quite a bit of crap being sent into it without blowing up the chip. So to keep the same sort of common mode rejection and robustness the switch would also need to be able to survive that.If the LED current consumption is an issue you can go find a tiny latching relay

author: BrianHG
author_rank: Super Contributor
timestamp: December 08, 2020, 06:18:00 am
content: So long as the CAN+ & - do note exceed VCC by 0.5v and do not go below GND by 0.5v that you supply the analog switch, that pair will float or just be tied together like a 45ohm resistor with no connection other than a few pf capacitance to VCC & GND and between them. The added capacitance would be equivilant to an additional ~foot of cable.Berni is correct about the analog switch would probably fry is your can bus provides a large +/-24v DC source offset.

author: jars121
author_rank: Regular Contributor
timestamp: December 08, 2020, 06:21:09 am
content: Thanks Berni, much appreciated.The common mode issue was something else I had pondered. My transceiver does indeed support operation at upwards of 25V offset, which was another reason I was attracted to the completely isolated photo MOSFET approach.The current consumption for the AQY282S shouldn't be too bad. I should be able to source 5mA from the MCU output, which is more than enough for the AQY282S.The final question, per my earlier edit. Is a SOP-4 (4.4mmx4.3mm) likely going to be the smallest footprint for this type of photo MOSFET? I've trawled through the various supplier's sites and it may well be, but I figured I'd ask as it's still fairly sizeable.

author: Jeroen3
author_rank: Super Contributor
timestamp: December 08, 2020, 06:44:25 am
content: Doing this would make your bus to go down when your device turns off or malfunctions.

author: jars121
author_rank: Regular Contributor
timestamp: December 08, 2020, 07:10:08 am
content: How else can one provide programmable termination in that case? Having a DIP switch or header isn't possible in my case, it needs to be programmatically.

author: BrianHG
author_rank: Super Contributor
timestamp: December 08, 2020, 08:03:37 am
content: OK, what about a latching telecom relay?

author: David Hess
author_rank: Super Contributor
timestamp: December 08, 2020, 10:05:22 am
content: Quote from: jars121 on December 08, 2020, 01:33:39 amNo, it will work fine.QuoteA more symmetrical layout would matter if the frequencies were higher but CAN is not fast enough for this to be an issue.QuoteOptical isolation places a lower limit on package size to fit everything.Quote from: jars121 on December 08, 2020, 05:53:42 amDirect control of the MOSFET can work because the capacitance between the gate and drain/source is pretty low, albeit higher than the optocoupler solution. An analog switch or JFET could be used in this application. There are ways to do it with diodes but they are only advantageous at high frequencies.Quote from: jars121 on December 08, 2020, 07:10:08 amA transformer could provide the isolation to drive the FET. Linear Technology used to have their LTC1177 for implementing SSRs but it is discontinued and larger than the smallest optical solution anyway.

author: jars121
author_rank: Regular Contributor
timestamp: December 08, 2020, 10:16:52 am
content: I wouldn't have the space for a latching relay of that nature unfortunately.My understanding of Jeroen3's comment is the issue is more to do with my device causing a bus off error if the device were to fail. Surely this is no different to any CAN device with manual termination (i.e. using a header with jumper)?The intended process is for the device to power on, read configuration data from non-volatile memory, and either enable or disable the termination resistor. This could take take several seconds (access to the non-volatile memory isn't instantaneous), all the while the device is 'on the bus'. I haven't yet determined how to manage/account for this scenario. I've started with the switchable termination resistor, because it's a requirement of the design (as mentioned before, the ability to enable/disable the resistor is a hard requirement, and a physical/manual means for doing so isn't possible), but I still don't have all the answers figured outEDIT: Thank you for your post David, much appreciated!

author: Fid
author_rank: Contributor
timestamp: December 28, 2024, 02:53:24 am
content: Quite the old post, but did you ever find a good solution for this?

author: Smokey
author_rank: Super Contributor
timestamp: December 28, 2024, 03:10:27 am
content: https://www.ti.com/lit/ug/tiducf3/tiducf3.pdf

author: Fid
author_rank: Contributor
timestamp: January 09, 2025, 02:46:04 pm
content: Looks simple enough. Thank you!