[help needed] Ducati Monster 900 with MRE

Your chance to introduce yourself and your vehicle
Post Reply
Mspeek
Posts: 5
Joined: Fri Sep 09, 2022 7:17 am
Github Username: Mauro

Ducati Monster 900 with MRE

Post by Mspeek »

First of all I congratulate the community for the great project.

This is the first time I've tried using EFI.
My current test mule is an air-cooled Ducati Monster 900 motorcycle. The temperature of the heads can easily exceed 250 degrees and I have CLT Error, I tried to get around the problem by measuring it with EGT1, and with lua Set the CLT sensor to (EGT1 * 0.3).
The problem is that "Sensor_Value = getSensor("EGT1") reads nil.

setTickRate(1)
function onTick()
Valore_Sensore = getSensor("EGT1")
print ("Valore letto da sensore : " .. Valore_Sensore)
end

2024-01-07_16_56_42_669: EngineState: LUA error [string "setTickRate(1)..."]:4: attempt to concatenate a nil value (global 'Valore_Sensore')
2024-01-07_16_56_43_634: EngineState: LUA error [string "setTickRate(1)..."]:4: attempt to concatenate a nil value (global 'Valore_Sensore')
2024-01-07_16_56_44_633: EngineState: LUA error [string "setTickRate(1)..."]:4: attempt to concatenate a nil value (global 'Valore_Sensore')

If I read other sensors ("RPM", "TPS") for example, I get correct values.
Is there another way to measure head temperature?
Mspeek
Posts: 5
Joined: Fri Sep 09, 2022 7:17 am
Github Username: Mauro

Ducati Monster with MRE

Post by Mspeek »

First of all I congratulate the community for the great project.

This is the first time I've tried using EFI.
My current test mule is an air-cooled Ducati Monster 900 motorcycle. The temperature of the heads can easily exceed 250 degrees and I have CLT Error, I tried to get around the problem by measuring it with EGT1, and with lua Set the CLT sensor to (EGT1 * 0.3).

setTickRate(1)
function onTick()
Valore_Sensore = getSensor("EGT1")
print ("Valore letto da sensore : " .. Valore_Sensore)
end

The problem is that "Sensor_Value = getSensor("EGT1") reads nil.

2024-01-07_16_56_41_666: EngineState: LUA error [string "setTickRate(1)..."]:4: attempt to concatenate a nil value (global 'Valore_Sensore')
2024-01-07_16_56_42_669: EngineState: LUA error [string "setTickRate(1)..."]:4: attempt to concatenate a nil value (global 'Valore_Sensore')
2024-01-07_16_56_43_634: EngineState: LUA error [string "setTickRate(1)..."]:4: attempt to concatenate a nil value (global 'Valore_Sensore')
2024-01-07_16_56_44_633: EngineState: LUA error [string "setTickRate(1)..."]:4: attempt to concatenate a nil value (global 'Valore_Sensore')

If I read other sensors ("RPM", "TPS") for example, I get correct values.

Is there another way to measure head temperature?
User avatar
AndreyB
Site Admin
Posts: 14347
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Ducati Monster 900 with MRE

Post by AndreyB »

Mspeek wrote:
Sun Jan 07, 2024 4:08 pm
First of all I congratulate the community for the great project.
thank you :)
Mspeek wrote:
Sun Jan 07, 2024 4:08 pm
I tried to get around the problem by measuring it with EGT1, and with lua Set the CLT sensor to (EGT1 * 0.3).
The problem is that "Sensor_Value = getSensor("EGT1") reads nil.
What is EGT1? How did you use EGT1?
Mspeek wrote:
Sun Jan 07, 2024 4:08 pm
The temperature of the heads can easily exceed 250 degrees
Internet says that aluminum begins to warp around 204C something is odd here.

I am also wondering if you really just want to *measure* temperature or if you really plan to use it somewhere within the control strategy?
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
Mspeek
Posts: 5
Joined: Fri Sep 09, 2022 7:17 am
Github Username: Mauro

Re: Ducati Monster 900 with MRE

Post by Mspeek »

What is EGT1? How did you use EGT1?
A correctly displayed temperature in TS obtained from a thermocouple connected to MAX31855 connected to SPI3 and PA15 of MRE.
Internet says that aluminum begins to warp around 204C something is odd here.
From tests I did last summer with the bike stopped and the engine started recently, I measured 180° with an infrared gun and this worried me, thinking that the temperature could rise further.
I was thinking of measuring the temperature with a thermocouple and with Lua copying the correct value into "CLT" without exceeding the 200° limit that TS imposes on me.
I have seen Chinese single cylinder 125CC EFI air cooled engines use 300° NTC sensors, but fragile and rare.
I'm looking for a more common solution that is solid and easy to install.
I am also wondering if you really just want to *measure* temperature or if you really plan to use it somewhere within the control strategy?
Yes, the CLT temperature will serve as a normal control strategy.

Last summer I was unable to manage the engine completely due to various problems. Unstable RPM reading, I have VR crankshaft sensors with unshielded cable, MegaLogWiever's VE Analyze does not support data recorded on SD, I could not ride the motorcycle with a laptop connected to MRE to run TS's Auto Tune.

I disabled the fuel and reassembled the carburetors, MRE only handled ignition.

Now after a break I have started to organize my head to try again this spring when the weather allows me.
User avatar
AndreyB
Site Admin
Posts: 14347
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Ducati Monster 900 with MRE

Post by AndreyB »

TS has displayed EGT looks like your sub-project is to access that value in Lua

whatever TS 200/250C limit has very little to do with Lua and overall rusEFI internals.

Looks like your next subproject is to inject value 300 into coolant sensor via Lua

Where does TS limit you exactly? Do you need different control strategy between engine head of 200C and engine head of 300C? Are you sure that your focus should not be on lowering your engine head below 200C? Does your engine head use any aluminum? In your opinion what is critical temperature for materials in your engine?
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
Mspeek
Posts: 5
Joined: Fri Sep 09, 2022 7:17 am
Github Username: Mauro

Re: Ducati Monster 900 with MRE

Post by Mspeek »

At this point I have doubts about the temperature I measured with the infrared gun.

I'm wondering if there is a way to measure CLT with a thermocouple.

I find it much more convenient to find the ideal point where to install a small thermocouple on the cooling fins, rather than drilling and tapping to install an NTC sensor.

Of one thing I am sure:
In Lua "getSensor("EGT1")" always returns Nil even if TS displays a consistent value.
User avatar
AndreyB
Site Admin
Posts: 14347
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Ducati Monster 900 with MRE

Post by AndreyB »

Mspeek wrote:
Tue Jan 09, 2024 2:09 pm
Of one thing I am sure:
In Lua "getSensor("EGT1")" always returns Nil even if TS displays a consistent value.
You are right something is missing in the code for that to work https://github.com/rusefi/rusefi/commit/b89337f1894d7249ba031232b4190cf70bcacd61
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