Page 1 of 2

CAN Bus

PostPosted: Sun Feb 07, 2021 1:26 am
by sambus
Hi,I have an M150 ECU and I would like to calibrate a thermocouple k using the CAN bus. I have a can module that allows me to connect the thermocouple to the CAN bus but from the MoTeC M1 Tune program I cannot manage the CAN message sent by the thermocouple.
The program makes me insert only the Sensor Resource and I don't understand if in the calibration section I have to insert Manual or Custom CAN 1.0.
Is there any additional software to manage the Channels of the sent message?

Re: CAN Bus

PostPosted: Sun Feb 07, 2021 4:14 am
by David Ferguson
How much control do you have over the data transmitted from your CAN-enabled Thermocouple amplifier? Can you transmit the value as a 16 bit quantity in degC? Or does it only provide a voltage output?

It's possible to configure the M1 to receive either of these. Take a look at the help in M1 Tune for your firmware "ECU Receive" for details.

Re: CAN Bus

PostPosted: Sun Feb 07, 2021 9:17 am
by sambus
David Ferguson wrote:How much control do you have over the data transmitted from your CAN-enabled Thermocouple amplifier? Can you transmit the value as a 16 bit quantity in degC? Or does it only provide a voltage output?

It's possible to configure the M1 to receive either of these. Take a look at the help in M1 Tune for your firmware "ECU Receive" for details.


My thermocouple amplifier sends a message divided into 4 channels of 16 bits each. In the first 3 it sends the temperature information respectively in Kelvin, Celsius and Fahrenheit, while in the last channel there is the voltage amplified in mV.
I would like to understand how the ECU decodes this information and if I need to make any changes.
I have already inspected the "ECU Receive" section but from here it allows me to communicate and manage information through the dash, only from here can I configure the CAN bus?

Re: CAN Bus

PostPosted: Sun Feb 07, 2021 9:36 am
by David Ferguson
Let's start with what firmware package you are using?

Next, what are your thermocouples measuring? Exhaust Gas Temperature?

If you are using a GPx package and measuring exhaust temperature, then you set the Exhaust Temperature Bank x Collector Sensor Resource, or Exhaust Temperature Cylinder X Sensor Resource to the appropriate CAN x Offset y (the ECU Receive covers how you determine this). If the value is in whole degrees C, then you select "CAN ODP.1.0" (i.e. zero decimal digits) for the Sensor Calibration. If it's in 0.1degC, then you select "CAN 1DP.1.0" for the Sensor Calibration.

Re: CAN Bus

PostPosted: Sun Feb 07, 2021 9:59 am
by sambus
David Ferguson wrote:Let's start with what firmware package you are using?

Next, what are your thermocouples measuring? Exhaust Gas Temperature?

If you are using a GPx package and measuring exhaust temperature, then you set the Exhaust Temperature Bank x Collector Sensor Resource, or Exhaust Temperature Cylinder X Sensor Resource to the appropriate CAN x Offset y (the ECU Receive covers how you determine this). If the value is in whole degrees C, then you select "CAN ODP.1.0" (i.e. zero decimal digits) for the Sensor Calibration. If it's in 0.1degC, then you select "CAN 1DP.1.0" for the Sensor Calibration.


Yes, I am using this type of package to measure the Exhaust Gas Temperature. In the wording CAN x Offset y I did not understand what CAN x means because x in my case varies between 0 and 7 but I only have 3 CAN Bus, I understood however that I should enter Offset 0 so I have all the information on the temperature itself address.
I don't know if I can directly choose the "CAN ODP.1.0" or "CAN 1DP.1.0" options because my thermocouple amplifier sends a message divided into 4 channels of 16 bits each. In the first 3 it sends the temperature information respectively in Kelvin, Celsius and Fahrenheit, while in the last channel there is the voltage amplified in mV. For this reason I wanted to choose the "Custom CAN 1.0" option but I don't really understand how it works. Do you think it could work?

Re: CAN Bus

PostPosted: Sun Feb 07, 2021 10:05 am
by David Ferguson
OK, tell me what CAN ID (might be called CAN address) your thermocouple amplifier sends the data to. If you have a data sheet with this info, then upload it to this thread. Your device is probably sending 4 16 bit values in one CAN Frame. You use Offset 0, 2, 4. 6 to access these 4 values.

If your Celsius data is in the second 16-bit value, then for the first channel, use "CAN 0 Offset 2" (ie, the second 16-bit value of the data at the base address. Set the Base Address in "ECU Receive CAN ID Base", and make sure the correct CAN bus is selected in "ECU Receive CAN Bus"

Re: CAN Bus

PostPosted: Sun Feb 07, 2021 8:34 pm
by sambus
David Ferguson wrote:OK, tell me what CAN ID (might be called CAN address) your thermocouple amplifier sends the data to. If you have a data sheet with this info, then upload it to this thread. Your device is probably sending 4 16 bit values in one CAN Frame. You use Offset 0, 2, 4. 6 to access these 4 values.

If your Celsius data is in the second 16-bit value, then for the first channel, use "CAN 0 Offset 2" (ie, the second 16-bit value of the data at the base address. Set the Base Address in "ECU Receive CAN ID Base", and make sure the correct CAN bus is selected in "ECU Receive CAN Bus"


This is the datasheet
CAN module TK_4 rev2_e.pdf
(571.3 KiB) Downloaded 559 times

The first CAN ID is 0x200.
The last thing I have to understand is how to set the "Normal Mode" in the datasheet and the "Word format".

Re: CAN Bus

PostPosted: Mon Feb 08, 2021 3:10 am
by David Ferguson
OK, the M1 will expect this data to be in "Big Endian" or Motorola Word Format.

For the Normal Format, set the sensor resources as follows:

Channel 1 = CAN 0 Offset 2 (calibration CAN 0DP)
Channel 2 = CAN 1 Offset 2 (calibration CAN 0DP)
Channel 3 = CAN 2 Offset 2 (calibration CAN 0DP)
Channel 4 = CAN 3 Offset 2 (calibration CAN 0DP)

For the All-In-One Mode this would be
Channel 1 = CAN 0 Offset 0 (calibration Manual, then convert Kelvin (which will look like mv to degC)
Channel 2 = CAN 0 Offset 2 (calibration Manual, then convert Kelvin (which will look like mv to degC)
Channel 3 = CAN 0 Offset 4 (calibration Manual, then convert Kelvin (which will look like mv to degC)
Channel 4 = CAN 0 Offset 6 (calibration Manual, then convert Kelvin (which will look like mv to degC)

Re: CAN Bus

PostPosted: Mon Feb 08, 2021 3:21 am
by sambus
David Ferguson wrote:OK, the M1 will expect this data to be in "Big Endian" or Motorola Word Format.

For the Normal Format, set the sensor resources as follows:

Channel 1 = CAN 0 Offset 2 (calibration CAN 0DP)
Channel 2 = CAN 1 Offset 2 (calibration CAN 0DP)
Channel 3 = CAN 2 Offset 2 (calibration CAN 0DP)
Channel 4 = CAN 3 Offset 2 (calibration CAN 0DP)

For the All-In-One Mode this would be
Channel 1 = CAN 0 Offset 0 (calibration Manual, then convert Kelvin (which will look like mv to degC)
Channel 2 = CAN 1 Offset 2 (calibration Manual, then convert Kelvin (which will look like mv to degC)
Channel 3 = CAN 2 Offset 4 (calibration Manual, then convert Kelvin (which will look like mv to degC)
Channel 4 = CAN 3 Offset 6 (calibration Manual, then convert Kelvin (which will look like mv to degC)

Thank you so much David!

Re: CAN Bus

PostPosted: Mon Feb 08, 2021 4:01 am
by David Ferguson
Oops I made a mistake for the All-In-One version, and I've updated my original post. Please note the change!