CAN Bus

Discussion and Support for MoTeC's M1 series ECUs

CAN Bus

Postby sambus on Sun Feb 07, 2021 1:26 am

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?
sambus
 
Posts: 6
Joined: Thu Feb 04, 2021 9:20 pm

Re: CAN Bus

Postby David Ferguson on Sun Feb 07, 2021 4:14 am

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.
David Ferguson
Veracity Racing Data
David Ferguson
Pro User
 
Posts: 1362
Joined: Fri Nov 07, 2008 2:45 am
Location: Paso Robles, California

Re: CAN Bus

Postby sambus on Sun Feb 07, 2021 9:17 am

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?
sambus
 
Posts: 6
Joined: Thu Feb 04, 2021 9:20 pm

Re: CAN Bus

Postby David Ferguson on Sun Feb 07, 2021 9:36 am

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.
David Ferguson
Veracity Racing Data
David Ferguson
Pro User
 
Posts: 1362
Joined: Fri Nov 07, 2008 2:45 am
Location: Paso Robles, California

Re: CAN Bus

Postby sambus on Sun Feb 07, 2021 9:59 am

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?
sambus
 
Posts: 6
Joined: Thu Feb 04, 2021 9:20 pm

Re: CAN Bus

Postby David Ferguson on Sun Feb 07, 2021 10:05 am

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"
David Ferguson
Veracity Racing Data
David Ferguson
Pro User
 
Posts: 1362
Joined: Fri Nov 07, 2008 2:45 am
Location: Paso Robles, California

Re: CAN Bus

Postby sambus on Sun Feb 07, 2021 8:34 pm

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 558 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".
sambus
 
Posts: 6
Joined: Thu Feb 04, 2021 9:20 pm

Re: CAN Bus

Postby David Ferguson on Mon Feb 08, 2021 3:10 am

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)
Last edited by David Ferguson on Mon Feb 08, 2021 4:00 am, edited 1 time in total.
David Ferguson
Veracity Racing Data
David Ferguson
Pro User
 
Posts: 1362
Joined: Fri Nov 07, 2008 2:45 am
Location: Paso Robles, California

Re: CAN Bus

Postby sambus on Mon Feb 08, 2021 3:21 am

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!
sambus
 
Posts: 6
Joined: Thu Feb 04, 2021 9:20 pm

Re: CAN Bus

Postby David Ferguson on Mon Feb 08, 2021 4:01 am

Oops I made a mistake for the All-In-One version, and I've updated my original post. Please note the change!
David Ferguson
Veracity Racing Data
David Ferguson
Pro User
 
Posts: 1362
Joined: Fri Nov 07, 2008 2:45 am
Location: Paso Robles, California

Next

Return to M1 ECUs

Who is online

Users browsing this forum: No registered users and 7 guests