Skip to content

Simple Simulation of a CAN Bus wiring to explain certain disturbances

Notifications You must be signed in to change notification settings

markste-in/can_bus_wiring_sim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Simulating CAN bus wiring with LTspice and iCircuit

The primary motivation was to explain the overshooting and ringing I see from time to time when troubleshooting CAN bus networks

To anticipate it, the preferred tool is LTspice due to significantly better accuracy.

Simulation with LTspice

Basic Setup

Assumptions:

  • 250 kBaud
  • 120 Ohms impedance
  • 2x 120 Ohms termination resistors
  • 2x20m CAN bus wires going from the transceiver to each terminating resistor
  • Signal speed 200'000 km/s -> 5ns/m
    • Signal delay time 0.1μs for 20m (used in tline)

The CAN transceiver is modelled as two square wave generators. One for CAN high and one for CAN low png

"Good" CAN Bus

png

A few disturbances

png

Strong disturbances

png

The appropriate FFT

png

Simulation with iCircuit

The Tool iCircuit is available for Mac/iOS, Windows and Android

png

This simulation should be taken with a grain of salt as the accuracy of iCircuit seems to be very limited at higher frequencies!

I was also not able to figure out how to improve the simulation accuracy or decrease Tstep

About

Simple Simulation of a CAN Bus wiring to explain certain disturbances

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published