Pages: [1] 2
Author Topic: MAF Signal Converting HW/SW  (Read 7351 times)
strombomb
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 20


« on: September 26, 2021, 11:26:03 AM »

Hello,

I have an application where I am wanting to run parallel MAF sensors on a 2.7t. The engine is going in a Boxster so the need for parallel MAF’s is driven by spatial constraints and the desire to keep using ME7.1 engine management to maintain readiness monitors.

I have an Arduino nano that I am using to read 2x MAF sensors from a 1.8t (06a906461l), using lookup tables to first convert from voltage to mass air flow (g/s), then add together (sum) to get total mass air flow, then covert again to a voltage that the stock hitachi MAF sensor (06C133471A) would output, then output that voltage to be read by the me7.1 ecu.

I’ve got this all rigged up on a test bench. I am using a y-pipe to connect 2x 1.8t mass air flow sensors to 1x hitachi S4 sensor so that I can compare my simulated voltage (parallel MAF voltage being crated by the Arduino) to the hitachi sensor voltage that I am trying to emulate… I am doing this to check that my hardware and software is doing what it should be doing. Then I have a leaf blower attached to the setup to pull air through everything.

I can tell that my 2x 1.8t readings are almost exactly the same. This gives me confidence that the sensors are good and my measurement setup is ok. My issue is that the Arduino simulated voltage isn’t as close to the actual hitachi voltage that I’d like. In example, when air is moving and the hitachi sensor reads about 3.2v (which is about 107 g/s), the Arduino spits out 3.0v. The hitachi sensor is used, but came from a good running car. Also, if the sensors was degraded, I’d expected it to read low as opposed to high.

My question for the forum is… I am using the mass air flow vs voltage tables from the associated ecu bin files to make my conversions… should these be reliable enough to make my voltage-maf conversion with? I COULD adjust my conversion table to dial the Arduino into this hitachi sensor, but it seems like I should be able to just use the tables from the ECU’s. In all, the Arduino and the hitachi sensor are about 6% off of each other at 3v… is this too much? Error will likely be greater at higher mass air flow levels. What do you think?
Logged
nyet
Administrator
Hero Member
*****

Karma: +607/-168
Offline Offline

Posts: 12268


WWW
« Reply #1 on: September 26, 2021, 11:47:32 AM »

Either way, you're going to probably need to tweak MLFHM/KFKHFM/KFLF etc. etc. so whether or not you do it in the arduino code doesn't really matter much.
Logged

ME7.1 tuning guide
ECUx Plot
ME7Sum checksum
Trim heatmap tool

Please do not ask me for tunes. I'm here to help people make their own.

Do not PM me technical questions! Please, ask all questions on the forums! Doing so will ensure the next person with the same issue gets the opportunity to learn from your ex
strombomb
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 20


« Reply #2 on: September 26, 2021, 12:19:17 PM »

Either way, you're going to probably need to tweak MLFHM/KFKHFM/KFLF etc. etc. so whether or not you do it in the arduino code doesn't really matter much.
Fair point, Arduino table and MLFHM could be anything being that I have control over both. Just trying to get started with something usable.

Do you have any idea what sort of accuracy should be excepted out of a MAF sensor? I found a Bosch document that stated 1.5% for new hot film MAF sensors… I realize the tune will have to be dialed eventually, I’m just trying to set a target for how good my Arduino+2x MAF’s need to be before I stop thinking about it and move on.

Would really help to have a calibrated flow bench.

Thanks!!
Logged
nyet
Administrator
Hero Member
*****

Karma: +607/-168
Offline Offline

Posts: 12268


WWW
« Reply #3 on: September 26, 2021, 02:02:33 PM »

Accuracy or precision? heh. hard to say.
Logged

ME7.1 tuning guide
ECUx Plot
ME7Sum checksum
Trim heatmap tool

Please do not ask me for tunes. I'm here to help people make their own.

Do not PM me technical questions! Please, ask all questions on the forums! Doing so will ensure the next person with the same issue gets the opportunity to learn from your ex
fknbrkn
Hero Member
*****

Karma: +185/-23
Offline Offline

Posts: 1454


mk4 1.8T AUM


« Reply #4 on: September 26, 2021, 02:22:22 PM »

its better to run it with stock maf and yours and then compensate difference with KFKHFM/MLHFM
1 point of comparing its a waaaay far from any precision

p.s. what about "add ushfm_w, uushk_w" would be much easily than arduino.. yay or nay? 
« Last Edit: September 26, 2021, 02:33:35 PM by fukenbroken » Logged
strombomb
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 20


« Reply #5 on: September 26, 2021, 02:47:59 PM »

I was thinking accuracy - the sensor and arduino voltage readings seem pretty stable, they are just different. I've checked that my 5v and 12v supplies are stable. I am thinking either one of the conversion tables i'm using is not very good (even though they were taken straight from the bin files) or the hitachi MAF is suspect. Here's a graph to show the difference I'm seeing.



I totally get that the SW can be adjusted to dial it in, I'm just trying not to make sure I'm not building in some error into my MAF setup.

fukenbroken - what do you mean by "its better to run it with stock maf and yours and then compensate..."?

Again the reason I'm pursuing parallel MAF's is because of spatial constraints - i'd have to make some pretty elaborate intake ducting to tie into a single MAF sensor.

Logged
nyet
Administrator
Hero Member
*****

Karma: +607/-168
Offline Offline

Posts: 12268


WWW
« Reply #6 on: September 26, 2021, 06:25:31 PM »

That's plenty consistent. I'd say build your MLHFM based on your data and call it a day
Logged

ME7.1 tuning guide
ECUx Plot
ME7Sum checksum
Trim heatmap tool

Please do not ask me for tunes. I'm here to help people make their own.

Do not PM me technical questions! Please, ask all questions on the forums! Doing so will ensure the next person with the same issue gets the opportunity to learn from your ex
strombomb
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 20


« Reply #7 on: September 26, 2021, 07:30:45 PM »

Well I added an artificial scale on the arduino table (scaled up the hitachi MAF table) to bring it real close. MLHFM can take it from here. In this plot, you can see the low and high speed on my leaf blower then the cost down to zero flow.  This equates to about 3.1V (100 g/s) and 3.6V (145 g/s). I guess the take away is if you want to test a MAF sensor at full scale, you need a pretty big leaf blower.

Logged
nyet
Administrator
Hero Member
*****

Karma: +607/-168
Offline Offline

Posts: 12268


WWW
« Reply #8 on: September 26, 2021, 07:41:36 PM »

I'm sure you already know this, but the flow profile of a leaf blower is going to be very different from actual flow with airbox and the fact that it is pulling not pushing etc
Logged

ME7.1 tuning guide
ECUx Plot
ME7Sum checksum
Trim heatmap tool

Please do not ask me for tunes. I'm here to help people make their own.

Do not PM me technical questions! Please, ask all questions on the forums! Doing so will ensure the next person with the same issue gets the opportunity to learn from your ex
strombomb
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 20


« Reply #9 on: September 26, 2021, 08:27:03 PM »

nyet - great points and understood. Definitely not the same, but I did include a few key elements to make my setup somewhat representative.  I'm using the blower as a suction device (it can be reversed on my corded Toro unit by reconfiguring it). It is placed a couple of feet away from the 2.7t MAF in an effort to eliminate any flow nasties from affecting the MAF sensor. On the 2x end of the y-pipe are the 1.8t MAF sensors with the small cone filters directly attached (as I intend to run them). 

Perhaps the 9% that I had to modify the hitachi table with accounts for the specifics of the 2.7t airbox & intake ducting.

I tried to spare the folks by blurring my disaster of a workbench, but here's the setup.

Logged
prj
Hero Member
*****

Karma: +1072/-480
Offline Offline

Posts: 6035


« Reply #10 on: September 27, 2021, 12:20:19 AM »

Introducing another point of failure is dumb.

Either run SD or if you really want two mafs then wire 2nd maf to rear O2 input and add them together in software in the ECU.

There is absolutely zero reason to run a piggyback, and I seriously doubt you are going to get the construction right where shit won't fail due to vibration or moisture.
Logged

PM's will not be answered, so don't even try.
Log your car properly - WinOLS database - Tools/patches
nyet
Administrator
Hero Member
*****

Karma: +607/-168
Offline Offline

Posts: 12268


WWW
« Reply #11 on: September 27, 2021, 12:23:50 AM »

Thats definitely not going to work well with the maf that close to the filter.

No wonder your signal is very different. I'm surprised it is as similar as it is.

You're going to see some very strange results at idle IMO

The airbox (and entire tract) on the 2.7t intake is specifically designed for linear results across all intake velocities.

Messing with that invites a whole host of fueling issues that can only partially be mitigated with KFKHFM/KFLF/FKVVS
« Last Edit: September 27, 2021, 12:27:08 AM by nyet » Logged

ME7.1 tuning guide
ECUx Plot
ME7Sum checksum
Trim heatmap tool

Please do not ask me for tunes. I'm here to help people make their own.

Do not PM me technical questions! Please, ask all questions on the forums! Doing so will ensure the next person with the same issue gets the opportunity to learn from your ex
strombomb
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 20


« Reply #12 on: September 27, 2021, 06:30:55 AM »

A couple of things to take from your comment -

1. I should check response at lower flow rates (3-5.5 g/s is spec for idle), this will give me a better read on drivability and idle stability. It would be acceptable if both the hitachi and Arduino read within 3-5.5 g/s.

2. Check the effect of putting a straight section in front of the 1.8t mafs. I’m sure that the cone filter mounted on the maf housing doesn’t explain the 9% because during testing I could put my hands on the filter in an effort to divert flow and the effect on measured air flow were very little… but this could be worse at lower flow (idle). I’m aware that it is recommended to have a straight section in front of the maf, but that isn’t really a luxury I have. The OE setup has the maf mounted directly to the air box which is basically a velocity stack in a box… so OE doesn’t exactly have a 12” straight in front of the maf sensor either.

This kind of goes back to my original question of how close is close enough? With the 1.09 scale built in, the flow curves line up pretty well, so the system in the picture (2 MAF’s, cone filters on MAFs as shown, Arduino) is representing the hitachi MAF as accurately as the graph shows.
Logged
prj
Hero Member
*****

Karma: +1072/-480
Offline Offline

Posts: 6035


« Reply #13 on: September 27, 2021, 08:25:36 AM »

It's unfortunate that you don't realize that none of this matters.

Your arduino is:
1. Not going to have pulsation correction (if relevant).
2. Not going to be able to take advantage of KFKHFM
3. Will probably make the ECU throw codes if the correct voltage is not presented on the pins fast enough.

At this point you might as well connect the two voltages together and feed it into the ECU.
The precision will be about the same. This is a massive waste of time. As is trying to look at gram exact accuracy when you're going to be adding this and then ECU will do wrong corrections via KFPU and KFKHFM to it. Giving you errors of 10% and more.

If something I learned is that the most dangerous people are those who picked up a microcontroller for the first time. They have an urge to stick it into every place possible, where it's not needed.

The code to do what you want to do is literally trivial to write, you need to copypaste the MLHFM routine, change the inputs and outputs, call both halves, then add the resulting two airflows and write them to mshfm_w and mshfms_w.
That's it, job done. You can even look how it's done in the C5 RS6 from factory. Takes maybe half an hour to write it (I'm being generous).

Even better is to remove the MAF's in the first place and run SD in this situation.

@Nye I am surprised you are being an enabler for this madman. None of this is needed, it's a huge downgrade in precision and reliability. You will get better results even running alpha/n than this bullshit.
« Last Edit: September 27, 2021, 08:30:12 AM by prj » Logged

PM's will not be answered, so don't even try.
Log your car properly - WinOLS database - Tools/patches
nyet
Administrator
Hero Member
*****

Karma: +607/-168
Offline Offline

Posts: 12268


WWW
« Reply #14 on: September 27, 2021, 10:10:17 AM »

2. Not going to be able to take advantage of KFKHFM

I'm curious about this, why wouldn't KFKHFM apply?

In any case, I agree with the rest of your statement.

The reason this is so popular, of course, is that hacking arduino code is much easier than hacking in ASM and has a much much much lower barrier to entry.

I'm not flat out discouraging him because it's at least less dumb then alpha-n.
Logged

ME7.1 tuning guide
ECUx Plot
ME7Sum checksum
Trim heatmap tool

Please do not ask me for tunes. I'm here to help people make their own.

Do not PM me technical questions! Please, ask all questions on the forums! Doing so will ensure the next person with the same issue gets the opportunity to learn from your ex
Pages: [1] 2
  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Page created in 0.024 seconds with 16 queries. (Pretty URLs adds 0s, 0q)