NA Miata EcotecMiata Race Car

Your chance to introduce yourself and your vehicle
mtmotorsport
Posts: 89
Joined: Wed Mar 31, 2021 10:00 pm

Re: NA Miata EcotecMiata Race Car

Post by mtmotorsport »

So far, so good. First place in class at its first race weekend running on MRE. Lua functions worked awesome, no problems at all. Ran so well in fact, we snapped a Miata half shaft in qualifying. Came from the back of the field to finish 3rd in the first race, and 1st in both race 2 and 3.
PXL_20220507_164636811.jpg
PXL_20220507_164636811.jpg (5.41 MiB) Viewed 20886 times
Matt
MT Motorsport / EcotecMiata
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: NA Miata EcotecMiata Race Car

Post by AndreyB »

Exciting to see rusEFI performing well :)
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
mtmotorsport
Posts: 89
Joined: Wed Mar 31, 2021 10:00 pm

Re: NA Miata EcotecMiata Race Car

Post by mtmotorsport »

And another one.

Matt
MT Motorsport / EcotecMiata
mtmotorsport
Posts: 89
Joined: Wed Mar 31, 2021 10:00 pm

Re: NA Miata EcotecMiata Race Car

Post by mtmotorsport »

Torture tested the MRE last weekend. We had a turbo almost fall off the manifold which lead to some serious under hood temps. Melted wiring, burnt paint, etc. Took a look at the logged ECU Temp. 73C was the highest recorded temp. Still works! No issues yet.
Matt
MT Motorsport / EcotecMiata
mck1117
running engine in first post
running engine in first post
Posts: 1493
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: NA Miata EcotecMiata Race Car

Post by mck1117 »

mtmotorsport wrote:
Mon Aug 01, 2022 6:41 pm
turbo almost fall off the manifold
hey, I've done that!
mtmotorsport wrote:
Mon Aug 01, 2022 6:41 pm
Took a look at the logged ECU Temp. 73C was the highest recorded temp. Still works! No issues yet.
I would certainly guarantee correct operation at 75c, probably up to 85c. It would likely work far above that (100?), but some of the components aren't rated past 85. Awesome that it survived and kept working!
mtmotorsport
Posts: 89
Joined: Wed Mar 31, 2021 10:00 pm

Re: NA Miata EcotecMiata Race Car

Post by mtmotorsport »

So we've swapped a ZF 8HP into this car. Trans controller is broadcasting requests for throttle blips, and torque reduction for gear changes. I am using the Lua scripting to implement the throttle blips with setEtbAdd(blip). This works fine. My question is with the ignition retard or spark cut to reduce engine power on upshifts. Trans controller broadcasts a positive integer, higher number is more aggressive cut request. I was thinking to use setTimingAdd function but I'm not sure if it will accept a negative value such as setTimingAdd(-20). Can anyone offer any insight on this? Maybe use something else?
Matt
MT Motorsport / EcotecMiata
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: NA Miata EcotecMiata Race Car

Post by AndreyB »

Just updated https://github.com/rusefi/rusefi/wiki/Lua-Scripting adding #torque three times.

You've called out two functions intended for torque management and the third one is https://github.com/rusefi/rusefi/wiki/Lua-Scripting#setsparkskipratioratio

See also https://github.com/rusefi/rusefi/issues/5231
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
mtmotorsport
Posts: 89
Joined: Wed Mar 31, 2021 10:00 pm

Re: NA Miata EcotecMiata Race Car

Post by mtmotorsport »

Also, isFuelPumpOn is no longer a valid getOutput in the latest snapshot firmware?
Matt
MT Motorsport / EcotecMiata
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: NA Miata EcotecMiata Race Car

Post by AndreyB »

mtmotorsport wrote:
Tue Apr 18, 2023 1:47 am
Also, isFuelPumpOn is no longer a valid getOutput in the latest snapshot firmware?
Looks so :( Please poke me every three days it might be relatively easy to get back. see https://github.com/rusefi/rusefi/issues/5239
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
mtmotorsport
Posts: 89
Joined: Wed Mar 31, 2021 10:00 pm

Re: NA Miata EcotecMiata Race Car

Post by mtmotorsport »

It was being used to control fuel pump via CAN. Updated to latest firmware and no more fuel pump function.
Matt
MT Motorsport / EcotecMiata
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: NA Miata EcotecMiata Race Car

Post by AndreyB »

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
mtmotorsport
Posts: 89
Joined: Wed Mar 31, 2021 10:00 pm

Re: NA Miata EcotecMiata Race Car

Post by mtmotorsport »

Thats ok, for now I will use engine rpm > 0 to control the fuel pump.

Adding support for commercially available CAN devices would be nice. I'm not use any "motorsport" PDMs in this car so all the control script is custom anyways.
Matt
MT Motorsport / EcotecMiata
mtmotorsport
Posts: 89
Joined: Wed Mar 31, 2021 10:00 pm

Re: NA Miata EcotecMiata Race Car

Post by mtmotorsport »

Making the switch to E85.

After a couple dyno runs I think there needs to be a user adjustable enrichment factor.

I have the VE table well calibrated on 94 octane pump gas (E10 here in Canada). Flex fuel sensor reports 10-11% content. Now I'm using some motorsport grade E85 which I believe is oxygenated beyond consumer pump grade E85 and its causing closed loop fuel correction to add 15% and still not fully reaching the target lambda.
Matt
MT Motorsport / EcotecMiata
User avatar
NormanAlphaspeed
Posts: 63
Joined: Fri Jan 13, 2017 7:15 am
Location: Puerto Rico
Contact:

Re: NA Miata EcotecMiata Race Car

Post by NormanAlphaspeed »

I think what you need can be achieved by using the "VE Blend" Tables

Go here
image.png
image.png (132.63 KiB) Viewed 19086 times
And set the table to use Flex%
image.png
image.png (88.46 KiB) Viewed 19086 times
And set it up to something like this
image.png
image.png (112.05 KiB) Viewed 19086 times
That enables this table
image.png
image.png (116.7 KiB) Viewed 19086 times
Which you can use to add/remove fuel from the main map in relation to your flex%

While it's not as intuitive as other implementations, it should work exactly for what you want.
mtmotorsport
Posts: 89
Joined: Wed Mar 31, 2021 10:00 pm

Re: NA Miata EcotecMiata Race Car

Post by mtmotorsport »

The firmware I'm running doesn't have blend tables. I will try the new firmware with blend tables, as long as the fuel pump flag is visible to Lua as I need that for PDM fuel pump control.
Matt
MT Motorsport / EcotecMiata
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: NA Miata EcotecMiata Race Car

Post by AndreyB »

mtmotorsport wrote:
Sat Jun 10, 2023 11:09 pm
as long as the fuel pump flag is visible to Lua as I need that for PDM fuel pump control.
Just fixed that under https://github.com/rusefi/rusefi/issues/5239 - snapshot has getOutput("isFuelPumpOn") now. Not part of latest release.
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
mtmotorsport
Posts: 89
Joined: Wed Mar 31, 2021 10:00 pm

Re: NA Miata EcotecMiata Race Car

Post by mtmotorsport »

Awesome! Will try that tomorrow night hopefully
Matt
MT Motorsport / EcotecMiata
mtmotorsport
Posts: 89
Joined: Wed Mar 31, 2021 10:00 pm

Re: NA Miata EcotecMiata Race Car

Post by mtmotorsport »

Using Lua for setTimingAdd() and setEtbAdd() for torque reduction and rpm blips via CAN from HTG trans controller. Works great. Video on the Facebook group.

Next up is firmware update for table blending. Want to use that for E85 blending and setBoostDutyAdd() for a bit more boost when you get stuck behind big V8 powered tube chassis cars haha.
Matt
MT Motorsport / EcotecMiata
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: NA Miata EcotecMiata Race Car

Post by AndreyB »

Can you share the script? There are some proposals to have build in higher level torque redu tion functions into Lua.
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
mtmotorsport
Posts: 89
Joined: Wed Mar 31, 2021 10:00 pm

Re: NA Miata EcotecMiata Race Car

Post by mtmotorsport »

Code: Select all

function onCanRx(bus, id, dlc, data)

	if id == 287454020 then
		blip = data [1]
		c = data [2]
		tt = data[4]
	end
----

function onTick()

	setEtbAdd(blip)
	cut = - c
	setTimingAdd(cut)

The rest of the code that has nothing to do with this was left out, but I can post the whole mess if anyone cares to see it.
Matt
MT Motorsport / EcotecMiata
mtmotorsport
Posts: 89
Joined: Wed Mar 31, 2021 10:00 pm

Re: NA Miata EcotecMiata Race Car

Post by mtmotorsport »

AndreyB wrote:
Tue Jul 04, 2023 9:52 pm
Can you share the script? There are some proposals to have build in higher level torque redu tion functions into Lua.
What I really think would be ideal but I have no idea how hard it would be to implement is some rudimentary torque broadcast. Could be as simple as displacement vs fuel flow vs ve*map. Maybe even a table where the user could fill in torque values by rpm and load and have those broadcast.
Matt
MT Motorsport / EcotecMiata
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: NA Miata EcotecMiata Race Car

Post by AndreyB »

They keep saying that torque is very proportionate to air flow? I guess we already have air flow info available to lua?
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
mtmotorsport
Posts: 89
Joined: Wed Mar 31, 2021 10:00 pm

Re: NA Miata EcotecMiata Race Car

Post by mtmotorsport »

Yes it is, and I didn't know that. Air flow is a big deal, that makes the rest of the torque calcs easier. And this doesn't have to be some extremely precise value, I'm sure +- 25-50Nm is fine. Yes there should be scalars for temps, specific fuel energy, friction, etc but really for most aftermarket needs this is overkill. In the example of modern transmission control there is really no huge difference in shifting algorithm between say 300Nm and 325Nm, but there would a big difference between 300Nm and 100Nm. I think as long as we are in the general area that is sufficient for standalone ecu.

Edit

Maybe friction is the only one we could really use. Generally at idle the engine is producing net zero torque. The air flow torque math would say the engine is producing some positive number of Nm. User can adjust the "friction torque" value to get the idle net torque reported as near zero. That would make any standalone transmission controller happy.
Matt
MT Motorsport / EcotecMiata
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: NA Miata EcotecMiata Race Car

Post by AndreyB »

getOutput("sdAirMassInOneCylinder")
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
mtmotorsport
Posts: 89
Joined: Wed Mar 31, 2021 10:00 pm

Re: NA Miata EcotecMiata Race Car

Post by mtmotorsport »

Chasing TPS drop out. It is annoying me because sometime the TPS error is big/long enough to cause the throttle to actually close a bit and the drive feels this. Also this is causing fits with the transmission controller. I've uploaded a log which shows the issue. It seems like there is more noise on the rawTps1Secondary when compared to the rawTps1Primary channel. The TPS channel shows numerous drop outs.

I have replaced the connector and terminals at the throttle body. I have replaced the throttle body. I have tested the integrity of the wiring between throttle body and ECU. I have tested the terminal pull tension of the terminals in the ECU connector. All this checks out.

I am using ANVolt2 for primary TPS, and ANVolt5 for secondary TPS. I have ANVolt8 and ANVolt9 available if need be. Maybe ignition voltage noise is causing a problem with U46 opamp? If you recall I was having noise issues with the CAM signal as well, which is also on this U46 with ANVolt5.

https://www.rusefi.com/online/view.php?log=1259
Matt
MT Motorsport / EcotecMiata
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: NA Miata EcotecMiata Race Car

Post by AndreyB »

What if you flip tps channels would the issue stay with sensor channel or hardware channel?
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
mtmotorsport
Posts: 89
Joined: Wed Mar 31, 2021 10:00 pm

Re: NA Miata EcotecMiata Race Car

Post by mtmotorsport »

That I have not tried. I will try Monday
Matt
MT Motorsport / EcotecMiata
mtmotorsport
Posts: 89
Joined: Wed Mar 31, 2021 10:00 pm

Re: NA Miata EcotecMiata Race Car

Post by mtmotorsport »

Some datalogs attached. Essentially flipped TPS primary and secondary channels on AV2 and AV5 then physically changed to AV8 and AV10 and swapped those from primary to secondary again. Odd behaviour, in that the TPS error occurs at different blade angles. These logs are all with the ETB disabled and me manually moving the throttle blade from stop to stop.

EDIT:
Should note that this is with an almost new genuine GM throttle body. It has 3 race weekends on it, maybe 15 hours total time.

AV2 Primary AV5 Secondary
https://rusefi.com/online/view.php?log=1264

AV5 Primary AV2 Secondary
https://rusefi.com/online/view.php?log=1263

AV8 Primary AV10 Secondary
https://rusefi.com/online/view.php?log=1262

AV10 Primary AV8 Secondary
https://rusefi.com/online/view.php?log=1261
Matt
MT Motorsport / EcotecMiata
mtmotorsport
Posts: 89
Joined: Wed Mar 31, 2021 10:00 pm

Re: NA Miata EcotecMiata Race Car

Post by mtmotorsport »

I can see a slight variance in the two TPS curves. I wonder if the ecu should record a TPS swing from min to max and store that as known good data instead of just the two points and straight line interpretation it does now?
Matt
MT Motorsport / EcotecMiata
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: NA Miata EcotecMiata Race Car

Post by AndreyB »

It has been two weeks, I was hoping to have a look at this data but I simply did not have time so far :(

https://github.com/rusefi/rusefi/issues/5506 created to have a record

Is it https://rusefi.com/online/view.php?msq=946&dialog=tpsSensor tune?

Tune says 138 which is 138 / 200 = 0.69 volts but log seems to show much closer to 0.63v? that's danger close to 5%

111 units which is 0.555 seems to match the log much closer.
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