Author Topic: Photo MOSFET for switchable CAN termination resistor  (Read 6898 times)

0 Members and 1 Guest are viewing this topic.

Offline jars121Topic starter

  • Regular Contributor
  • *
  • Posts: 78
  • Country: 00
Photo MOSFET for switchable CAN termination resistor
« on: December 08, 2020, 01:33:39 am »
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!
« Last Edit: December 08, 2020, 03:19:49 am by jars121 »
 

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 8111
  • Country: ca
Re: Photo MOSFET for switchable CAN termination resistor
« Reply #1 on: December 08, 2020, 05:36:34 am »
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/mc74vhc1gt66

Note 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.
« Last Edit: December 08, 2020, 05:39:31 am by BrianHG »
 

Offline jars121Topic starter

  • Regular Contributor
  • *
  • Posts: 78
  • Country: 00
Re: Photo MOSFET for switchable CAN termination resistor
« Reply #2 on: December 08, 2020, 05:53:42 am »
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!
 

Offline Berni

  • Super Contributor
  • ***
  • Posts: 5028
  • Country: si
Re: Photo MOSFET for switchable CAN termination resistor
« Reply #3 on: December 08, 2020, 06:13:19 am »
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
 

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 8111
  • Country: ca
Re: Photo MOSFET for switchable CAN termination resistor
« Reply #4 on: December 08, 2020, 06:18:00 am »
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.
« Last Edit: December 08, 2020, 06:20:51 am by BrianHG »
 

Offline jars121Topic starter

  • Regular Contributor
  • *
  • Posts: 78
  • Country: 00
Re: Photo MOSFET for switchable CAN termination resistor
« Reply #5 on: December 08, 2020, 06:21:09 am »
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.
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4193
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: Photo MOSFET for switchable CAN termination resistor
« Reply #6 on: December 08, 2020, 06:44:25 am »
Doing this would make your bus to go down when your device turns off or malfunctions.
 

Offline jars121Topic starter

  • Regular Contributor
  • *
  • Posts: 78
  • Country: 00
Re: Photo MOSFET for switchable CAN termination resistor
« Reply #7 on: December 08, 2020, 07:10:08 am »
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.
 

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 8111
  • Country: ca
Re: Photo MOSFET for switchable CAN termination resistor
« Reply #8 on: December 08, 2020, 08:03:37 am »
OK, what about a latching telecom relay?
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17167
  • Country: us
  • DavidH
Re: Photo MOSFET for switchable CAN termination resistor
« Reply #9 on: December 08, 2020, 10:05:22 am »
Is there any reason why this same approach using the AQY282S wouldn't work for my isolated CAN termination resistor?

No, it will work fine.

Quote
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?

A more symmetrical layout would matter if the frequencies were higher but CAN is not fast enough for this to be an issue.

Quote
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!

Optical isolation places a lower limit on package size to fit everything.

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!

Direct 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.

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.

A 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.
 

Offline jars121Topic starter

  • Regular Contributor
  • *
  • Posts: 78
  • Country: 00
Re: Photo MOSFET for switchable CAN termination resistor
« Reply #10 on: December 08, 2020, 10:16:52 am »
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 out  ;D

EDIT: Thank you for your post David, much appreciated!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf