Forum » CANBus Communications Decoded » CAN Communications between modules

CAN Communications between modules

CANBus Communications Decoded

Forum Posts

Courses

Blog

Tech Articles

Discussion and questions related to the course CAN Bus Communications Decoded

= Resolved threads

Page 1
Author
195 Views

Perhaps I missed it, but I'm trying to figure out when a device knows that it is its turn to transmit to a bus with other transmitting devices. When do they determine the proper time to listen vs transmit? Is it solely when the bus is in a recessive state and no priority PIDs are being broadcast?

The "arbitration" phase is when one or more devices will transmit. They listen as they are transmitting, and if there is a collision (ie, they try to send a 1 when someone else sends a 0 which overrides it), they will stop transmitting. This means the "lowest CAN ID" always wins the arbitration and sends it message with the highest priority.

G'day Dominic. By default, every device on the bus is sitting there listening. When it sees some traffic, it perks up and takes notice of the PID of the message on the bus. If its a PID that it's been programmed to look out for it'll listen to the rest of the message, sort out the data it needs and live its best life.

Devices transmit on the bus for many reasons. Often they're programmed to send out data at regular intervals (message frequency), or when some specific condition is met, like the keypad example in the course.

In the case that a device want to transmit, but knows the bus is busy, the message will go into a queue within that device. As soon as the bus is free (it sees the end of message section of the current message), it will try to transmit. Often two devices will have messages queued, and they'll broth try transmitting at the same time, and then the arbitration comes into effect, with the lowest PID winning the arbitration. The device that lost the arbitration will re-queue it's message and try again when the bus is free again. This is why we need to keep our bus traffic down below 80% bus load, otherwise messages will sit in queues for ages, and things wont be transmitted at anticipated times.

Hi Zac, I have been searching previous posts on this very topic and I am trying to understand what is the limit for number of devices on a CAN Bus network?

Currently, I have my PDM, SLM, 5-button controller, 15-button keypad and C1212 dash dedicated to CAN Bus 1. I am running an M150 and can add two more CAN Bus networks. Planning to add my TTPMS, external tire temp, and rotor temp sensors (Izzy Racing) on CAN Bus 2. I am curious if all these sensors/devices would work on CAN 1? Also, what are the cons in having a separate CAN 2 network for the TTPMS system only?

Many thanks!

Neil

It's not the number of devices, it's the bus bandwidth that is the limit. I suggest you look in your C1212 Dash Manager, and under Connections->CAN Bus Error Counts, enable and log those channels. The "CAN n Bus Utilization" channel, will tell you how close to the 90% limit are (see the Help for that and CAN Bus Bandwidth Limit).

Your description is how I would do it as well.

Just from a logical standpoint, I would put devices that only the dash uses (like you're IZZE racing stuff you will log, SLM) on one of the dash CAN buses, and leave the M150, PDM, Button Controller & Keypad and LTC on a second dash CAN bus. You'll only use one CAN bus on the M150.

Thank you David. Looking at C1212 Dash Mgr now.

Hi,

You could have all of those components on a single bus and have it sitting around 80% utilisation. I have attached the calibration out of my car, I am using to four separate CAN Buses on the C187 in this configuration, with Bus 2 having the highest load at around 45%, the total Bus load for the combined CAN Buses is just under 85%.

Attached Files

Much appreciated Stephen. Very helpful!

Thank you,

Neil