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.
69
questions
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?
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 ...
2
votes
3
answers
21k
views
How to calculate bus load of CAN bus?
I have a few questions regarding CAN bus load
Is there any derived equation/formula to calculate the bus load?
I need transmit below frames(Assume Standard frame format) at baud rate 500 kbps on the ...
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. (...
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 ...
2
votes
5
answers
12k
views
STM32 HAL_CAN_Transmit always returns TIMEOUT (HAL_CAN_STATE_TIMEOUT)
Setup
I am using an STM32F103C8T6 (aka Blue Pill).
With the STM32Cube I set CAN_RX to PB8 and CAN_TX9 to PB9 (these are defaults/nonchangeable).
Circuit
simulate this circuit – Schematic ...
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 ...
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 ...
5
votes
1
answer
38k
views
Controller Area Network (CAN), high speed and low speed
Is the difference between high- and low-speed CAN only with respect to baud rate values?
Is the CAN transceiver programmable for a range of speeds or is it fixed for a specific value? For example, can ...
3
votes
1
answer
2k
views
CAN bus goes through periods of re-sending messages continually
I'm having an issue where my microprocessor CAN bus module continuously re-sends its last message, even though it seems to be received properly by my USB-CAN monitor on the other end.
I'm attempting ...
3
votes
2
answers
9k
views
Difference between buffer and mailbox
Peripherals in Micro-controllers usually provide a way for us to send and receive data from it. Usually this are memory mapped registers.
I have come across few terminologies. The most often used one ...
2
votes
0
answers
1k
views
Bus interface for short distances, many device data exchange - CAN, RS485? + characteristic impedance and media capacitance
I ran into some troubles trying to design a wired bus which will connect in about 64 testing devices. My first choice of mind was CAN bus, known of it's reliability and low EMC interference. However, ...
2
votes
1
answer
4k
views
Can RS485 be considered a multi-master bus?
There are some electrical specifications specifically designed for multi-master protocols such as CAN, I2C, 1-Wire, etc. which are classified under CSMA/CD networks.
However, RS485 has a push pull ...
1
vote
1
answer
644
views
Same priority for masters in a CAN network
I'm aware that messages on the CAN network are assigned priorities. I'm working on a 2oo3 voting system, and if each of the messages by the three masters are given three unique id's, I'll be making ...
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
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 ...
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
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
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) ...
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
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, ...
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
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 ...
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
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
2
answers
2k
views
How do I program 2 CAN nodes to transmit continuously in succession?
Suppose I have three CAN nodes: A, B and C. We know that when two nodes transmit at the same time, the node that has the least SID will prevail over the bus and the other node will have to give the ...
4
votes
1
answer
6k
views
Current Consumption of CANbus (CANH and CANL)
I'm looking to use the SN65HVD230 CAN transceiver but had a question about the current consumption.
Datasheet: http://www.ti.com/lit/ds/symlink/sn65hvd230.pdf
In table 8.3 Recommended Operating ...
4
votes
1
answer
14k
views
Is it possible to have any CAN baudrate?
Is it possible to have any CAN baud values? e.g. 507 baud
If not, on what basis is the standard values are derived?
4
votes
3
answers
5k
views
Using an MCU with built-in CAN controller vs. external CAN controller
I'm planning to use the Atmel ATSAMC21J18A microcontroller in an automation project which has a built-in CAN controller. The CAN bus network may contain 32 devices, each generating data packets in 1 ...
4
votes
3
answers
2k
views
CAN bus termination in a fully modular design
I am trying to make a fully modular festo cube design that is controlled with a CAN bus, but I am trying to figure out where to terminate the bus.
I am even not really sure if what I am trying to do ...
4
votes
1
answer
3k
views
Switching a resistor by software
I want to communicate with a microcontroller over a CAN bus which needs (ideally) 120 ohm terminal resistors at the end of each bus. I want to integrate this resistor into the circuit and activate it ...
4
votes
2
answers
19k
views
BeagleBone Black CAN bus setup
I am trying to connect to a CAN bus network with my BeagleBone Black and SN65HVD230. I've connected it like in the picture.
I am running:
...
4
votes
1
answer
2k
views
How can CAN transceivers ouput CANH=3.5V and CANL=1.5V?
When sending a dominant bit (0bit) on the CAN bus, I understand that CAN transceivers output CANH=3.5V and CANL=1.5V.
But when looking at the schematics of a CAN transceiver, I do not understand how ...
4
votes
3
answers
4k
views
How to leverage CAN bus Mailboxes in my embedded systems?
I don't understand how to leverage CAN bus Mailboxes in my embedded systems.
I think I don't use them properly because I don't understand the problem they are trying to solve.
Here's a simple example ...
3
votes
2
answers
2k
views
CAN bus TX failing in a strange way
I have been trying to pass CAN frames between two different CAN busses using two different CAN channels on a STM32F746 MCU. The system always fails and freezes up in TX when it is supposed to be ...
3
votes
2
answers
3k
views
ATSAMC21 - CAN configuration - Nominal bit timing vs. data bit timing & time quanta calculation
I'm trying to configure the CAN bit rate of an ATSAMC21 to 125ksps in a CAN2.0B configuration.
However, after reading through the datasheet, the ASF documentation and the ATMEL start help I'm confused....
3
votes
2
answers
10k
views
Ethernet vs CAN bus physical signal
Reading about Controller Area Networks and Ethernet standard, I cannot understand why there is a difference in the way the signal is transmitted. Both protocols use twisted pair cables to communicate, ...
2
votes
4
answers
8k
views
CAN Initialization Timeout Error in STM32F4
I am using an STM32F446ZET6U Nucleo Board (programmed with CubeMx and Keil uVision 5) and I try to use some of the ST's examples in order to learn about its peripherals. I am stuck with the CAN ...
2
votes
2
answers
2k
views
Isolated CAN transceivers as a CAN bus extender
I am designing a system to 'hack' into a CAN bus. My first idea was to split the target CAN bus, terminating both ends into isolated CAN transceivers, and use a MCU to pass packets between the buses ...
2
votes
0
answers
162
views
Interoperability between regular and single-wire CAN bus
Is it possible to connect a regular CAN transceiver (ISO 11898-1) to a single-wire CAN bus (SAE J2411) in a compatible way? By "compatible" I mean that the whole system should support valid J2411 bus ...
2
votes
2
answers
2k
views
STM32 CAN bus Rx interrupt only triggers in loopback mode
I'm designing the CAN interface for a STM32F042C4T6 to be able to receive and send messages. I've tested my code and everything seems to work perfectly fine in loopback mode. However, when I hook up ...
2
votes
4
answers
3k
views
CAN Bus on PCB board
Will a CAN bus also work for on-board communication, without twisted pair cabling, between 2 or more microcontrollers on the same PCB board?
2
votes
1
answer
2k
views
Electronically connecting/disconnecting device from a CAN bus
What I'm trying to do can be best described by the following circuit based on an electromechanical relay:
simulate this circuit – Schematic created using CircuitLab
However, is there a simpler ...
2
votes
3
answers
893
views
Wired sensor network
We are trying to develop a wired sensing network that will have up to 200 sensors attached to it, spread over what could be 100 m. There will be one main controller that uploads each sensor's ...
2
votes
1
answer
2k
views
CAN FD bit stuffing
Ok, it may be just peanuts, but here
the author says that the max. length (i.e. max. bit stuffing) of the flexible data rate part of a 64 Byte payload frame is 673 bit (Figure 6).
That part consists ...
2
votes
1
answer
2k
views
MCP2515, CAN bus, and transmission failure
I'm trying to interface with a GPS device that is intended to connect with a vehicle via the CAN bus. I'm using an MCP2515, driven via SPI by a Parallax Propeller project board. I've successfully been ...
1
vote
2
answers
2k
views
Selectable CAN bus split termination
I am designing a CAN device where the user may switch between it being the end device and thus with terminators or vice versa.
Now, there is no need to drive it digitally using MCU, I would actually ...
1
vote
1
answer
736
views
NAK in CAN bus for STM32F3 uC
I have a problem with the NAK on the CAN bus. On STM32F303RE I wrote a code for communication via CAN bus with car dashboard (Instrument Panel Cluster). The communication works, I manage to receive ...
1
vote
4
answers
2k
views
Can I use this analog switch for CAN bus signals?
In the deutsch 9 pin obd interface for heavy trucks, some manufacturers use the pin F,G for J1939 protocol and some use it for J1708 protocol. I am trying to use a NLAS4684 analog switch with dual ...