MaxSFI with CAN-EGT for coolant temp

Moderator: Tom Notch

User avatar
IanEpperson
Posts: 65
Joined: Sat May 06, 2006 1:35 am

MaxSFI with CAN-EGT for coolant temp

Post by IanEpperson » Thu Feb 09, 2017 1:33 am

I was surprised to learn that the 4 CHT sensors wired into my CAN-EGT are not enough to provide the "coolant temp" input for an MS (or my shiny new MaxSFI) ECU, and most people just run a second sensor. Thinking about it a bit and after chatting with Mario, I think it can be made to work with a small bit of electronics. Ideally I'd be able to mod the CAN-EGT or the ECU to tell it to accept the values as coolant via the CAN bus, but I'm not sure if I'd be able to get ahold of the source code.

The MaxSFI coolant temp input is looking for a variable resistance to ground, and is adjustable in Tunerstudio. The CAN-EGT puts out a 0-5 volt signal per sensor, with 0v = 0 degrees F and 5v = 1200 degrees F. There's a few different simple circuits that can convert a variable voltage into a variable resistance.
2017-02-08 10.16.56 pm.png
This assumes the MaxSFI is using a 5 volt pullup to sense the resistance, and the CAN-EGT is outputting 2.5 volts - which would be an engine melting 600 degrees. I'm waiting to hear back from Mario to see what the pin voltage is, and if it can handle 100mA. I can up the resisters value to lower the current, but this provides a decent slope. I could add a couple of diodes and wire up each of the sensors, which should then be a max reading across all of them.

Another, less predictable solution would be a combination LED to photosensor. It would be nice and isolated, but probably wouldn't read anything until the output is about 1.5 volts, which would be about 350 degrees - that's a lot of range to give up. I suppose I could use a mini incandescent bulb like a rice light which would light sooner, but would have to be a small enough wattage to handle wrapping in a small package (I imagine heat-shrink tubing). Also, incandescent lights burn out much faster then LEDs.

If this works, it's less than $10 in parts, a simple solder job, more accurate temp inputs and one less wire and connector.
You do not have the required permissions to view the files attached to this post.

TZepeSH
Posts: 149
Joined: Wed Nov 03, 2004 1:55 am

Re: MaxSFI with CAN-EGT for coolant temp

Post by TZepeSH » Thu Feb 09, 2017 2:49 am

I have to read a bit on maxsfi, but I think it is much simpler than that.
MS has a voltage divider from 5V with one of the resistor (the one to ground) being variable - the sensor (figure A). And it just converts the analog 0-5V signal to ADC. So what you would need to do if CAN EGT outputs 0-5V is to de-solder the 5V pull-up form MS and feed the signal directly to the ms controller, through a limiting resistor (1KOhm) (figure B). I will try to make a quick sketch.
input change.JPG
You do not have the required permissions to view the files attached to this post.

User avatar
IanEpperson
Posts: 65
Joined: Sat May 06, 2006 1:35 am

Re: MaxSFI with CAN-EGT for coolant temp

Post by IanEpperson » Thu Feb 09, 2017 1:14 pm

Interesting suggestion TZepeSH, but I'm not going to be changing the components on the MaxSFI.

Image

Maybe that'll work for someone running a more solder-accessible MS system though.

User avatar
Chip Birks
Posts: 2436
Joined: Wed Mar 12, 2008 7:59 pm
Location: Pleasant Grove, Utah

Re: MaxSFI with CAN-EGT for coolant temp

Post by Chip Birks » Thu Feb 09, 2017 2:51 pm

This feels way over thought to me. Why not just run a sensor like the ecu is wanting?

Its only one more wire and a connector.

User avatar
IanEpperson
Posts: 65
Joined: Sat May 06, 2006 1:35 am

Re: MaxSFI with CAN-EGT for coolant temp

Post by IanEpperson » Thu Feb 09, 2017 11:17 pm

Chip, I thought I had bought everything, but had neglected that one more sensor, one more wire and one more connector. I'd rather spend $5 on parts (that I probably already have in the garage anyway) instead of $60 + shopping and waiting, do less wiring and have a more accurate sensor as a result. The circuit is way simple.


Sent from my iPhone using Tapatalk

User avatar
Piledriver
Moderator
Posts: 21719
Joined: Sat Feb 16, 2002 3:01 am
Location: Van Alstyne, Texas

Re: MaxSFI with CAN-EGT for coolant temp

Post by Piledriver » Fri Feb 10, 2017 5:04 am

I wanted to use a proper CHT TC under the plug for the same purpose, did it ~as TZepeSH described.
(had to use an electrically insulated TC due to ground loop issues, TCs are very low voltage)
Eventually had to ditch it as the fine SS sheathed TCs kept dying due to vibration.
(EGT TC sensors are similar, just usually much larger)

Usually the inputs have jumpers for pullups etc as most things are flexible on MS, but CLT is a defined input so setting it up hardwired so to speak is excusable, even on an SMD board.

Pulling an SMD resistor really only needs a soldering iron, a couple seconds and a pair of tweezers, but if you haven't done it before I can understand the pucker factor.

It would be far better if the MSExtra code simply allowed assigning another input for CLT, CAN or otherwise, preferably with sane settable limits.

The setup I ended up with, (open element gm sensor elegantly ziptied to a pushrod tube) responds very fast to load changes, in lockstep with underplug tc, with only a consistent rpm/fan speed based offset.
At idle its almost 1:1, at ~70mph cruise the in-head-airflow tc reads ~75f lower than under plug.
I do run well sealed lower tin, required with a working thermostat anyway..
I, for one, regularly embrace our new robot overlords, as I am the guy fixing the robots...

User avatar
IanEpperson
Posts: 65
Joined: Sat May 06, 2006 1:35 am

MaxSFI with CAN-EGT for coolant temp

Post by IanEpperson » Tue Feb 14, 2017 12:58 pm

Mario suggested pulling the SMD resister too, but I want the ability to revert back if this all doesn't work and just put on the sensor.

I mocked up the mini squirt input based on the published drawings and the sample resistance from the sensor spec, but couldn't come up with a simple analog circuit that gives a nice slope in the interesting temp range (100F - 400F). There are plenty of digital potentiometers though. So I ordered a $7 arduino and a cheap digital pot which will allow me to pick any range with 100 discrete resister values.

So, maybe program it for 100-500 degrees in 4 degree increments? Seems like that would be plenty of resolution but I could also do 150-450 in 3 degree increments or 50-550 in 5 degree increments. I guess I just need to know about when warm-up enrichment ends and when I want to start cooling it down during over-temp.


Sent from my iPhone using Tapatalk

User avatar
Piledriver
Moderator
Posts: 21719
Joined: Sat Feb 16, 2002 3:01 am
Location: Van Alstyne, Texas

Re: MaxSFI with CAN-EGT for coolant temp

Post by Piledriver » Tue Feb 14, 2017 2:17 pm

The range is going to depend on sensor placement, mine sees full under plug ~CHT range but if bolted to the top of the head will see a much lower max temp IIRC, maybe 250.
I, for one, regularly embrace our new robot overlords, as I am the guy fixing the robots...

User avatar
MarioVelotta
Posts: 3742
Joined: Wed Mar 12, 2003 3:01 am
Location: Monroe, Wa.
Contact:

Re: MaxSFI with CAN-EGT for coolant temp

Post by MarioVelotta » Tue Feb 14, 2017 7:04 pm

IanEpperson wrote:So, maybe program it for 100-500 degrees in 4 degree increments? Seems like that would be plenty of resolution but I could also do 150-450 in 3 degree increments or 50-550 in 5 degree increments. I guess I just need to know about when warm-up enrichment ends and when I want to start cooling it down during over-temp.
Head temps are going to be ambient temp to 450, Once the heads reach 200-250 degrees that is a warm engine. I'm doing some cold start tuning on a car right now and it's 38° degrees outside.

So 0-450/500° would be good.
The Dub Shop
Mario@thedubshop.net
2276 Turbo - 92 Octane
11.537 @ 115.74mph - 15psi
1600dp - 18sec @ 0psi :lol:
Facebook-Tech-Store

User avatar
IanEpperson
Posts: 65
Joined: Sat May 06, 2006 1:35 am

Re: MaxSFI with CAN-EGT for coolant temp

Post by IanEpperson » Tue Feb 14, 2017 7:30 pm

From a cold start enrichment standpoint, is there any difference between 0 degrees and 50? I'm guessing they're both just considered "too cold".


Sent from my iPhone using Tapatalk

User avatar
MarioVelotta
Posts: 3742
Joined: Wed Mar 12, 2003 3:01 am
Location: Monroe, Wa.
Contact:

Re: MaxSFI with CAN-EGT for coolant temp

Post by MarioVelotta » Tue Feb 14, 2017 8:10 pm

50 degrees on the cold side is much more important than 50 on the hot side
The Dub Shop
Mario@thedubshop.net
2276 Turbo - 92 Octane
11.537 @ 115.74mph - 15psi
1600dp - 18sec @ 0psi :lol:
Facebook-Tech-Store

TZepeSH
Posts: 149
Joined: Wed Nov 03, 2004 1:55 am

Re: MaxSFI with CAN-EGT for coolant temp

Post by TZepeSH » Wed Feb 15, 2017 12:30 am

As I remember, Megasquirt can have startup enrichment based on temperature. So it matters how cold it is, the colder the more gas is added. I wouldn't throw away that range.

User avatar
IanEpperson
Posts: 65
Joined: Sat May 06, 2006 1:35 am

Re: MaxSFI with CAN-EGT for coolant temp

Post by IanEpperson » Fri Feb 17, 2017 10:26 am

Amazon shipped the wrong part in the right package so had to reorder the digital pot. Opted for the $4 version instead of the $2 version so I'll get 256 steps instead. That'll give me 0-512 degrees in 2 degree steps, which is tighter than the resolution limit of the input pin that can't sense anything tighter than about 2 degree F without additional circuitry.

(0-5v input read uses 10 bit resolution = 1024 levels sensed, the 0-5v output is 0-2282 degrees F. 2282/1024 is 2.2 degrees per level.)

The slight downside is this chip needs another output for SPI control, so I'll have to double-duty one of the USB program pins. Not a big deal, I'll just have to unplug it from the CAN-EGT if I ever have to reprogram it.

I'm blown away by how dinky the Arduino Trinket is. Just a hair larger than my fingernail - I'll probably just seal it all up in shrink wrap when I'm done.

[img]//uploads.tapatalk-cdn.com/201702 ... 88cfb7.jpg[/img]


Sent from my iPhone using Tapatalk

User avatar
IanEpperson
Posts: 65
Joined: Sat May 06, 2006 1:35 am

Re: MaxSFI with CAN-EGT for coolant temp

Post by IanEpperson » Sat Feb 25, 2017 1:54 pm

Part of the reason why I do this and similar projects (including adding FI to the engine in the first place) is to learn and grow. Last night I learned that "Vss" is ground and not (as I had wired it) 5 volts. However, when I finally did hook it up correctly (and threw out the first digital pot that smoked) it worked. That's bench working, not yet in the car, but as I ramped the voltage from zero to 1 volt, the resistance changed along with it from zero to 10k. I program for a living, but still am proud of having the code work perfectly on the first try. I've got it set up to read about 5 times per second - a slow pace for the Arduino but should be plenty fast enough for something changing as slowly as the CHT. With no math at all in the code, it's reading from 32 - 594 degrees F in 2.2 degree increments - 32 degrees = 0 ohms, 594 = 10k ohms. It's trivial to reverse the range by just using pins 7&8 instead of 6&7 and I should probably throw in a series resister to make it easier for the MS to read.

Here's a link to the circuit in a simulator if you want to play with it: http://tinyurl.com/jsm9erx Note how the MS TP changes as you select different values. With a 1k resister inline, and with the slope that (I think) MS needs, that'll be:
32 degrees F = 11k ohms (lowest temp reading)
313 degrees F = 6k ohms
597 degrees F = 1k ohms (highest temp reading)

I'll add a small stack of diodes to the input of the Arduino to read the highest temp from each cylinder, test that then solder it all to a small board and wrap it up. I'll draw it out and publish the source code if someone wants to make one of these for their own car.

(Note that my math was wrong on the earlier post. I forgot to account for 0C being 32F, not 0F)

User avatar
IanEpperson
Posts: 65
Joined: Sat May 06, 2006 1:35 am

Re: MaxSFI with CAN-EGT for coolant temp

Post by IanEpperson » Sun Feb 26, 2017 2:06 pm

Image

Got the demo board soldered up and tested using a small battery and manual potentiometer. I ended up using a 470 ohm resister inline because I have a pile of them. I tried adding a diode stack to read more than one cylinder, but they dropped too much sensitive voltage. I suppose a perfect solution would have a pin per sensor, but I suspect it's more trouble than it's worth.

Today I'll get back to wiring the engine compartment and figure out where to mount this.


Sent from my iPhone using Tapatalk

Post Reply