Miata Turbo Forum - Boost cars, acquire cats.

Miata Turbo Forum - Boost cars, acquire cats. (https://www.miataturbo.net/)
-   MEGAsquirt (https://www.miataturbo.net/megasquirt-18/)
-   -   Who's got a mapdaddy? (https://www.miataturbo.net/megasquirt-18/whos-got-mapdaddy-13504/)

Ben 10-20-2007 10:32 PM

Who's got a mapdaddy?
 
If you have a mapdaddy sensor, please post your kpafactor.inc file for me. I believe it will be called kpafactor6400.inc and will be found in the megasquirt folder/your car/ mtCfg. It's in there somewhere, please search for it. It should open in notepad and you can simply copy and paste here. Thanks.

<edit>
I believe that the barofactor.inc file will contain the same information that I need if you can post that file alternatively. either file should work. thx

Ben 10-20-2007 10:36 PM

It will look simmilar to this, but will be scaled differently for the MPX6400A sensor


; genmap 1.0 Motorola MPX4250A
KPAFACTOR: ; KPA ADC Volts (* = out of sensor range)
DB 100T ; 0 - 0.000*
DB 100T ; 1 - 0.020*
DB 100T ; 2 - 0.039*
DB 12T ; 3 - 0.059
DB 13T ; 4 - 0.078
~~~~~~~SNIP~~~~~~
DB 252T ; 252 - 4.941
DB 253T ; 253 - 4.961
DB 100T ; 254 - 4.980*
DB 100T ; 255 - 5.000*

Savington 10-20-2007 10:55 PM

Ben, I have one called kpafactor4115 and one called kpafactor4250, both in the src folder. I am almost certain Jerry installed a 4-bar MAP in my MSPNP before he shipped it to me. Nothing called 6400.

Ben 10-20-2007 11:00 PM

well it's absolutely not the 4250 file, that's the 2.5bar sensor.
Let's peak at the 4115 then, if it's a table like the one I posted that references ADC counts to MAP (in kPa) and sensor voltage output.

neogenesis2004 10-21-2007 12:22 AM

I've got no such file on any of my mtcfg files other than the 250 sensor one. I am using the 4bar though and it is reading correctly.

Ben 10-21-2007 12:36 AM

http://www.msefi.com/viewtopic.php?t=28880

the guy who wrote palmtune thinks it should be there. I don't have it, but I was thinking that my MS was initially set up on Jerry @ DIY's notebook, not mine. the utility that he mentions exisits, but doesn't look like it is programmed for the 4 bar.

so...I'm pretty much out of ideas, but there has to be some way to find correlate MS ADC values with MAP readings with this sensor.

neogenesis2004 10-21-2007 12:44 AM

I dunno what to tell you bro, my MS works perfectly without the file and MT displays values correctly.

Ben 10-21-2007 01:00 AM


http://www.msefi.com/viewtopic.php?p...xh6400a#181482
#elif MPXH6400A
mapBins1 = array, U08, 170, [ 12], "kPa", 1.6197783, 2.147, 20.0, 400.0, 0
I would bet someone else's left testicle that the 1.6197783 is the sensor's scale, and 20 and 400 are the minimum and maximum readings.

neogenesis2004 10-21-2007 01:10 AM

I'm not exactly sure how the adc is calculatedm but 20-400 is correct, it said that in the datasheet I linked you. So you own me half of that testicle ;)

Ben 10-21-2007 01:34 AM

Right, 380/255 = 1.49...I'd bet they get that 1.62 because the sensor's real world output is not 0-5V, but something more like .2-4.8V or whatever, so you miss out on some potential resolution there. I'll try it tomorrow and see what happens.

Reverant 10-21-2007 03:33 AM

0-5V depends on how 5 (AKA full scale) is your power supply voltage (usually around 4.92V with a LM7805 voltage reg) and how 0 is your ground (usually 0.02 to 0.05V). So you may have to compensate for that.

Jim

Ben 10-23-2007 03:11 PM

OK, I believe I've got the scale value of 1.62 figured out.

The sensor range is 20-400 kPa, or span of 380kPa. It's output range is .2-4.8 VDC, meaning it has a span of 4.6VDC.
The MS has an ADC count of 255 over 5V.

4.6VDC/5VDC = .92
.92 x 255ADC = 234.6ADC

380 kPa
------- = 1.6197783 kPa/ADC = the scale = :bigtu:
234.6 ADC

Ben 10-23-2007 11:19 PM

Pitfall!
 
I sent my solution to the gentleman who wrote PalmLog. He noted that his base values were indeed inaccurate, but

When displaying map in PalmTune, it's critical that the map displayed = MS internally calculated map, regardless of accuracy.
Essentially, it looks like MegaTune's kpafactor code is inaccurate!
So my solution, while correct, is wrong! Ugh.

neogenesis2004 10-23-2007 11:37 PM

I calculate my map in realtime with my abacus. eat that!

cjernigan 10-23-2007 11:40 PM

I want a mapdaddy, but i'm a cheapass and didn't do it the first time around. Didn't know better.

Ben 10-23-2007 11:55 PM

I believe that my slope is correct, but the offset value will be wrong, with my solution erring high. I was 9.9kPa high with my calculation for the 2.5bar sensor (with the correct slope). I do not know if that same 9.9 translates over to the 4 bar, or if the value is somehow completely different, as frankly I am having a hard time figuring out the code for the 4 bar. I seem to be missing a critical part of how MT handles the 4 bar. The kpafactor.inc file for the 2.5 bar makes it pretty friggin clear, however. So at this point, I am assuming that MT makes the 4 bar calculation by multiplying a value in the 2.5bar kpafactor file by a constant.

So now I'm basing assumptions on assumptions. It's a big house of cards, and if a card on the bottom falls, then the whole thing crashes down.

I'm going to nail this, or I'm going to slit my wrists. Or both. We'll see.

neogenesis2004 10-23-2007 11:59 PM

Just remember, down the road not across the street.

Ben 10-25-2007 01:21 PM

Matt Cramer confirms there is no mapfactor file for the 4bar. MS uses interpolation, not a look up table, for this sensor.

So if my scale is right, then the offset value I have working is 4. This was derived from guess & check, and unfortunately is prone to a larger margin of error than I would have wanted. I believe that this margin of error is within 3kPa, or less than .5psi, and relates to the MAP value displayed on the palm only. It does not affect the values generated in a datalog.

Good news is at least we were able to produce exactly accurate values for the 2.5 bar sensor.

Ben 10-25-2007 03:44 PM

Success
 
MapDaddy MAP Sensor Settings for PalmLog Environment Setup:
Scale: 1.62
Offset: 4

These settings are accurate in my car within a couple kPa. :bigtu:

neogenesis2004 10-25-2007 03:48 PM

Dang, who's your MapDaddy now?!


All times are GMT -4. The time now is 07:34 PM.


© 2024 MH Sub I, LLC dba Internet Brands