CAN EGT ADC Scaling

A forum for discussing the MegaSquirt related (but non-B&G) board development, assembly, installation, and testing.

Moderators: jsmcortina, muythaibxr

Post Reply
Motterdude
MS/Extra Newbie
Posts: 33
Joined: Tue Mar 30, 2021 11:44 am

CAN EGT ADC Scaling

Post by Motterdude »

Hi all,

I'm sharing this in hopes that someone else noticed/faced this issue as well.

I have bought a DIY autotune EGT CAN module.

I found something with the ADC scaling that seems to be wrong. This might be a user error, but I didn't see anything in the manual that addressed this.

If I use the 10-bit setting for ADC resolution I get the correct thermocouple readings at ambient temperatures.
If I use the 12-bit setting I get around 8°C which is a -26°C delta from ambient.
If I use the 8-bit setting, I get around +103°C delta from ambient. 

This seems to me like a scaling issue since the raw ADC reading remained constant even when I changed the ADC resolution. 

If it was coded like a regular ADC, given a constant mV input to the module, the raw ADC reading should change when we go from 10-bit (0-1024) to 12-bit (0-4096) since it would be converting mV to raw ADC in a different slope. 

The way it sits, I can only use the 10-bit resolution losing around 4 times the resolution from the device. 

Has anyone noticed/faced this as well?
Attached you will find print screens of it.

Setup: MS3X+DBWX2+DIY AutoTune CAN EGT
You do not have the required permissions to view the files attached to this post.
Rafael
Renault Sandero RS F4R 2.0 NA-VVT
MS3X+DBWX2+CAN EGT
racingmini_mtl
Super MS/Extra'er
Posts: 9130
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: CAN EGT ADC Scaling

Post by racingmini_mtl »

The MS3 only use 10-bit ADC values (0-1023 range) so that's what you need to use on the CAN-EGT if you're using the data on the MS3 (or logging data through it). That is also why the default scaling is only set for a 10-bit ADC value. You could change the scaling using the TunerStudio feature to create your our outputs from the raw ADC data but that would only work for displaying data from a CAN-EGT project and not for data taken from the MS3.

In any case, using 12-bit resolution is not that useful because the resolution you theoretically gain is not reflecting the actual resolution of the hardware that reads the EGT probes (which is a few degrees). So in fact, you don't lose any resolution with the 10-bit resolution.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
Motterdude
MS/Extra Newbie
Posts: 33
Joined: Tue Mar 30, 2021 11:44 am

Re: CAN EGT ADC Scaling

Post by Motterdude »

Thanks for the info Jean,

That makes sense. I don't see much sense in changing the ADC via calculated channels if they won't correctly be exported to the MS3X as 12-bit.

I also agree with the thermocouple uncertainty you are mentioning. Still, it is pretty much a game of trying to reduce combined uncertainties on instrumentation since there is already so much that affects EGTs like probe positioning, EMI on the cables to the module since they are such low amplitude, and actual probe insertion depth.

All that I could verify on the mechanical side of the installation to get identical depths and tapped threaded inserts, I did.

On a side note though, I have a thought...

Wouldn't configuring the EGT's separately as can receiving channels provide me with the ability to bypass the standard ADC scaling and use bare raw ADC values and do the scaling on the MS3X itself gaining back the 12-bit resolution? As I understand from what you told me, the MS3X defaults to the scaling of the 10-bit ADC. If I send a raw ADC count value to it, I could do whatever scaling is necessary in the MS3X, couldn't I?

I appreciate the feedback.
Rafael
Renault Sandero RS F4R 2.0 NA-VVT
MS3X+DBWX2+CAN EGT
racingmini_mtl
Super MS/Extra'er
Posts: 9130
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: CAN EGT ADC Scaling

Post by racingmini_mtl »

Motterdude wrote: Sun Dec 25, 2022 7:05 pm Wouldn't configuring the EGT's separately as can receiving channels provide me with the ability to bypass the standard ADC scaling and use bare raw ADC values and do the scaling on the MS3X itself gaining back the 12-bit resolution? As I understand from what you told me, the MS3X defaults to the scaling of the 10-bit ADC. If I send a raw ADC count value to it, I could do whatever scaling is necessary in the MS3X, couldn't I?
I understand the desire to reduce the combined uncertainties you mention but I'm not sure how much benefit using 12-bit ADC data would actually be and if it would remove uncertainties or simply give a false sense of increased precision. Having said that it certainly would be interesting to be able to do.

The issue with using 12-bit data is not in the CAN receiving side but rather in the EGT scaling where 0V is 0 ADC count and 5V is 1023 ADC count; there is no way to change that (using CAN receiving would at best lose you the added 2 bits). If you don't care about using the EGT features and simply want to display and/or datalog the EGT temperatures then you could use CAN receiving and do the scaling from the raw ADC data either in the MS3 or in TunerStudio.

In both cases, you would not do any scaling in the CAN receiving settings (leave defaults) but then you would use the generic sensors and either do the scaling there or use raw data and do the scaling in TunerStudio (with the custom channel feature). What I'm not sure is if there is any limitation in using 12-bit data in the generic sensors but you would need to do the calibration assuming a range of 0-1023 for the 0-5V range (so "cheat" such that the maximum temperature is 312.5C instead of the actual 1250C); however, I don't know if that could create some overflow in the computations.

For display and datalogging purposes, you could also read the raw data directly from the CAN-EGT in TunerStudio and do the scaling there (again with the custom channel feature).

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
Motterdude
MS/Extra Newbie
Posts: 33
Joined: Tue Mar 30, 2021 11:44 am

Re: CAN EGT ADC Scaling

Post by Motterdude »

Thanks, Jean,

Appreciate the feedback and discussions. A shame really that we lose that resolution. To really know what we are loosing I would need to dig deeper into the datasheet of the thermocouple amplifier in the circuit of the CAN EGT and figure out what the mV to digital ADC scaling on that is to really know how much is being lost due to those 2 bits. Anyway, it doesn't seem like much of a fix that I can do as an end-user.

Thanks once again.
Rafael
Renault Sandero RS F4R 2.0 NA-VVT
MS3X+DBWX2+CAN EGT
Post Reply