Author Topic: Simulating CAN  (Read 1572 times)

0 Members and 1 Guest are viewing this topic.

Offline SparkFlyTopic starter

  • Regular Contributor
  • *
  • Posts: 55
  • Country: gb
Simulating CAN
« on: May 21, 2017, 09:38:48 pm »
Hi,

I'm trying to simulate a CAN transmitter in LTSpice, based on this diagram:



The circuit works as expected for a CAN '1' (both outputs across 120R resistor are 2.5V, inputs are 1, 0), but when I try to simulate a can '0', the difference across the 120R is far too small. It should be around 3.5V and 1.5V. My circuit is as below.



Can anyone offer any advice as to where I am going wrong? When I increase the resistance of the 120R resistor, I get a bigger differential voltage, but my understanding is that CAN should be terminated by 120R.

Many thanks in advance.
« Last Edit: May 21, 2017, 09:58:39 pm by SparkFly »
 

Online langwadt

  • Super Contributor
  • ***
  • Posts: 4414
  • Country: dk
Re: Simulating CAN
« Reply #1 on: May 21, 2017, 10:00:37 pm »
M5 is upside down, and pick some actual parts for M5/M6 the generic PMOS/NMOS doesn't work
 
The following users thanked this post: SparkFly

Offline SparkFlyTopic starter

  • Regular Contributor
  • *
  • Posts: 55
  • Country: gb
Re: Simulating CAN
« Reply #2 on: May 21, 2017, 10:24:54 pm »
Thanks Langwadt, I now have it working as expected.
« Last Edit: May 22, 2017, 11:45:48 am by SparkFly »
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21657
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Simulating CAN
« Reply #3 on: May 22, 2017, 07:53:46 am »
The symbol is upside down to convention (the gate usually comes out from the source side), but as the substrate is connected correctly, and the default model isn't asymmetrical (D and S are interchangeable), it doesn't actually matter.

Also, this is the first time I've seen those outrageously wrong MOSFET symbols in a slightly-less-wrong configuration:



Luckily you put together the circuit correctly, despite that.

If people would realize that the original, and actually correct and useful, MOSFET symbol actually means something, by itself, this wouldn't be confusing.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: SparkFly

Offline SparkFlyTopic starter

  • Regular Contributor
  • *
  • Posts: 55
  • Country: gb
Re: Simulating CAN
« Reply #4 on: May 22, 2017, 11:45:28 am »
Thanks T3sl4co1l.

The wide variety of symbols are quite confusing... :/

Thanks for your input.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf