[rusEfi] Mazda 1996 323f 1.5l #45

Your chance to introduce yourself and your vehicle
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: Mazda 1996 323f 1.5l #45

Post by AndreyB »

Welcome to the club :)
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
alexander-n8hgeg5e
Posts: 50
Joined: Mon Oct 01, 2018 4:42 pm

Re: Mazda 1996 323f 1.5l #45

Post by alexander-n8hgeg5e »

Thanks :D . It was really fun.

edit: Hey cool. I yust, realized my car got a number :D

edit:
I will post how i did it.
In short i used values that i captured from the old ecu.
I wrote down , at diffent simulated loads, and different rpm
, the values ign time from rising edge,
and inj time in ms.
First i used arduino pwm, and some filter.
Had not the right potentiometer.
Later i switched to resistors.

The old ecu was in some emergency mode during this but good for some values.
I post the notes , easier than describing what i captured.

The MAF sensor values i got from
many loads at same rpm. 6000 rpm in my case.
I calculated an approximation of the MAF Table
by assuming AFR 14 .

So as I plugged in the thing the first time after
fiddeling arround with the tables, the thing was running.
I was surprised that i could actually drive it.
It took gas and i drove arround the block.
Then after 3 hours and tuning it worse
i had knewed that the first table had not been bad.

So here in case it is of use for someone,
the notes all in one
reduced_P1230678.JPG
reduced_P1230678.JPG (504.08 KiB) Viewed 7901 times
at the right bottom there is nearly my maf table but in mass of fuel per time

This is the o2 guessing device:
Screenshot_20181214_015806.png
Screenshot_20181214_015806.png (33.33 KiB) Viewed 7897 times
I coded nearly all of the settings into c-code, including this narrow to wide table.
I know there is a tool to convert tables, but i coded a small tool in python
generating the ign-table in c-code.
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: Mazda 1996 323f 1.5l #45

Post by AndreyB »

alexander-n8hgeg5e wrote:
Fri Dec 14, 2018 12:02 am
I know there is a tool to convert tables, but i coded a small tool in python
generating the ign-table in c-code.
Now we need to put your software skills to good use. Would you like to develop something cool? :)
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
alexander-n8hgeg5e
Posts: 50
Joined: Mon Oct 01, 2018 4:42 pm

Re: Mazda 1996 323f 1.5l #45

Post by alexander-n8hgeg5e »

For sure!
edit: I like all freedom software stuff, the more free the more i like it.
This time i could do things to get further and could accept to use a precompiled toolchain.
As i wanted to use one of these wifi chips , esp32 with xtensa core , i got stuck because the toolchain
did not want to compile. In software things i'm no professional or so. But because i
started using gentoo linux and installed vim as editor, i learned how to do some stuff.
I configured my vim config for some weeks i think, and got it only to work as i want it to, by
patching the vim code. At this point i felt like larry the cow.
(gentoo linux has a cow who's name is larry) - > he felt in control, and he liked it
User avatar
andreika
donator
donator
Posts: 461
Joined: Mon Feb 13, 2017 2:35 pm
Location: Kiev

Re: Mazda 1996 323f 1.5l #45

Post by andreika »

Very nice, congrats!

Can you upload your current TunerStudio config files? And maybe some logs?

Btw, why is your advance angle negative? Like -17 degrees in the video? Is it normal? :shock:

For better cranking, you may try tuning postcranking enrichment and aftercranking IAC duration settings:
aftercranking_settings.PNG
aftercranking_settings.PNG (25.04 KiB) Viewed 7884 times
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: Mazda 1996 323f 1.5l #45

Post by kb1gtt »

Very nice. That is a very realistic test track :) Good to see you have gotten the idle tuned.

Did you resolve the coolant temperature issue? I suspect it was a voltage drop during cranking, probably fixed by correcting a wire.
Welcome to the friendlier side of internet crazy :)
alexander-n8hgeg5e
Posts: 50
Joined: Mon Oct 01, 2018 4:42 pm

Re: Mazda 1996 323f 1.5l #45

Post by alexander-n8hgeg5e »

kb1gtt wrote:
Fri Dec 14, 2018 10:27 am
Did you resolve the coolant temperature issue? I suspect it was a voltage drop during cranking, probably fixed by correcting a wire.
I think it's more serious than a voltage drop. Voltage should be ok.
It is powerd by pullup to 5v i think.
During cranking the voltage is above 8-10V
I adjusted the rusefi voltage reading by useing a real voltmeter.
The Sensor is faulty. If the engine gets warm, it suddenly jumps down and up.
I disconnected it for now. Have to order one quickly...
edit:
at first i suspected my soldering... then i pressed all resistors on my board and the opamp, (gently)
and could not find any correlations.
The behavier of the cooling reading was for me like i had seen this long befor...
edit2:
without rusefi , i never had found out.
I would have to buy more mazda ecu's form yunkyard including transponder and then depinning and guessing the pins of the connector,
as i had to do it befor.
Last edited by alexander-n8hgeg5e on Mon Dec 17, 2018 10:42 pm, edited 6 times in total.
alexander-n8hgeg5e
Posts: 50
Joined: Mon Oct 01, 2018 4:42 pm

Re: Mazda 1996 323f 1.5l #45

Post by alexander-n8hgeg5e »

andreika wrote:
Fri Dec 14, 2018 8:43 am
Very nice, congrats!

Can you upload your current TunerStudio config files? And maybe some logs?
Yes I will upload.
For logs i have to look if they were taken somewhere. I found no sdcard at home, so no one on my board.
I plan to make all the settings nice and push them to github.
First i have to merge my branches , then add tunerstudio stuff.
I can upload some tuner studio tunes from my netbook.
Have to buy this sensor , not really tuneable without it.
Could make a hot , and an cold setting.
edit:
here are my tuner studio files:
My maf curve is looking a bit unsteady... but i was to lazy to add more points. (i tuned by real maf)
The last with date in name was the last. The one named current_somewhat ,maybe older.
Attention: incompatible tunerstudio settings! Probably not ( useable on controller / could damage something ) , only for reading by humans.
tunerstudio_tunes.zip
(1.61 MiB) Downloaded 280 times
edit2:I forgot, my tunerstudio files are for a modified version of rusefi persistent config.
I missed the real maf entry and added a bit to get it. So it's incompatible!
I will remove them if it does not makes sense to offer them here.
Btw, why is your advance angle negative? Like -17 degrees in the video? Is it normal? :shock:
I set -20 for 150rpm , and i have 350 and 450 or so , (many low values).
I don't know whats best to set up engines, never did that.
I only know if it burns slower and if fast what direction to tune and looked at some diagramms that
showed that there is an optimal point , for good efficincy . To early means some high pressure at top and so.
-20 was intended for really low rpm , allmost engine stall.
The last tune i made i removed some of the really low values.
I started at -15 for 150 rpm and then at 750 -> "5" or so.
edit: my tought was i interpolate the values more down, because the mazda ecu stopped negative advancing
the values below some point, and i wanted to test if that would bring up the engine better.
Im not sure if TDC is the real TDC at my engine .
I have build a ignition light,from a led flashlight some days ago, but not used it for measuring the TDC.
For better cranking, you may try tuning postcranking enrichment and aftercranking IAC duration settings:
aftercranking_settings.PNG
I adjusted them.
I did not knew really absolute impact of these.
I used the post cranking enrichment if i had knewn that the engine is dieing because it was to lean
after leaving the 500 ,or so,cranking rpm.
The long tapering i entered because i was to lazy to transform it to time, so i wanted to ensure it has enough
air after idle.
Befor i discovered that my idle adjustment screw was adjusted to "way to less air" ,
i had the problem that the engine had not enough power to turn if the oil was
a bit cooled down... but i did not knew about that... thougt my idle setting was the problem.
Last edited by alexander-n8hgeg5e on Mon Dec 17, 2018 10:11 pm, edited 14 times in total.
alexander-n8hgeg5e
Posts: 50
Joined: Mon Oct 01, 2018 4:42 pm

Re: Mazda 1996 323f 1.5l #45

Post by alexander-n8hgeg5e »

The next day i had a little bit a problem...
The day befor ,I swiched the car of , and it had been running way to rich for a long time...
Additionally the next day, i flooded it with fuel while trying to start it.
Then i wanted to protect it with mos2 enriched oil, what i put into the cylinders.(becauset there was only fuel in there...)
Now there was a mess down there and nothing what could be called
"combustion chamber"...
It took me the whole day to get it running again...
I tried alternatingly rusefi and the mazda ecu.
Rusefi performed better.
It was only random/accidential that the mazda ecu was plugged in as it fired up.
It was cold 0 degree celsius (water freezing temp)
I had to use 3 battery chargers (20 amps alltogether)
I cleaned the spark plugs maybe 10 times.
I have supercaps in my car battery, they recharger really fast.
After trying it for hours it went dark, i went to the last resort...
One of these butan/propan gas bottles and a i put the flame on the oil sump.
Maybe i cooked the oil and it was not good...
but it worked , but really hard.
I cleaned the spark plugs a last time and then it fired up like some beast.

What i have learned from that:
  • Befor leaving the car alone in the cold and the dark, it needs some cleanup first, I run it for some time with the old ecu, als long as it is not tuned properly.
  • I need the ozilloscope to check and adjust the O2 sensor readings (maybe watch it ozillating because of short term fuel tune) or buy a wideband O2.
    I drove it to rich again, but cleaned it , and this time had not problems.
  • If it does not fire up always clean by clean mode (full throttle turns fuel of) and check if it ignites. I think if then it does fire up for short it means was to much fuel in there
User avatar
andreika
donator
donator
Posts: 461
Joined: Mon Feb 13, 2017 2:35 pm
Location: Kiev

Re: Mazda 1996 323f 1.5l #45

Post by andreika »

alexander-n8hgeg5e wrote:
Mon Dec 17, 2018 8:09 pm
andreika wrote:
Fri Dec 14, 2018 8:43 am
Btw, why is your advance angle negative? Like -17 degrees in the video? Is it normal? :shock:
I don't know whats best to set up engines, never did that.
Im not sure if TDC is the real TDC at my engine .
I don't know why @Russian didn't react on this... And I don't know why on earth we still have wrong info on our official wiki...
But the truth is that a positive timing number is the value BEFORE TDC!
If you set "-17" degrees in Tunerstudio, it means that it's way after the TDC, i.e. very late ignition (retarded spark). And normal advance angles should be positive, like this:
advance_example.PNG
advance_example.PNG (52.2 KiB) Viewed 7809 times
The fact that your negative advance values work on your car means that you probably have a wrong "Trigger Angle Offset(deg)" setting. And thus all your timing values are shifted (by ~15 degrees I guess?). Currently your globalTriggerAngleOffset is set to 0 (according to your CurrentTune.msq), which is... kinda suspicious.
Yes, you can use the settings like this and run the car, but you should be careful. For example, you've set the ignition advance on cranking to 0, but actually it's not zero (not at TDC) as you might think!
alexander-n8hgeg5e
Posts: 50
Joined: Mon Oct 01, 2018 4:42 pm

Re: Mazda 1996 323f 1.5l #45

Post by alexander-n8hgeg5e »

andreika wrote:
Tue Dec 18, 2018 7:21 am
alexander-n8hgeg5e wrote:
Mon Dec 17, 2018 8:09 pm
andreika wrote:
Fri Dec 14, 2018 8:43 am
Btw, why is your advance angle negative? Like -17 degrees in the video? Is it normal? :shock:
I don't know whats best to set up engines, never did that.
Im not sure if TDC is the real TDC at my engine .
I don't know why @Russian didn't react on this... And I don't know why on earth we still have wrong info on our official wiki...
ok , im lucky , i did not read all , some stuff on the wiki felt a bit outdated
But the truth is that a positive timing number is the value BEFORE TDC!
If you set "-17" degrees in Tunerstudio, it means that it's way after the TDC, i.e. very late ignition (retarded spark).
I did know about that. I intentionally set the angle to after tdc because if the engine nearly stalls and there is a load
in the cylinder , my thought was that it would good to ignite it and kick it running if the piston is already at down position.
But maybe this does not work anyway.
What i experienced, is the following.
I had made the timings a really small bit more earlier (more positive) for cranking and...
I made a cranking advance table for this.
Then during cranking it happened sometimes, that a combustion occured that seemed to stopp the engine.
The sound of this happening was kinda unhealty.
Rpm , i think it was aprox 180 maybe.
I could fix this by making the curve slightly more later.
So my conclusion was that whatever the rpm was, i was on the limrit.
At this low rpm i think the limit is near at the best(this i think), because in advance to other maybe existing reasons,
a bit more later, maybe because of to less compression no ignition would occur at all(this i really don't know).
And normal advance angles should be positive, like this:
This also was my assumption.
I compared to the miata table.
Miate Table is way more earlier.
I think at 750 rpm the 20 degrees advance can makes sense.
Because of some reasons i think my timing is at most 10 degree of.
But to stop speculating about it , i will use my ignition light and the marking i made on the
crankshaft pulleye for the belt.
edit:
I remembered about this:
I think in my case it only did not ignite because it was flooded.
I remember the last time cleaning the sparkplugs befor it finally fired up.
I had some ignition befor that but not enough.
3 plugs were wet. And only one was black and full of carbon.
I think even with the carbon , what is not good, this one full of carbon was the only one that ignited.
I guess even at very low cranking rpm it ignites even if it is more late, but the efficiency is to less.
All power goes down the exaust.
At normal driving i guess this can damage someting if to much.
For general tuning i have the the wikipedia diagram in mind that says because of the max pressure point that is moving with the advance,
to some angle of rotation, the crankshaft has different output energy per ignition cycle. What means power.
My coil was used in a honda 4 cylinder engine and transistor ignition, with 3 connections on it. One had a big resistor in serial.
I removed the resistor , so my coil probably is strong.
For cranking i set constant dwell 30ms to make sure i get strong thunder sparks.
At 5ms I looked at them, and they looked tiny and more weak.
Would be interesting to check out what are the disavantages of
too powerful sparks.
What will happen? Sparkplug contact melted or abrasion maybe
Post Reply