Thermocouple input?

Hardware inside and outside of the ECU
jedediah_frey
contributor
contributor
Posts: 51
Joined: Tue Nov 05, 2013 1:43 pm

Thermocouple input?

Post by jedediah_frey »

For people with turbos keeping EGT (exhaust gas temp) below a threshold is pretty important.

BOM:
U5 MAX31855KASA
C8 100nF/0.1uF
C21 10nF/0.01uF/10000pF
Image

Usually the culprits are fueling and timing for both a gas and diesel engine.

At a minimum 1 for a inline and 2 for a V-engine.

At most #cylinders + 1. One for each port and one post turbo. Granted this is an extreme case but if you're racing or doing any high performance work it helps to diagnose engine problems if you see that one cylinder is above or below the rest. You can even start doing fancy stuff like balancing your injectors if one cylinder flows more than others.

As far as the interface

Image

Thermocouple -> SPI chips exist. http://www.maximintegrated.com/datasheet/index.mvp/id/7273
Thermocouple -> 0-5V conditioners exist, but a quick google shows they're very expensive. http://www.amazon.com/Exhaust-Gas-Technologies-Inc-Thermocouple/dp/B00E5P1WMG


Image
http://www.omega.com/temperature/pdf/tc_colorcodes.pdf
roflcopter
Posts: 39
Joined: Tue Oct 29, 2013 12:41 am

Re: Thermocouple input?

Post by roflcopter »

Most newer wideband O2 sensors(heated) also have a temperature output, or at least provide enough data for you to be able to derive a temperature from it. I don't know what kind of accuracy you need out of an EGT sensor in a turbo application, I'm not a turbo guy, but I know the stock O2 in my daily driver can provide temperature data as well. If you are running everything inline, then one sensor will probably be good enough, maybe 2 if you have a 4-2-1 manifold.

On the software side of things, it should be trivial to have a mode triggered by a threshold value on the EGT sensor to pull a few degrees of timing and alter the target AFR a few tenths richer.
jedediah_frey
contributor
contributor
Posts: 51
Joined: Tue Nov 05, 2013 1:43 pm

Re: Thermocouple input?

Post by jedediah_frey »

roflcopter wrote:Most newer wideband O2 sensors(heated) also have a temperature output, or at least provide enough data for you to be able to derive a temperature from it. I don't know what kind of accuracy you need out of an EGT sensor in a turbo application, I'm not a turbo guy, but I know the stock O2 in my daily driver can provide temperature data as well. If you are running everything inline, then one sensor will probably be good enough, maybe 2 if you have a 4-2-1 manifold.

On the software side of things, it should be trivial to have a mode triggered by a threshold value on the EGT sensor to pull a few degrees of timing and alter the target AFR a few tenths richer.
AFR sensors are after the turbo. You want your EGT before the sensor. Most of them are +-2C and go to 1300-1700C.

As for 'richer' not sure what that does on a diesel :)
roflcopter
Posts: 39
Joined: Tue Oct 29, 2013 12:41 am

Re: Thermocouple input?

Post by roflcopter »

Like I said, I have almost zero experience with FI cars, except for what I remember from digging around in my friends Mazdaspeed Protege, which I was pretty sure had the O2 before the turbo.

But I guess that doesn't really matter... You could always use a WBO2 for temperature readings without actually using the AFR reading from it, ones that will do EGT as well are still cheaper than that 0-5V condition is. The one in my car reads in 0.1 degree(C or F) resolution and regularly sees EGTs 1700F+, no clue how accurate it actually is though, if I had a true EGT I could test it, I have an extra bung in my exhaust anyways...
jedediah_frey
contributor
contributor
Posts: 51
Joined: Tue Nov 05, 2013 1:43 pm

Re: Thermocouple input?

Post by jedediah_frey »

What sensor were you looking at?
roflcopter
Posts: 39
Joined: Tue Oct 29, 2013 12:41 am

Re: Thermocouple input?

Post by roflcopter »

I could be very wrong, but from my few minutes of learnin' I just did, I'm pretty sure the qualification for it being able to report temperature is it being a 5-wire sensor, which I found this one http://www.ebay.com/itm/INNOVATE-BOSCH-OXYGEN-SENSOR-3737-/250910232518?_trksid=p2054897.l4275 on ebay, but I don't know what kind of range is has, I'm sure with some research it wouldn't be hard to find a car, possibly a turbo car, that uses one stock and source cheap-ish replacements for it.
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Thermocouple input?

Post by AndreyB »

I think the only purpose of this temperature measurement inside the o2 sensor is in order to figure out how much more it has to be heated while the sensor is still cold. I doubt there is any precision :(
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
roflcopter
Posts: 39
Joined: Tue Oct 29, 2013 12:41 am

Re: Thermocouple input?

Post by roflcopter »

It wouldn't be hard to test the accuracy of it though... And I wonder why they would include PIDs in the ECU labeled as EGT with it being fed from there with it being too horribly wrong. The precision needed I would assume isn't that much, when you're at 1700 degrees, 50 degrees is only 3%, which will only affect air density by 3%(they are directly correlated) and the knock resistance isn't going to change too much with a 3% increase of temperature either.

The Innovate 3737 sensor seems to be in the same class of Bosch sensor as the one in my car, which means that it should have a decent range operating temperatures, although Bosch doesn't seem to publish any of the actual numbers.
jedediah_frey
contributor
contributor
Posts: 51
Joined: Tue Nov 05, 2013 1:43 pm

Re: Thermocouple input?

Post by jedediah_frey »

1700 C is an extreme case. I believe MY turbo starts melting at 750-800. Depending on the turbo.

The thing about EGT thermocouples is that they are very cheap as sometimes they have a short lifespan where they live.
roflcopter
Posts: 39
Joined: Tue Oct 29, 2013 12:41 am

Re: Thermocouple input?

Post by roflcopter »

20 degree accuracy is still under 3% at 800.

How hard would it be to translate the signals from one of those thermocouples into something readable by the MCU? It can't be that complicated of circuitry and I doubt it'll cost anywhere near $190 in parts.
erich
Posts: 21
Joined: Tue Sep 03, 2013 4:55 am

Re: Thermocouple input?

Post by erich »

The MAX31855 is about the simplest way to do a thermocouple input. It handles the cold junction compensation, linearization and A/D conversion. A simple bit banged interface and you're all set. It's even cheap. If I had known it existed befoe today I probably would have put one on my digital dashboard.
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: Thermocouple input?

Post by kb1gtt »

I've had good luck with the MAX31855. I would suggest using it with a connector similar to Omega's PCC-SMP-J-5
Welcome to the friendlier side of internet crazy :)
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: Thermocouple input?

Post by kb1gtt »

The below was in an e-mail and should get posted before it gets lost.

Here's some general info about thermocouples http://www.omega.com/temperature/z/pdf/z021-032.pdf Omega has lots of good things, but they are a bit pricey. I'm sure lower cost can be found on e-bay. However here are some suggested links for for comparison sake.

Thermocouple pre-welded wire Type K package of 5 for $18 found here. http://www.omega.com/pptst/IRCO_CHAL_P13R_P10R.html

100ft roll for $62 http://www.omega.com/googlebase/product.html?pn=EXPP-K-24-100&gclid=CM-OovvdjbsCFXHxOgod-QcAhQ

This was once a good tutorial on how to make your own TCPL, but the video seems broken, http://www.instructables.com/id/Making-A-Thermocouple/

Here's one fellows tutorial about how to use a normal welder as a TCPL welder. http://www.cookingissues.com/2009/06/19/easy-cheap-thermocouples/

I know people where I work that have simply twisted the 2 wires together hard and it seemed to work good enough.

As for the PCB connector, I suggest these. http://www.newark.com/newport-electronics/pcc-smp-k/thermocouple-connector-type-k/dp/01H0905?CMP=AFC-OP

With this for the wire side of the connector. http://www.newark.com/newport-electronics/smpw-k-m-n/thermocouple-connector/dp/50B5932

Then the core chip, would be this maxim chip. http://www.digikey.com/product-detail/en/MAX31855KASA%2BT/MAX31855KASA%2BTCT-ND/2708805
Welcome to the friendlier side of internet crazy :)
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: Thermocouple input?

Post by kb1gtt »

Generic thermocouple PCB found here http://code.google.com/p/daecu/source/browse/#svn%2FHardware%2Ftrunk%2Frusefi.com%2Fthermocouiple_module

It can use either an OMEGA connector or if you are daring and you don't mind long term warp-age you can install a screw terminal. Many industrial applications use the screw terminal approach, but I tend to like the Omega connector as it has better long term reliability.

From here http://www.newark.com/newport-electronics/pcc-smp-k/thermocouple-connector-type-k/dp/01H0905?CMP=AFC-OP the Omega connector costs $2 in qty 1. Total cost in low qty should be under $10 for the materials.
Welcome to the friendlier side of internet crazy :)
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Thermocouple input?

Post by AndreyB »

Image

That's plain cruel. I am reporting you to anti-DIY-0603 society.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: Thermocouple input?

Post by kb1gtt »

I chose those to be mean to you :)

Those can change with little issue. I choose small to help minimize thermal variations. Also there are only two and they are out in the open, so they should be reasonably easy to install. We can change them to 0805's and probably won't have to much of an issue. I might make a 0603/0805 footprint, such that either can be easily installed.
Welcome to the friendlier side of internet crazy :)
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Thermocouple input?

Post by AndreyB »

Please change them to 0805 or 0805/0603 combo and I will go order this board.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Thermocouple input?

Post by AndreyB »

Just ordered the boards
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Thermocouple input?

Post by AndreyB »

Image
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: Thermocouple input?

Post by kb1gtt »

Thermocouple tutorial found here
Welcome to the friendlier side of internet crazy :)
User avatar
Tambralinga
donator
donator
Posts: 174
Joined: Wed Jun 18, 2014 8:36 am
Location: Bangkok, Thailand

Re: Thermocouple input?

Post by Tambralinga »

Skype : shiva-p
+66 8 5357 5159
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Thermocouple input?

Post by AndreyB »

The link says "Temperature: 0-800°C" while it looks like we have closer to 900C-1000C temperatures. On the other hand I suspect 800C in the description is pretty random.

I've just realized how trivial the code would be to integrate with these MAX chips, should be ready pretty soon.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
puff
contributor
contributor
Posts: 2961
Joined: Mon Nov 11, 2013 11:28 am
Location: Moskau

Re: Thermocouple input?

Post by puff »

0C is also optimistic :-) you want just to display the temperature or somehow alter ignition timing/fueling based on these values?
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Thermocouple input?

Post by AndreyB »

datasheet Image
but
Image

Looks like net names are correct but silkscreen is not:
MOSI silk should be CS
CS silk should be SCK

This chip does not have MOSI (Master Out Slave Input) - there is no way to control this chip, it just constantly sends data out.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Thermocouple input?

Post by AndreyB »

known_issues.txt for a list of comments/ideas

[video][/video]
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
clcorbin
Posts: 8
Joined: Sun Jun 29, 2014 9:41 pm

Re: Thermocouple input?

Post by clcorbin »

russian wrote:This chip does not have MOSI (Master Out Slave Input) - there is no way to control this chip, it just constantly sends data out.
That is not how SPI works. The slave does not constantly send data, it only clocks data out when the master operates the clock line. You can get the the slave to send data as fast or as slow as you want by controlling how often you drop a byte into the SPI send register. Up to the speed of the MAX chip of course.

Of course, you also could have meant there is no way to configure the chip because it doesn't have MOSI...
puff
contributor
contributor
Posts: 2961
Joined: Mon Nov 11, 2013 11:28 am
Location: Moskau

Re: Thermocouple input?

Post by puff »

up to 4 chips per line? eight channels - two different lines?
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Thermocouple input?

Post by AndreyB »

puff wrote:up to 4 chips per line? eight channels - two different lines?
Where did you get this?

As far as I understand each MAX31855 chip is one channel, each MAX31855 needs it's own 'chip select' pin. So in order to read X thermocouples you need X MAX31855 chips and X chip_select pins. The firmware has an array of eight fields for chip select lines and up to eight thermocouple gauges.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
puff
contributor
contributor
Posts: 2961
Joined: Mon Nov 11, 2013 11:28 am
Location: Moskau

Re: Thermocouple input?

Post by puff »

my bad. hadn't checked the data sheet.
31855 seem to be pretty exotic here (no one has 'kasa in stock, as far as I got) + quite costly!
thinking of an alternative small board, consisting of some tiny µC +NTC+op amp - should be way cheaper ;-)
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Thermocouple input?

Post by AndreyB »

Would be possible to use some analog multiplexers and just switch between multiple input channels in order to only use one MAX31855 chip? Would it work from the electrical standpoint? An SPI-controlled multiplexer would be best from SW point of view.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Post Reply