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

Karma: +0/-0
Offline Offline

Posts: 18


« Reply #15 on: September 27, 2021, 11:04:03 AM »

Being that the Arduino is trying to replicate the OE MAF signal, it seems like KFKHFM would apply, though it’s ability to make up for the potential inadequacies/discrepancies of the Arduino remains to be determined.

That being said, agreed the rs6 method is much cleaner, thanks for pointing this out and also agree the barrier to entry with Arduino is much lower (I will go learn how to implement the routine in the ecu). The trivial algorithm that was pointed out is exactly what is bing used (nothing fancy), just outside of the ECU in a separate controller.

As was pointed out, the loop rate of the Arduino vs what the ECU is expecting is a point of risk along with how fast the Arduino can respond to changes in airflow.
Logged
prj
Hero Member
*****

Karma: +903/-420
Online Online

Posts: 5787


« Reply #16 on: September 28, 2021, 05:24:09 AM »

Being that the Arduino is trying to replicate the OE MAF signal, it seems like KFKHFM would apply, though it’s ability to make up for the potential inadequacies/discrepancies of the Arduino remains to be determined.

That being said, agreed the rs6 method is much cleaner, thanks for pointing this out and also agree the barrier to entry with Arduino is much lower (I will go learn how to implement the routine in the ecu). The trivial algorithm that was pointed out is exactly what is bing used (nothing fancy), just outside of the ECU in a separate controller.

As was pointed out, the loop rate of the Arduino vs what the ECU is expecting is a point of risk along with how fast the Arduino can respond to changes in airflow.
You will also have clock synchronization issues because the ECU runs in 1ms raster etc.
My point is just physically wiring the two signals together into one and feeding it into the ECU won't really be any worse than the Arduino for precision and will be much more reliable.
Linearizing them separate in the ECU and then adding them together is the only thing that is better.

KFKHFM criticism does not apply, I forgot that the axis for KFKHFM was rl. So it does not matter if you apply it to each individually or to the whole result. The RS6 applies it to each individually though IIRC.
Logged

PM's will not be answered, so don't even try.
Log your car properly.
elRey
Hero Member
*****

Karma: +31/-1
Offline Offline

Posts: 565


« Reply #17 on: September 28, 2021, 09:23:25 AM »

prj, why not suggest digging the MAFs altogether for your MAP based load conversion?
Logged
prj
Hero Member
*****

Karma: +903/-420
Online Online

Posts: 5787


« Reply #18 on: September 28, 2021, 09:44:11 AM »

prj, why not suggest digging the MAFs altogether for your MAP based load conversion?
I did. And that's what I'd do in a such situation.
It's much harder to tune though, because BGSRM actually has to have reasonable values so that load is right, unlike with the MAF.
Logged

PM's will not be answered, so don't even try.
Log your car properly.
BlackT
Hero Member
*****

Karma: +79/-39
Offline Offline

Posts: 1415



« Reply #19 on: September 28, 2021, 11:12:44 AM »

For this you will need to program atmega328p(most arduino boards use it)  in C, without any libary.  It will take you more time to learn all that than ASM in C167
And as other suggest, stock ECU will be more safe to use, and it will be far more better.
I am using atmega328 for years pushing it to limits, I know it can do this task to work without problem, but I also suggest do it with stock ECU
Logged
d3irb
Full Member
***

Karma: +131/-1
Offline Offline

Posts: 185


« Reply #20 on: September 28, 2021, 11:53:49 AM »

Just wanted to offer a word of encouragement - I've talked to quite a few people from around the Internet who were working on Arduino based piggyback hardware of various sorts. It really is a "when you have a hammer, everything is a nail" type of situation, it would seem. All of them have been able to learn how to do things with stock ECU instead. One of my main motives in publishing open source and open documentation for various ECU tasks is to get more people out of the "ECU scary, going to make hack hardware instead" mindset.

Agree that the Atmega approach is totally viable too, albeit challenging. To do things in a theoretically correct way you'd need <250us latency and 2khz loop rate (Nyquist), so that the ECU sees the same 1ms samples as it would without the Arduino in place even if the cycle clocks are skewed from one another. The real constraints to make the car run are probably looser, but still this is not a place where you want to be introducing latency or aliasing artifacts of any kind. And at the end of the day, you still have to deal with the usual analog stuff (ground loops / voltage bias, noise, blah blah) and you have an unreliable piece of homemade hardware in your car.

Getting the tools set up to patch is worth the investment as you can add much more functionality and you don't have to worry about these kinds of hardware devices again.
Logged
strombomb
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 18


« Reply #21 on: September 28, 2021, 06:33:20 PM »

Thanks everyone for the valuable input and pardon my ineptitude on the matter. This sets up the 2.7t Boxster for success and I appreciate it.
Logged
elRey
Hero Member
*****

Karma: +31/-1
Offline Offline

Posts: 565


« Reply #22 on: September 28, 2021, 07:26:34 PM »

I’ll also add that I’ve used arduino+atmega32p for over a decade to exteranlly control my N75 based on MAP voltage. I did this mainly so I could instantly change my boost curve on the fly.

I’ve later patched ME7.5 to do something similar to what prj suggested and used post-cat O2 input to read a 2nd MAP and an output to control a 2nd N75 for a compound turbo setup. I’ve also used SAI relay output for an exhuast cutout.

However, my most recent project is to use arduino + ESP32 to drive a LCD for a custom color MFA just to display selected gear on a dsg swapped mk4.

For engine control, I agree with the others. Very worth it to learn.
Logged
horse740
Newbie
*

Karma: +1/-0
Offline Offline

Posts: 1


« Reply #23 on: August 24, 2022, 05:58:23 PM »

Quote
The airbox (and entire tract) on the 2.7t intake is specifically designed for linear results across all intake velocities.
The length of the suction path, from the air flow meter to the turbine impeller, is 1.5 meters.
Y-pipe is asymmetric at the inlet (near the flow meter) and with a large angle of attack of the air flow.
What "linearity" are we talking about? This is pure savings and implementation on one flow meter!
In terms of gas dynamics, a design with a crooked Y-pipe is an engineer's nightmare. It is near the measuring zone of the flow meter that the swirling of the intake air flow occurs, distorting the measured data!

The desire and the idea are clear and real.
Personally, I implemented a signal adder for two flowmeters for atmega 328, two 12-bit spi ADCs and one 12-bit spi DAC. Based on two Bosch flowmeters
0280217814 with a limit of 1560 kg/h and corresponding original linearization curves interpolated to 12 bit resolution.
After working with the code, we got a sampling time of 20 kHz at a resolution of 12 bits.
The addition of values ​​from two flowmeter signals is performed correctly and coincides with the mathematically added values.
The naturally resulting linearization graph(MLHFM) is created mathematically as a sum and put in me7.1.

The official Bosch information about HFM5 indicates the following time parameters for converting air flow into voltage:
1) T1 = 15 ms (In case of sudden increase of the air-mass flow from 10 kg · h–1 auf 0,7 Qm nominal, time required to reach
63% of the final value of the air-mass signal.)
2) T2 = 30 ms ( Period of time in case of a throughflow jump of the air mass | ∆ m/m | ≤ 5%.)
With a conversion time of 15ms, we obtain the maximum frequency of the air mass meter signal change equal to 66.6666 hertz
The available 20kHz ADC/DAC sampling rate is more than sufficient to respond quickly to changing flowmeter signals.

It is important to pay attention to the reference signals Vref, which are twisted into one point by the author of the topic ...)
Logged
Pages: 1 [2]
  Print  
 
Jump to:  

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