Miata Turbo Forum - Boost cars, acquire cats.

Miata Turbo Forum - Boost cars, acquire cats. (https://www.miataturbo.net/)
-   MEGAsquirt (https://www.miataturbo.net/megasquirt-18/)
-   -   My fan mod is mocking me (https://www.miataturbo.net/megasquirt-18/my-fan-mod-mocking-me-26051/)

skidude 09-15-2008 04:54 PM

My fan mod is mocking me
 
I installed the fan mod a while ago, and once I got it working, I sort of stopped thinking about it. I recently noticed my coolant temps climbing at idle, so I checked and it wasn't working.

Turns out it works, when megasquirt decides to turn it on. For some reason it doesn't turn it on when it's supposed to.

If I play with the on and off temps in megatune, I can get it to come on, but whether or not it actually comes on seems to depend on absolutely nothing except MS's mood.

Anybody got any ideas? Doesn't seem like a hardware problem because whenever the indicator is green in megatune the fan is on, and as soon as the indicator shuts off, the fan shuts off.

Matt Cramer 09-16-2008 10:24 AM

Could you post a data log and an MSQ?

skidude 09-16-2008 10:37 AM

1 Attachment(s)
Sure, I don't know what exactly you're looking for in the log, so here is a random one from Sunday where the temp hovers around the 'fan on' temp.

Matt Cramer 09-16-2008 02:42 PM

Sorry, I forgot to ask which output the fan is on. Let me know and I'll have a look.

skidude 09-16-2008 04:29 PM

It's on X2 (JS0).

Braineack 09-16-2008 04:41 PM

your CLT temp values read high. Matt can you see some outputs like JS0 in your log?

skidude 09-16-2008 05:29 PM

How can you tell that they read high? and how do I fix that?

and shouldn't the fan come on anyway, since it should be triggered by those high fan values?

Joe Perez 09-16-2008 09:34 PM


Originally Posted by Braineack (Post 308851)
Matt can you see some outputs like JS0 in your log?

JS0 is bit 5 of porta (counting from 0). So decode porta in the logs, and you'll get the status of that pin.


edit: CLT is indeed reading awfully high, but bear in mind that this could simply be from having the wrong thermfactor.inc file on the laptop while doing the logging- what MegaTune writes to the log and what the MS works with internally are different things, based upon independent scaling of the raw ADC data. (edit 3: I don't think this is an .inc problem.)


edit 2: In that log, JS0 turns on at 1838.866 when CLT goes from 219 to 223. It turns off at 1993.315 when CLT falls from 207 to 203, suggesting a 10 degree hysteresis.

This suggests that the fan mod is behaving in a coherant fashion- the scaling of the CLT sensor is simply, as they say, whack. Perhaps incorrect data was used when EasyTherming the S19 file during the last firmware update?

skidude 09-16-2008 09:49 PM

The coolant temps in the datalog are about what I was seeing on the display in MS, and as they climbed above about 215, the dash needle started to climb as well.

I was having to shut my car off whenever it would have to idle because the fan wouldn't come on to keep it cool.

The driving scenario in this particular log was me driving through a town at 25mph stuck behind somebody going really slow. The engine wasn't getting much airflow and the fan wouldn't come on, so it got pretty warm.

Joe Perez 09-16-2008 10:10 PM


Originally Posted by skidude108 (Post 309001)
The coolant temps in the datalog are about what I was seeing on the display in MS, and as they climbed above about 215, the dash needle started to climb as well.

Yeah, I believe that the temps in the log are correct with respect to reality, hence edit 3. I forgot to remove the reference to D7/D8 when I made that edit. It's done now.

I think what's happened is that the MegaSquirt's internal calibration table for the CLT sensor has been lost somehow. Either it just up and corrupted itself, or some bad data got entered in EasyTherm the last time you did an update.

Let me explain how this is possible. When you ran the S19 through EasyTherm, it modified some scaling data inside the S19 file which then got burned to the CPU. As a separate process, it also wrote out the thermfactor.inc file, which you copied to MegaTune.

In actual operation, the CLT sensor is read by an ADC and expressed as an 8 bit number, from 0 to 255. The MS (having had its firmware run through EasyTherm) knows what actual temperature each one of these raw numbers corresponds to.

However, the datastream that it sends out to MegaTune (which drives the gauges and the log) is not the decoded temperature, but the raw ADC value. MegaTune does basically the same process as the MS did- it looks in the thermfactor.inc file and figures out what temperature corresponds to the ADC number that it's getting, and this is what it displays and logs. If it seems that this is stupid, redundant, unnecessary, and overcomplicated, it's because it is.

So, if the scaling inside the MS is somehow corrupt, the MS will behave incorrectly with regard to temperature-driven events. However, since the thermfactor.inc file in your MegaTune directory is not corrupt, you will see the correct temperature in the logs and on the gauge. It makes you think that the MS knows what the correct temperature is, however this is not the case. The coolant temp in the log will be eactly the same as what you saw on the display, but the key point is that neither of these are a guarantee that the MS properly scaled the CLT data for its own internal calculations, since both the log and the display are driven by raw data that is decoded externally. Does this make sense? (It's counterintuitive, I know.)

What I suggest is that you re-load the firmware from scratch, starting with a clean S19 and running it through EasyTherm. (Don't forget to unplug your igniter, re-load your MSQ when done, yadda yadda...)

skidude 09-16-2008 10:18 PM


Originally Posted by Joe Perez (Post 309021)
What I suggest is that you re-load the firmware from scratch, starting with a clean S19 and running it through EasyTherm. (Don't forget to unplug your igniter, re-load your MSQ when done, yadda yadda...)

Ok, that does actually make complete sense. I thought MS was sending MT the decoded value but that is obviously not the case.

Does anybody have a link to a good copy of the high resolution firmware? I think I lost my file and it took me forever to find it the first time. All the links in the sticky threads here are broken.

patsmx5 09-16-2008 10:21 PM

Hey Mr. Perez, for the record, would your post 10 comments hold true for MS2?

Joe Perez 09-16-2008 10:30 PM


Originally Posted by skidude108 (Post 309025)
Ok, that does actually make complete sense. I thought MS was sending MT the decoded value but that is obviously not the case.

Yup. This is the reason why EasyTherm outputs those three .inc files, and why you must copy them over to your MegaTune directory. Otherwise, MegaTune would have no idea how to properly decode the temperature data that it's getting.


Does anybody have a link to a good copy of the high resolution firmware? I think I lost my file and it took me forever to find it the first time. All the links in the sticky threads here are broken.
The latest & greatest HiRes code is always located in the first post of this ongoing thread at the msextra forum: http://www.msextra.com/viewtopic.php?f=90&t=25336 It is currently HR10g.

Can you point me to the broken links you refer to?

Joe Perez 09-16-2008 10:35 PM


Originally Posted by patsmx5 (Post 309026)
Hey Mr. Perez, for the record, would your post 10 comments hold true for MS2?

I honestly don't know, I've never examined the raw datastream of an MS2. I know that the thermistor calibration process is a lot simpler- there's no need for hacking firmware with EasyTherm- you simply key the values into a window in MegaTune and it writes them to the MS just like any other setting. It's quite possible that MegaTune updates itself with the equivalent of the .inc files when it does this, or it could simply be that the MS2 CPU outputs decoded tempearute values in its datastream.

I couldn't even make an educated guess as to which is correct.

Matt Cramer 09-17-2008 12:02 PM

MS2 is different - it sends the decoded value to MegaTune, which lets you get away with not needing any INC files for your sensors.


All times are GMT -4. The time now is 06:39 AM.


© 2024 MH Sub I, LLC dba Internet Brands