Questions tagged [can]
CAN stands for Controller Area Network and is a bus often used in automotive applications. It is a two-wire differential protocol and works on baud rates from 10 kbits/sec to 1 Mbits/sec.
838
questions
53
votes
5
answers
42k
views
Is a CAN enabled microcontroller sufficient to drive a CAN bus?
There are a number of CAN modules built into microcontrollers these days. The PIC18F2480 is an example of that. Is that microcontroller (with built-in CAN) capable of driving a CAN bus on its own or ...
41
votes
4
answers
175k
views
Why does the CAN bus use a 120 ohm resistor as the terminating resistor and not any other value?
I know the reasons for using terminating resistors on a CAN bus and how important it is.
But why 120 ohm? How did this value come up? Is there any specific reason to use 120 ohm?
33
votes
3
answers
5k
views
Correct place to attach shields for twisted pairs
I have two PCBs connected by a cable containing 5 sub-cables:
6v power through a custom made coaxial cable (similar to that found on laptop power supplies).
2x 100mbps LVDS through 100ohm impedance ...
29
votes
4
answers
62k
views
What's the maximum CAN bus frame (message) rate at 125 kbit/s?
My CAN bus is running at 125 kbit/s and is using extended frame format exclusively. I would like to know what's the maximum rate of CAN frame I can send out. Suppose the data length is always ...
15
votes
5
answers
4k
views
Why do microcontrollers always need external CAN tranceiver?
For example in STM32 MCUs, the CAN pins are CAN RX and CAN TX. Therefore to transform it to CAN H and CAN L, we need to use external CAN tranceiver. What's the purpose of it? Wouldn't it be easier to ...
15
votes
3
answers
4k
views
CAN Bus Licensing
Looking around for possible solutions for long distance communication between multiple microcontrollers I found the CAN bus. However, it says that there is a licensing fee for any implementation of ...
15
votes
2
answers
25k
views
Significant differences between CAN and RS485 regarding the physical layer
In comparing the physical layer of CAN and RS485, I am trying to find the advantages of either one over the other. I found out that they are quite similar. Both are good in terms of common mode ...
14
votes
6
answers
49k
views
What is the color code for CAN Bus?
I would like to know if there is any color code specified for CAN Bus communication wiring, maybe in ISO-11898-1? (I have no free access to the file)
I looked for any official documents without any ...
14
votes
3
answers
13k
views
Transmission of different messages with the SAME ID on a CAN bus
CAN arbitration is done with IDs, and any node on the bus can transmit with any ID (ideally it should not, but a nasty node can).
What if two different nodes connected on the same CAN bus transmit ...
14
votes
4
answers
10k
views
Implementing a CAN protocol layer in software
Background
I'm developing a project which will require the modest microcontroller specs of:
8 12-bit, 10kHz ADCs
1kB of RAM
48-QFN or smaller footprint
20kbps daisy-chainable noise-resistant and ...
14
votes
4
answers
38k
views
Is a ground/common needed for proper CAN bus communication?
Since CAN Bus is a differential signalling system, what is the significance of GND/COM signal? Can I get by without it?
I've got a very simple 2-node system that has some weird happenings going on. (...
12
votes
3
answers
26k
views
Is MCP2551 a UART-to-CAN converter?
I want to make a CAN bus sniffer for 250 kbit/s using my computer. After some research I've found that MCP2551 is some kind of voltage level regulator for CAN's physical layer. Keeping that in ...
12
votes
1
answer
4k
views
CAN bus signal integrity
The channels are CAN_H (red), CAN_L (blue), and CAN_H-CAN_L (brown).
It can be observed in the diagram below that CAN_H-CAN_L has an acceptable signal shape. However, both CAN_H and CAN_L look poorly ...
11
votes
2
answers
21k
views
What exactly is "dominant" and "recessive"?
I am reading data sheets on the LIN bus, but apparently the same terminology is used for CAN.
What does "recessive" and "dominant" stand for, e.g http://hw-server.com/products/rs_optika/...
11
votes
2
answers
3k
views
Enable interrupt but no ISR
I would like to know what happens if an Interrupt is enabled(ex:Arbitration Lost Interrupt in CAN module of NXP's LPC1778),but no ISR has been defined for the interrupt.
When such an interrupt occurs,...
10
votes
3
answers
2k
views
Selecting a network layer over CAN bus
I am planning on using CAN bus in an industrial automation application, however I'm having a hard time deciding how to implement the network layer. Does anyone here have any recommendations for a ...
10
votes
3
answers
17k
views
Running CAN bus with RS-485 transceiver
Recently I had a discussion whether one could use RS-485 transceivers for a CAN-bus network in order to gain the flexibility to use the same hardware either in a CAN-environment or in half-duplex RS-...
9
votes
3
answers
8k
views
What is the limiting factor for a CAN bus to exceed 1Mbps bandwidth?
Why can't CAN baud rate increase beyond 1Mbps
9
votes
6
answers
10k
views
How to check the CAN bus is free or not
I read a lot of stuff regarding CAN bus arbitration, but it didn't answer my questions.
If one node is already transmitting the data on the bus and in between another node wants to initiate the data ...
9
votes
3
answers
20k
views
CAN bus test via loopback - possible or not?
I want to test the integrity of the CAN bus (also my CAN transceiver) periodically using the following method (independent of the other nodes).
Assume two nodes always exist (node A and node B). When ...
8
votes
4
answers
3k
views
Why common-mode choke on differential-signal serial lines?
I have 2 questions:
Why using a common-mode choke on serial communication lines (like CAN, RS485) if the signal is differential? Wouldn't the common-mode noise simply be cancelled in the receiver?
I ...
8
votes
2
answers
2k
views
Microchip documentation does not label CAN buss pins on micro controller pinout diagram
Link to the data sheet
I want to use Microchips DSPIC33FJ128GP802 in a new project and want to use the ECAN buss.
The problem ...
8
votes
3
answers
26k
views
For the CAN bus, is it OK to swap CANH and CANL lines?
Similar to question In a USB cable, is it OK to swap the D+ and D- wires?, is it okay if we interconnect CAN-H and CAN-L lines?
CAN is a differential protocol. Is it that dominant and recessive bits ...
8
votes
3
answers
8k
views
Why won't my CAN transceiver receive messages unless there is a long startup delay or a bus analyzer connected?
I am using a 16-bit MCU, PIC24HJ64GP504, to write a CAN based application. Basically it is communication between my board and one another node which continuously keeps on sending data to my board ...
8
votes
2
answers
6k
views
CAN Transmission and termination resistors
I have been trying to set up a CAN network using PIC18F25K80 microcontrollers and an MCP2551 to communicate between them. Can I use two simple wires as a CAN bus by just connecting the CANL, CANH of ...
8
votes
2
answers
6k
views
1-wire verses CAN-bus for home sensing network?
I'm trying to put together a home automation solution for my newly built house. I'm very new to this, specifically for hardware matters and asking this question to verify if my understanding of what I'...
8
votes
4
answers
4k
views
Most efficient way to handle addressing / termination in a daisy-chained CAN bus?
I'm working on some devices that will talk to each other over CAN. The simple idea is to daisy chain essential signals between each device: power (+12V and ground), enable and CAN high / low.
Now, ...
8
votes
1
answer
11k
views
How can I determine a maximum run length for CANbus?
I'm using CANbus to communicate between two circuit boards. 120 ohm termination resistors on either end. Transceivers are MCP2561 and ISO1050. Bit rate is in the hundreds of kilobits/second. Medium is ...
8
votes
1
answer
7k
views
Sync Jump Width (SJW) in Controller Area Network
Is there any drawback to a longer SJW vs a shorter SJW?
The PIC32MZ2048EFH064 has a minimum phase 2 requirement of two time-quanta. This means that the SJW could be one or two time-quanta. Why wouldn'...
8
votes
5
answers
926
views
Selecting communication between microcontrollers at high temperature
I have been assigned to a project to find the best possible communication between several PCB boards which have microcontrollers for a specific function. I need to have all microcontrollers ...
8
votes
1
answer
4k
views
Effect of splices on 120 Ω twisted pair cable impedance a.k.a correct way to attach stubs to the bus?
I am currently in the process of designing a wiring loom for a race car control system which must also connect a number of devices via a CAN bus.
This is my first encounter with CAN bus (J1939-15) ...
7
votes
4
answers
4k
views
Does it matter which 2 nodes on a CAN bus you terminate?
I know you need to terminate the 'ends' on a high speed CAN bus but what if you know nothing about the topology of the network or where the bus will go. For my application i have designed a data ...
7
votes
2
answers
3k
views
What does this CAN bus waveform mean?
I am trying to get the ECAN functionality working on a dsPIC33. I have two identical dsPIC33s, each with identical CAN transceivers connected by a short (3 inch) bus. One is transmitting, one is ...
7
votes
2
answers
3k
views
Will this selectable CAN BUS termination circuit work?
I'm trying to find a simple way of having software selectable termination on the CAN bus of a device I am making.
I think a Solid state relay is the best bet so I have come up with the following ...
7
votes
2
answers
2k
views
TVS protection for CAN bus
It looks like every chip manufacturer has their own CAN bus TVS product nowadays, e.g. ON Semi NUP2105, Semtech 2492SQ, Bourns T24CAN, Nex PESD2CAN and many others.
Common for all of them are ...
7
votes
1
answer
9k
views
How many (m)W should 120 ohm CAN bus terminators have?
When I started with Arduino I bought a set of 600 resistors (30 times 20 values). However, I found out 120 ohm needed for CAN bus is not among them.
So I need to buy 120 ohm resistors (I don't want ...
7
votes
1
answer
1k
views
CAN bus troubleshooting. How? [closed]
I am trying to connect ICP CON i-7565 (USB <-> CAN interface) to a custom made device (supporting CAN 2.0B, proved to work with PCL-841 card). Although I think I have configured the Baud rate and ...
7
votes
3
answers
3k
views
GND difference between CAN nodes?
I am running a short (2 m) CAN bus with about 20 nodes. 1 Mbit/s speed, PIC 18F2580s and 18F4580s with MCP2551 transceivers, 10 MHz (with PLL to 40 MHz) crystal oscillators. Both ...
7
votes
1
answer
3k
views
Multiple devices on a CAN bus via the OBDII diagnostic connector in car
We have an aftermarket cruise control installed (in Suzuki Swift), which is connected to the OBD-II connector to access the CAN bus (according to the installation manual, it uses just CAN-L and CAN-H ...
7
votes
2
answers
311
views
Novel CAN bus design - needs criticism
I'm designing a CAN bus interface for a PCB I'm working on. CAN and high speed/long distances are new to me, so I have a list of concerns about my design ideas, and I would appreciate someone with ...
7
votes
2
answers
2k
views
Recommendation for series protection resistors on CAN bus?
When implementing an RS-485 interface, I tend to follow TI's recommendation in the SN65HVD75 datasheet to include \$10 \Omega\$ series resistors on the A and B lines. The TVS diodes I'm using clamp ...
7
votes
4
answers
1k
views
Noise resilient, hot-pluggable communication bus over long cables?
I'm working on a setup, where we need communication between a master device and several slave microcontrollers distributed out in different boxes connected by "long" cat5e cables (3-10 meters)
The ...
6
votes
3
answers
21k
views
CAN bus layout design
I am trying to design a CAN bus node. The CAN bus shall be split-terminated with 120Ohm, 60Ohm for each line.
Therefore i tried using this paper to calculate a characteristic impedance of 60Ohm for a ...
6
votes
3
answers
31k
views
Is the CAN bus protocol a master and slave protocol?
I am investigating if the CAN bus will work for the projects I am building at the moment.
I want to create a bunch of input/output controllers that will accept/buffer commands, execute them and then ...
6
votes
3
answers
912
views
MCP2515 and Crystal Error
I'm making a board with MCP2515T-I/ML due to space constraints and it won't start up.
(datasheet) https://ww1.microchip.com/downloads/en/DeviceDoc/MCP2515-Stand-Alone-CAN-Controller-with-SPI-20001801J....
6
votes
5
answers
22k
views
CAN Bus Physical Layer Twisted pair or not
CAN bus is very common in automotive or vehicular applications. In our case, we are using aerial platforms with have CAN bus links between operator remote and ground control box.
As is very typical ...
6
votes
2
answers
5k
views
Packet loss in CAN
How susceptible is a CAN bus to packet loss, and what are the sources of packet loss in CAN?
I realize the answer may depend heavily on the application, so here are some details:
bus length: about 1 ...
6
votes
2
answers
499
views
Detect if a CAN node is transmitting or receiving
I am not an electrical engineer or EE student; I'm a diagnostic technician. AFAIK, a CAN transceiver receives bits by measuring voltage between the network and its ground/low reference (high ...
6
votes
3
answers
8k
views
I²C, SPI, CAN protocols and the OSI model
Is there a reference or what is the explanation for I²C and SPI being just physical layer protocols in the OSI model (I know that this model is for communication and maybe not exactly for on-board ...
5
votes
4
answers
12k
views
CAN bus - Priority/collision
I have a hard time understanding how a CAN bus can actually work. It looks to me like a scenario where everyone is talking at the same time.
The CAN bus is simply two wires that everyone is connected ...