Moderators: EDS50, cgrey8, 2Shaker, Jon 94GT
- Pontisteve
- Regular
- Posts: 78
- Joined: Mon May 16, 2011 12:33 pm
- Location: FL
A/D counts vs voltage conversion
Ok guys, this has bothered me long enough. There is a discrepancy between software brands about what certain voltage breakpoints are... TP for WOT, for example. This same discrepancy changes MAF data from one brand to another as well. The question really boils down to, what is 1023 A/D counts in Voltage?
My viewpoint on it is that the A/D converter is a 10 bit chip, meaning 1111111111 binary, which works out to 1023 in decimal. So we know we have an A/D converter that works 0 - 1023 counts, right? That's the easy part.
We know that all the analog signals in a car computer are 0 - 5 volt signals. So I would assume that 0 to 5v = 0 to 1023 A/D counts. Which makes each volt equal to 204.6 A/D counts.
BE seems to use 5.12v instead of 5v for this conversion, which puts each volt at 199.8 A/D counts. It always seems to work out about a 1.0256 multiplier difference. If I had a MAF transfer function from say Pro-M, and I wanted to punch it straight into the software, one of the two softwares would be about 2.5% off from reality. They can't both be right.
Could someone please explain to me in detail, the logic behind the 5.12v decision?
My viewpoint on it is that the A/D converter is a 10 bit chip, meaning 1111111111 binary, which works out to 1023 in decimal. So we know we have an A/D converter that works 0 - 1023 counts, right? That's the easy part.
We know that all the analog signals in a car computer are 0 - 5 volt signals. So I would assume that 0 to 5v = 0 to 1023 A/D counts. Which makes each volt equal to 204.6 A/D counts.
BE seems to use 5.12v instead of 5v for this conversion, which puts each volt at 199.8 A/D counts. It always seems to work out about a 1.0256 multiplier difference. If I had a MAF transfer function from say Pro-M, and I wanted to punch it straight into the software, one of the two softwares would be about 2.5% off from reality. They can't both be right.
Could someone please explain to me in detail, the logic behind the 5.12v decision?
If it's worth doing, it's probably not easy.
- cgrey8
- Administrator
- Posts: 11304
- Joined: Fri Jun 24, 2005 5:54 am
- Location: Acworth, Ga (Metro Atlanta)
- Contact:
Re: A/D counts vs voltage conversion
It's actually 1024 counts ranging from 0 to 1023.
Ford seemed to use 5.12v, not 5v since 512 is an easy divisor of 1024 making the math work out nicely. So most voltages convert A/Ds using 5.12v. However a lot of softwares still use 5v which introduces a slight error into their presentation of a voltage value.
Ford seemed to use 5.12v, not 5v since 512 is an easy divisor of 1024 making the math work out nicely. So most voltages convert A/Ds using 5.12v. However a lot of softwares still use 5v which introduces a slight error into their presentation of a voltage value.
...Always Somethin'
89 Ranger Supercab, 331 w/GT40p heads, ported Explorer lower, Crane Powermax 2020 cam, FMS Explorer (GT40p) headers, aftermarket T5 'Z-Spec', GUFB, Moates QuarterHorse tuned using BE&EA
Member V8-Ranger.com
89 Ranger Supercab, 331 w/GT40p heads, ported Explorer lower, Crane Powermax 2020 cam, FMS Explorer (GT40p) headers, aftermarket T5 'Z-Spec', GUFB, Moates QuarterHorse tuned using BE&EA
Member V8-Ranger.com
-
decipha
Re: A/D counts vs voltage conversion
the variance is in the different memory structures and the need to cross calculate as efficiently as possible, thats why you will often see a function scaled well beyond its possible input
- EFI-Unlimited
- Professional Tuner/Shop Owner
- Posts: 198
- Joined: Thu Dec 13, 2007 1:17 am
- Location: Tampa, FL
Re: A/D counts vs voltage conversion
Most A/D converters do not have an absolute scale of counts to voltage. They are differential devices that scale to whatever voltage is applied to the reference input. This means that 0 counts always represents the voltage of the negative reference, and (on a 10 bit convertor) 1023 counts always represents the positive reference, regardless if the difference is 3v, 4v, 5v, or 5.12v. This can be useful if measuring potentiometers. By this design, if the reference voltage fluctuates, but the potentiometer does not move, the measured A/D counts will remain constant inspite of the voltage fluctuation. It makes measurement of the potentiometer immune to reference voltage changes.
Every vehicle I have worked with has always used ~5.00v as a reference, so, i think it is safe to say, that defs that equate 1023 counts to 5.12v are incorrect.
Brian
EFI-Unlimited
Every vehicle I have worked with has always used ~5.00v as a reference, so, i think it is safe to say, that defs that equate 1023 counts to 5.12v are incorrect.
Brian
EFI-Unlimited
- Pontisteve
- Regular
- Posts: 78
- Joined: Mon May 16, 2011 12:33 pm
- Location: FL
Re: A/D counts vs voltage conversion
I have always thought that it boiled down to how much reference voltage was being applied, and that a typical 5v VREF regulator in the PCM would have pretty close to 5v if the grounds are all good. When I found the GM 3 bar MAP sensor engineering drawing, it made me aware that the voltage output of the sensor basically depended on the exact amount of voltage supplied by the VREF. And that there was a clear range anticipated by GM of about 5.1v +/- .36v.
I figure there is a tolerance built into the 5v regulator itself, combined with some potential grounding imperfections, that basically meant it was not ever going to be an exact science, but that in that case 5.1 was supposed to be the middle of the road. Since then, I've kind of noted actual VREF each time I work on a TPS or something, and have found that most Fords seem to stick awfully close to 5v, usually 5.01 or 5.02, or something like that. But closer to 5v than 5.12v for sure.
That's a great point about the potentiometer measuring voltage difference Brian. You articulated my belief much better than I could have, and made my feelings clearer. I'm thinking that even if the software was intended to see 5.12v, if the regulator doesn't produce the full 5.12, then it isn't really there anyway. I also feel that since it's not really tied to voltage, but rather a percentage in A/D counts of whatever voltage exists anyway, the exact number rarely matters anyhow.
But my point for nitpicking this subject is MAF transfer functions. If I have a flowed MAF sensor, or a known good transfer function, and I copy the data into a different brand of software that converts my voltage vs airflow table into an A/D counts vs airflow table in the process, then that voltage error suddenly becomes reality and one of the two tunes is going to be 2.5% off. Interestingly, if you were to directly copy one tune into the other, the data remains the same, but the displayed airflow amounts change by the 2.5%. But entering in the airflow amounts manually will get you that 2.5% error.
I guess there's no fixing it, but it would be cool if BE software allowed you to enter the VREF voltage as a master variable. That way, you could measure actual voltage on the car in question, and change one scalar in the tune to make everything match up. Clint??
I figure there is a tolerance built into the 5v regulator itself, combined with some potential grounding imperfections, that basically meant it was not ever going to be an exact science, but that in that case 5.1 was supposed to be the middle of the road. Since then, I've kind of noted actual VREF each time I work on a TPS or something, and have found that most Fords seem to stick awfully close to 5v, usually 5.01 or 5.02, or something like that. But closer to 5v than 5.12v for sure.
That's a great point about the potentiometer measuring voltage difference Brian. You articulated my belief much better than I could have, and made my feelings clearer. I'm thinking that even if the software was intended to see 5.12v, if the regulator doesn't produce the full 5.12, then it isn't really there anyway. I also feel that since it's not really tied to voltage, but rather a percentage in A/D counts of whatever voltage exists anyway, the exact number rarely matters anyhow.
But my point for nitpicking this subject is MAF transfer functions. If I have a flowed MAF sensor, or a known good transfer function, and I copy the data into a different brand of software that converts my voltage vs airflow table into an A/D counts vs airflow table in the process, then that voltage error suddenly becomes reality and one of the two tunes is going to be 2.5% off. Interestingly, if you were to directly copy one tune into the other, the data remains the same, but the displayed airflow amounts change by the 2.5%. But entering in the airflow amounts manually will get you that 2.5% error.
I guess there's no fixing it, but it would be cool if BE software allowed you to enter the VREF voltage as a master variable. That way, you could measure actual voltage on the car in question, and change one scalar in the tune to make everything match up. Clint??
If it's worth doing, it's probably not easy.
Re: A/D counts vs voltage conversion
The A-D converter is a 10 bit successive approximation register that provides 5 mV steps with a Vref of 5.12 volts. This is the manufacturer specification for the device.
You can only really write the equations in the definition according to the specifications of the device. Getting into the realms of saying that Vref differs and therefore you should not use 5.12 V is futile because all the input and outputs devices in the engine management system have tolerances and you simply cannot factor in all the possibilities.
If you want justification for use of 5.12 V in the A-D count to volts conversion you only have to look at how the values work out using this value in stock calibrations. Ford often use a value that has limited number of decimal places (typically 1 to 3)and using value other than 5.12 V results in tens of decimal places.
You can only really write the equations in the definition according to the specifications of the device. Getting into the realms of saying that Vref differs and therefore you should not use 5.12 V is futile because all the input and outputs devices in the engine management system have tolerances and you simply cannot factor in all the possibilities.
If you want justification for use of 5.12 V in the A-D count to volts conversion you only have to look at how the values work out using this value in stock calibrations. Ford often use a value that has limited number of decimal places (typically 1 to 3)and using value other than 5.12 V results in tens of decimal places.
- EFI-Unlimited
- Professional Tuner/Shop Owner
- Posts: 198
- Joined: Thu Dec 13, 2007 1:17 am
- Location: Tampa, FL
Re: A/D counts vs voltage conversion
If that is a direct quote from documentation, I can read that sentence two ways. For this post, I'll assume its your own words, and take it the ways think you mean it.sailorbob wrote:The A-D converter is a 10 bit successive approximation register that provides 5 mV steps with a Vref of 5.12 volts. This is the manufacturer specification for the device...
If the A/D vref is in fact 5.12 volts, and not the same as the 5.00 vref we see outside the EEC (which is possible) then we can confirm it doing this test. Short the TPS signal to the 5v vref. If the A/D counts show ~1000, then this is true. If the counts show ~1023, then it is not.
Brian
EFI-Unlimited
Re: A/D counts vs voltage conversion
You may well find the Vref differs from the theoretical 5.12 V (component tolerance, ageing etc) but that does not mean we should adjust the equation because of it (where would that end
). When it comes to providing Vref for binary applications quite a few manufacturers provide trim adjustment pins on their 5 V precision reference devices to facilitate 5.12 V (e.g. the Burr Brown REF02 chip).
- EFI-Unlimited
- Professional Tuner/Shop Owner
- Posts: 198
- Joined: Thu Dec 13, 2007 1:17 am
- Location: Tampa, FL
Re: A/D counts vs voltage conversion
I agree the def should reflect the original intended voltage. I'm not convinced that voltage is 5.12 volts. I have considered your thoughts on decimal precision, and I don't see a significant advantage.sailorbob wrote:You may well find the Vref differs from the theoretical 5.12 V (component tolerance, ageing etc) but that does not mean we should adjust the equation because of it (where would that end). When it comes to providing Vref for binary applications quite a few manufacturers provide trim adjustment pins on their 5 V precision reference devices to facilitate 5.12 V (e.g. the Burr Brown REF02 chip).
What docs do you have, or have seen that indicate the nominal A/D reference voltage is 5.12v, vs 5.00v?
At the end of this discussion, most calculations in the EEC are not done in terms of voltage, but in terms of counts. The only real issue is the MAF input. In this case, for those that want more precision, I would recommend comparing measured voltage with a volt meter to logged counts with the EEC. This will eliminate manufacturing tolerance, age, and this debate from the equation.
Brian
EFI-Unlimited
- Pontisteve
- Regular
- Posts: 78
- Joined: Mon May 16, 2011 12:33 pm
- Location: FL
Re: A/D counts vs voltage conversion
I have to work on a Fox later today. I could hook up my brand new EEC-IV breakout box and a Quarterhorse to it and measure MAF voltage differential and AD counts, as well as VREF vs signal return. Is there any other tests you guys want me to run?
I can short vref to signal on the TPS connector and monitor tps in BE.
Would you guys think or agree that this would be a good enough litmus test?
I can short vref to signal on the TPS connector and monitor tps in BE.
Would you guys think or agree that this would be a good enough litmus test?
If it's worth doing, it's probably not easy.
- EFI-Unlimited
- Professional Tuner/Shop Owner
- Posts: 198
- Joined: Thu Dec 13, 2007 1:17 am
- Location: Tampa, FL
Re: A/D counts vs voltage conversion
Go ahead and short the tps signal to vref, and record counts in BE, and actual voltage measured by a volt meter. Post the results and we can discuss.
Brian
EFI-Unlimited
Brian
EFI-Unlimited
- Pontisteve
- Regular
- Posts: 78
- Joined: Mon May 16, 2011 12:33 pm
- Location: FL
Re: A/D counts vs voltage conversion
Well, didn't get a chance to do much testing today after all. Hooked up the Quarterhorse, and what do I see? A car with 60 degrees coolant and air, 1.25v TPS, and a bunch of other hooey. So I checked TPS wires (unplugged TPS) and found 5.10 there (between VREF and batt. neg.), as well as a ground wire and a 4.72v source. Isn't that cute? Not nearly as bad as the BAP harness... it had the 5v, as well as two more ~5v sources. Argh! Key off, there's no resistance between battery neg. and signal return. Key on, power is getting into that wire somehow. I suspect the (rebuilt) A9T PCM, which I have loaded an A9P tune into. The car is a 88 MAF conversion AOD car.
Any suggestions here would be greatly appreciated. I figure the PCM is bad, or there's one heck of a melted harness somewhere. I'm not well equipped to understand how a good deal of voltage ends up in the signal return wire. No doubt, since the computer is measuring the voltage potential between VREF and signal return, most sensors are reporting out of spec data, and the computer is failing them.
Back on topic, I was kind of surprised to see 5.10 - 5.11 volts. It seems like most VREF I remember on newer cars than a fox were more like 5v. Now I'm more curious to see what transpires, as soon as I fix this beater.
It's an 88 SD Auto car converted to MAF just now. Just changing the four wires should be enough for now, right? This car's O2 harness doesn't have those extra 2 wires that typically get jumpered, so there's nothing else to have to do in the MAF conversion, right?
Any suggestions here would be greatly appreciated. I figure the PCM is bad, or there's one heck of a melted harness somewhere. I'm not well equipped to understand how a good deal of voltage ends up in the signal return wire. No doubt, since the computer is measuring the voltage potential between VREF and signal return, most sensors are reporting out of spec data, and the computer is failing them.
Back on topic, I was kind of surprised to see 5.10 - 5.11 volts. It seems like most VREF I remember on newer cars than a fox were more like 5v. Now I'm more curious to see what transpires, as soon as I fix this beater.
It's an 88 SD Auto car converted to MAF just now. Just changing the four wires should be enough for now, right? This car's O2 harness doesn't have those extra 2 wires that typically get jumpered, so there's nothing else to have to do in the MAF conversion, right?
If it's worth doing, it's probably not easy.
Re: A/D counts vs voltage conversion
I only have the same stuff as everyone else has from the internet plus a little knowledge of circuit designs (I know, a little knowledge is dangerousEFI-Unlimited wrote:What docs do you have, or have seen that indicate the nominal A/D reference voltage is 5.12v, vs 5.00v?
Look at the input values in these transfer functions, to me it stands out that 5.12 V is correct and no engineer is going to input voltages like those in the transfers on the right.

Ford themselves say that Vref can vary by as much as +/- 5% which is why they correct critical A-D readings such as the MAF for the calibration input voltage 'IVCAL'.
- EFI-Unlimited
- Professional Tuner/Shop Owner
- Posts: 198
- Joined: Thu Dec 13, 2007 1:17 am
- Location: Tampa, FL
Re: A/D counts vs voltage conversion
This happens when you install the wrong o2 harness and it shorts the sig return to 12v. This fries a trace inside the EEC which then disconnects sig return from gnd. Then all the sensors that are plugged in cause the sig return to float toward +5v.Pontisteve wrote:...Any suggestion how a good deal of voltage ends up in the signal return wire..."
Brian
EFI-Unlimited
- Pontisteve
- Regular
- Posts: 78
- Joined: Mon May 16, 2011 12:33 pm
- Location: FL
Re: A/D counts vs voltage conversion
The car has the stock1988 auto harnesses. It was converted to maf (so far just the 4 pcm wires), and an A9T computer was installed with a A9P tune. I thought that worked ok, no? I don't have an 88 EVTM, just a 92. Where did I go wrong? What wire could I check for 12v?
If it's worth doing, it's probably not easy.
- EFI-Unlimited
- Professional Tuner/Shop Owner
- Posts: 198
- Joined: Thu Dec 13, 2007 1:17 am
- Location: Tampa, FL
Re: A/D counts vs voltage conversion
That makes two of us then.. :)sailorbob wrote:I only have the same stuff as everyone else has from the internet plus a little knowledge of circuit designs (I know, a little knowledge is dangerous) and a feeling for how these things work.
I can see your point looking at your example, but I still don't that is compelling evidence they used a 5.12v A/D ref. I'll outline why I think that.
As you know, the numbers fall that way because of the binary point integer conversion the EEC has to do. There is no way to get those numbers to break evenly at 5.00 and still have fast, efficient code. As for entering the numbers, usually software handles the rounding and clipping so the engineer just enters the nominal value, and it is rounded in the editing software.
From a software standpoint, it makes a little sense to use 5.12 vs 5.00, but it's the hardware guys that likely made that decision. Using 5.12v needs a "trimable" regulator, vs 5.00 which there are many standard "off the shelf" parts. 5.00v is a standard voltage used in many circuits and A/D conversions, deviating from standard design would require a good reason (more than just a few decimals) to convince management to do.
All the above is mostly speculation, but the following I think is the most compelling evidence.
In my experience the vref voltage I see in the engine harness is 5.00v. Anytime I have ever checked this with a quality volt meter, it is always within a few hundredths of a volt of 5.00. In this thread we have mentioned "age, tolerance, drift, etc" but I don't think any or all of those things can reasonably explain seeing the same approximate result of 5.00v if the original nominal voltage was 5.12v.
Having said the above, and assuming its true, then the following would have to be true for the nominal A/D vref to be 5.12v. There would have to be a separate reference voltage regulator set to 5.12v that the A/D converters use exclusively as a reference. This would increase the part count and complexity of the circuitry. This would also increase the possible error, as the tolerance of the 5.00v and 5.12v regulators would add together in the measurements. It would also decrease the resolution of the sensor measurement, because the sensor range is 0-5.00v (as seen in the engine harness) and the A/D's range is 0-5.12v, leaving 0.12v of the A/D range unreachable. Most importantly, it would mitigate the systems natural immunity to changes in reference voltage, because the A/D reference would be decoupled from the sensor reference.
From a hardware design standpoint, it just doesn't make sense to have two separate reference voltages. Having said that, I think it's safe to assume there is a single reference voltage which means we can measure that voltage in the engine harness. If that is true, it boils this debate down to this question.
What is the consensus about the nominal vref voltage the EEC outputs?
Brian
EFI-Unlimited
Last edited by EFI-Unlimited on Fri Feb 01, 2013 11:43 am, edited 1 time in total.
- EFI-Unlimited
- Professional Tuner/Shop Owner
- Posts: 198
- Joined: Thu Dec 13, 2007 1:17 am
- Location: Tampa, FL
Re: A/D counts vs voltage conversion
I don't remember the exact details of the issue. Also, your car may be fine, the problem may be with the car the A9T came from. There should be very little or no resistance between signal gnd and power gnd. If there is, things won't work right.Pontisteve wrote:The car has the stock1988 auto harnesses. It was converted to maf (so far just the 4 pcm wires), and an A9T computer was installed with a A9P tune. I thought that worked ok, no? I don't have an 88 EVTM, just a 92. Where did I go wrong? What wire could I check for 12v?
Brian
EFI-Unlimited
- cgrey8
- Administrator
- Posts: 11304
- Joined: Fri Jun 24, 2005 5:54 am
- Location: Acworth, Ga (Metro Atlanta)
- Contact:
Re: A/D counts vs voltage conversion
The good news is the difference between 5.0 and 5.12 is so small, it's not likely to make any difference from a practical standpoint of being able to tune a vehicle. It's only be noticed when comparing tunes in different softwares that use different voltage conversions. As a result, I find the discussion interesting and am curious to know what the consensus is, but I still consider the whole debate academic.
As for resolution, I see it quite possible the EEC's A/D is setup to be 0-5.12v even if the supply voltage given is regulated with off-the-shelf 5.0v components. I'm not sure the loss of the 5-5.12v resolution was of big concern to Ford especially given what they did with the MAF curve...spreading the available input voltage resolution across a 16v range of which less than 33% of the resolution was attainable with stock and most aftermarket equipment. I'm not even sure the module will safely tolerate a voltage that high being fed back up the MAF sensor line...maybe it is. And if it is, will the A/D report voltages that high or does it top-out at 5-ish volts? I don't know those answers. If someone does, those would be interesting to know.
As for resolution, I see it quite possible the EEC's A/D is setup to be 0-5.12v even if the supply voltage given is regulated with off-the-shelf 5.0v components. I'm not sure the loss of the 5-5.12v resolution was of big concern to Ford especially given what they did with the MAF curve...spreading the available input voltage resolution across a 16v range of which less than 33% of the resolution was attainable with stock and most aftermarket equipment. I'm not even sure the module will safely tolerate a voltage that high being fed back up the MAF sensor line...maybe it is. And if it is, will the A/D report voltages that high or does it top-out at 5-ish volts? I don't know those answers. If someone does, those would be interesting to know.
...Always Somethin'
89 Ranger Supercab, 331 w/GT40p heads, ported Explorer lower, Crane Powermax 2020 cam, FMS Explorer (GT40p) headers, aftermarket T5 'Z-Spec', GUFB, Moates QuarterHorse tuned using BE&EA
Member V8-Ranger.com
89 Ranger Supercab, 331 w/GT40p heads, ported Explorer lower, Crane Powermax 2020 cam, FMS Explorer (GT40p) headers, aftermarket T5 'Z-Spec', GUFB, Moates QuarterHorse tuned using BE&EA
Member V8-Ranger.com
- EFI-Unlimited
- Professional Tuner/Shop Owner
- Posts: 198
- Joined: Thu Dec 13, 2007 1:17 am
- Location: Tampa, FL
Re: A/D counts vs voltage conversion
I agree this discussion is more exercise than anything.cgrey8 wrote:The good news is the difference between 5.0 and 5.12 is so small, it's not likely to make any difference from a practical standpoint of being able to tune a vehicle. It's only be noticed when comparing tunes in different softwares that use different voltage conversions. As a result, I find the discussion interesting and am curious to know what the consensus is, but I still consider the whole debate academic.
As for resolution, I see it quite possible the EEC's A/D is setup to be 0-5.12v even if the supply voltage given is regulated with off-the-shelf 5.0v components. I'm not sure the loss of the 5-5.12v resolution was of big concern to Ford especially given what they did with the MAF curve...spreading the available input voltage resolution across a 16v range of which less than 33% of the resolution was attainable with stock and most aftermarket equipment. I'm not even sure the module will safely tolerate a voltage that high being fed back up the MAF sensor line...maybe it is. And if it is, will the A/D report voltages that high or does it top-out at 5-ish volts? I don't know those answers. If someone does, those would be interesting to know.
I disagree about the resolution loss being acceptable. They would have to spend more money, add complexity, to lose resolution.
The example you give of the MAF curve doesn't apply. The MAF (if I remember correctly) uses 16 bit values in the voltage column. Given this, even at a range of 16v in the MAF function, it still has 4x the resolution of the 10bit A/D. The MAF uses the same analog inputs as everything else, topping out at 5v.
Brian
EFI-Unlimited
Re: A/D counts vs voltage conversion
I think the early eec’s used something like a TI TL431 (or an equivalent) adjustable shunt regulator to get Vref so there’s no extra parts required for trimming, just the selection of right resistor values.
I suppose we’re on different sides of the same coin on this one, you don’t see any evidence that Vref is 5.12 V and I don’t see any evidence that it’s 5.0V
Whilst the MAF uses a 16 bit value for its A-D conversion value it is the still the same as all the other A-D values and only a 10 bit value (the lower 6 bits are ignored in the word of data). The 16.0 V high value is a result of how Ford set up the transfer to use the corrected ‘VMAF’ value rather than the usual ‘IMAF’ raw A-D value. In later ecu’s the top input value is down to 5.12 V.
I suppose we’re on different sides of the same coin on this one, you don’t see any evidence that Vref is 5.12 V and I don’t see any evidence that it’s 5.0V
Whilst the MAF uses a 16 bit value for its A-D conversion value it is the still the same as all the other A-D values and only a 10 bit value (the lower 6 bits are ignored in the word of data). The 16.0 V high value is a result of how Ford set up the transfer to use the corrected ‘VMAF’ value rather than the usual ‘IMAF’ raw A-D value. In later ecu’s the top input value is down to 5.12 V.
- EFI-Unlimited
- Professional Tuner/Shop Owner
- Posts: 198
- Joined: Thu Dec 13, 2007 1:17 am
- Location: Tampa, FL
Re: A/D counts vs voltage conversion
I see voltage measurements of the vref line over a wide range of vehicles that seem to average out to 5.00v.sailorbob wrote:...I suppose we’re on different sides of the same coin on this one, you don’t see any evidence that Vref is 5.12 V and I don’t see any evidence that it’s 5.0V...
This entire debate could be put to bed if someone would short their tips to vref, log the counts it read, and measure the voltage at the signal pin. Then we would know for sure.
Brian
EFI-Unlimited
- Pontisteve
- Regular
- Posts: 78
- Joined: Mon May 16, 2011 12:33 pm
- Location: FL
Re: A/D counts vs voltage conversion
I'll check that Fox as soon as I find another computer for it. It must have had the signal return trace burned before. The PCM was rebuilt as well, so very hard to determine it's condition by looking at it. They resprayed it with more conformal coating or something.
Maybe we're not looking at this on a large enough scale. Maybe Fox bodies were 5.12, and newer cars are 5.00? So perhaps we could all test various year Mustangs and report back the results of shorting VREF to TPS, the actual voltage, and the A/D counts.
It might be worth checking VREF vs signal return and VREF vs battery negative as well, to see if there's any difference in the car you're testing. There shouldn't be.
Maybe we're not looking at this on a large enough scale. Maybe Fox bodies were 5.12, and newer cars are 5.00? So perhaps we could all test various year Mustangs and report back the results of shorting VREF to TPS, the actual voltage, and the A/D counts.
It might be worth checking VREF vs signal return and VREF vs battery negative as well, to see if there's any difference in the car you're testing. There shouldn't be.
If it's worth doing, it's probably not easy.
- EFI-Unlimited
- Professional Tuner/Shop Owner
- Posts: 198
- Joined: Thu Dec 13, 2007 1:17 am
- Location: Tampa, FL
Re: A/D counts vs voltage conversion
For the purposes of this discussion, always measure vref relative to signal return.Pontisteve wrote:It might be worth checking VREF vs signal return and VREF vs battery negative as well, to see if there's any difference in the car you're testing. There shouldn't be.
Brian
EFI-Unlimited
- Pontisteve
- Regular
- Posts: 78
- Joined: Mon May 16, 2011 12:33 pm
- Location: FL
Re: A/D counts vs voltage conversion
Well, I still haven't had a chance to check VREF on some 5.0's, but I have a Fox and an SN95 to work on shortly, so I'll get a chance to real soon. The computer was bad in that last Fox, preventing me from any meaningful testing.
And while the 5v vs 5.12 debate can rage on, I have figured out that this difference (1.024x) is purely coincidental to the 1.0256x difference between BE and SCT's MAF curves. Finally.
It wasn't until I got interested in the processor speed, and rev limiters that it hit me. The Ford GUFx strategy document says to calculate MnPIP like this:
MnPIP = 60/(EngCyl*MaxRPM)*Clock Freq/36
MnPIP = 60/(4*6500)*15,000,000/36
MnPIP = 60/26000*416,666.666
MnPIP = 961.538
SCT says to calculate it like this:
MnPIP = 25,000,000/(EngCyl*MaxRPM)
MnPIP = 25,000,000/(4*6500)
MnPIP = 25,000,000/(26,000)
MnPIP = 961.538
When I caught that 25,000,000 was just another way of saying 416,666.666 * 60, I realized they just simplified the terms a tad, but were talking about the same calculation. This is interesting, because SCT knows the GUF document has this formula. And if they used 25,000,000 then that means SCT agrees that the clock frequency of the processor must be 15,000,000 or 15 MHZ. Which it is. I saw 15.00 written on the crystal in a fox body computer.
When you look at a stock Fox MAF xfer function in SCT, you come up with a peak of 31.4846 lb/min. airflow at 5v. When you look at BE, it says 835.482 kg/hr (30.6987). In fact, comparing pretty much all of the MAF transfer function between the two softwares ends up with a difference of 1.0255997522, or it's inverse of 0.9750392371. When you multiply one MAF xfer by the opposite of these two multipliers, you basically get the other MAF xfer exactly (minus a minute difference for the way each software rounds off the numbers to the next breakpoint).


So now I know where the larger numbers in the SCT software comes from. But I still don't really know which software is right. But it appears to me that the BE software would be. Why? Because when I take the stock A9L MAF peak airflow of 31.4846 in SCT, and divide it by SCT's stated peak lb/mass tic number of .00000122794881463051, I get 25639993.8050135. If my math is right, that number should be 25,000,000. The difference between these two numbers is my 1.0256 multiplier.
Please note that the chip ends up with the same data on it. It's the way the airflow number is displayed in the SCT software that appears to be wrong. The SCT xfer function, when converted to lb/min for viewing, is high by a factor of 1.0255997522 (1.0256 for short).
So if I were to manually enter a transfer function into the SCT software from a MAF flow sheet, I'm guessing that I would need to go back and multiply that whole table by 1.0256 after I was done, in order for the numbers to actually be right. Right???
One more mystery I'm not real clear about. What does the number 36 have to do with anything? I see the GUF strategy document says to divide the clock frequency by 36. I wasn't sure what that stood for. Anyone?
And while the 5v vs 5.12 debate can rage on, I have figured out that this difference (1.024x) is purely coincidental to the 1.0256x difference between BE and SCT's MAF curves. Finally.
It wasn't until I got interested in the processor speed, and rev limiters that it hit me. The Ford GUFx strategy document says to calculate MnPIP like this:
MnPIP = 60/(EngCyl*MaxRPM)*Clock Freq/36
MnPIP = 60/(4*6500)*15,000,000/36
MnPIP = 60/26000*416,666.666
MnPIP = 961.538
SCT says to calculate it like this:
MnPIP = 25,000,000/(EngCyl*MaxRPM)
MnPIP = 25,000,000/(4*6500)
MnPIP = 25,000,000/(26,000)
MnPIP = 961.538
When I caught that 25,000,000 was just another way of saying 416,666.666 * 60, I realized they just simplified the terms a tad, but were talking about the same calculation. This is interesting, because SCT knows the GUF document has this formula. And if they used 25,000,000 then that means SCT agrees that the clock frequency of the processor must be 15,000,000 or 15 MHZ. Which it is. I saw 15.00 written on the crystal in a fox body computer.
When you look at a stock Fox MAF xfer function in SCT, you come up with a peak of 31.4846 lb/min. airflow at 5v. When you look at BE, it says 835.482 kg/hr (30.6987). In fact, comparing pretty much all of the MAF transfer function between the two softwares ends up with a difference of 1.0255997522, or it's inverse of 0.9750392371. When you multiply one MAF xfer by the opposite of these two multipliers, you basically get the other MAF xfer exactly (minus a minute difference for the way each software rounds off the numbers to the next breakpoint).


So now I know where the larger numbers in the SCT software comes from. But I still don't really know which software is right. But it appears to me that the BE software would be. Why? Because when I take the stock A9L MAF peak airflow of 31.4846 in SCT, and divide it by SCT's stated peak lb/mass tic number of .00000122794881463051, I get 25639993.8050135. If my math is right, that number should be 25,000,000. The difference between these two numbers is my 1.0256 multiplier.
Please note that the chip ends up with the same data on it. It's the way the airflow number is displayed in the SCT software that appears to be wrong. The SCT xfer function, when converted to lb/min for viewing, is high by a factor of 1.0255997522 (1.0256 for short).
So if I were to manually enter a transfer function into the SCT software from a MAF flow sheet, I'm guessing that I would need to go back and multiply that whole table by 1.0256 after I was done, in order for the numbers to actually be right. Right???
One more mystery I'm not real clear about. What does the number 36 have to do with anything? I see the GUF strategy document says to divide the clock frequency by 36. I wasn't sure what that stood for. Anyone?
If it's worth doing, it's probably not easy.
Re: A/D counts vs voltage conversion
The 36 is the conversion from timing crystal oscillator periods to cpu clock ticks.
-
BillMarkViii
- BIN Hacker
- Posts: 15
- Joined: Fri Jun 19, 2009 5:10 pm
Re: A/D counts vs voltage conversion
Although the clock speeds differ depending on the year and application the architecture is stable per device family.
The EEC-IV's processor, the 8061, was used by Ford in speeds of 5, 7.5, 10, 12, 15 and 18 MHz.
One Machine state is 3 ticks.
One master IO clock is 36 ticks.
The EEC-V processor, the 8065 was available with speeds of 15, 18 and 20MHz.
One Machine state is 3 ticks.
One master IO clock is 96 ticks. ( different! )
The EEC-IV's processor, the 8061, was used by Ford in speeds of 5, 7.5, 10, 12, 15 and 18 MHz.
One Machine state is 3 ticks.
One master IO clock is 36 ticks.
The EEC-V processor, the 8065 was available with speeds of 15, 18 and 20MHz.
One Machine state is 3 ticks.
One master IO clock is 96 ticks. ( different! )
- Pontisteve
- Regular
- Posts: 78
- Joined: Mon May 16, 2011 12:33 pm
- Location: FL
Re: A/D counts vs voltage conversion
Is that to say that all EEC-IV's are 36 ticks, and all EEC-V's are 96 ticks? And I don't even know what a machine state is. Maybe someone can outline how the crystal thing works for me in English.
For those of you that do get it, could you take a look at my math in the clock tic calculator above, and tell me if I got those calculations right, and comment on my terminology?
I would ultimately like to be able to use my spreadsheet to convert real airflow numbers (MAF xfer) into any year Mustang computer's engineering units. Although it's largely an educational exercise, since most newer cars probably use lbs/min units anyway.
For those of you that do get it, could you take a look at my math in the clock tic calculator above, and tell me if I got those calculations right, and comment on my terminology?
I would ultimately like to be able to use my spreadsheet to convert real airflow numbers (MAF xfer) into any year Mustang computer's engineering units. Although it's largely an educational exercise, since most newer cars probably use lbs/min units anyway.
If it's worth doing, it's probably not easy.
-
BillMarkViii
- BIN Hacker
- Posts: 15
- Joined: Fri Jun 19, 2009 5:10 pm
Re: A/D counts vs voltage conversion
A tick as used above is one cycle of the crystal (xtal). So an 12 Mhz xtal ticks 12 million times per second.
A microprocessor is a state machine that takes a certain number of cycle to move to the next state. The 8061 requires 3 cycles ( ticks ) to advance the machine state. Each opcode takes one or more states to complete. A typical opcode for the 8061 will take from 1 to 5 'machine states' to complete.
So if a simple instruction like CLRB or clear byte that just puts a zero into a register takes 2 states then it takes 2*3 ticks or 6 ticks to complete. 6 ticks at 12MHz means that opcode can be executed 2 million times per second or that it takes 0.5us to complete. 6/12,000,000
The Master IO timer is the count source for the HSI and HSO units in the CPU. It also runs the watchdog timer and other parts of the IO subsystem. When you discuss injector timing it is in terms of this clock source.
Does that clarify things?
A microprocessor is a state machine that takes a certain number of cycle to move to the next state. The 8061 requires 3 cycles ( ticks ) to advance the machine state. Each opcode takes one or more states to complete. A typical opcode for the 8061 will take from 1 to 5 'machine states' to complete.
So if a simple instruction like CLRB or clear byte that just puts a zero into a register takes 2 states then it takes 2*3 ticks or 6 ticks to complete. 6 ticks at 12MHz means that opcode can be executed 2 million times per second or that it takes 0.5us to complete. 6/12,000,000
The Master IO timer is the count source for the HSI and HSO units in the CPU. It also runs the watchdog timer and other parts of the IO subsystem. When you discuss injector timing it is in terms of this clock source.
Does that clarify things?
- Pontisteve
- Regular
- Posts: 78
- Joined: Mon May 16, 2011 12:33 pm
- Location: FL
Re: A/D counts vs voltage conversion
It helps, thanks. So EEC-IV are all 36 and EEC-V are all 96? And a [master IO] clock tic (which is what the Ford computer is timed off of) is 1/36 the speed of a crystal tick? So my math is right that a 15 MHZ crystal produces 416,666.666 clock tics per second, 25 million clock tics per minute, and all the rest of the math shown on my spreadsheet calculator.
And since RPM is a per-minute calculation, that's why 25,000,000 is used in the rev limiter equation. Ok, so it looks like my math is correct, and now I know where the 36 came from. That's designed into the crystal, and not a number picked by Ford for some other reason.
To the purpose of the thread though, I'm trying to determine which software is right when it comes to the MAF xfer function. By everything I can see, the BE software got it right, and the 5.0L MAF flows 30.69 #/minute. What I can't figure out is how SCT figured it up to be 25,639,993 (or very possibly it was just 25,640,000). Does that number mean anything to anybody? Could they have thought the crystal was 15.384 MHZ? Does the number 1.0256 have any particular meaning? (The number 256 certainly does in the computer world).
And does anyone have any thoughts or info about the other EEC processors speeds?
And since RPM is a per-minute calculation, that's why 25,000,000 is used in the rev limiter equation. Ok, so it looks like my math is correct, and now I know where the 36 came from. That's designed into the crystal, and not a number picked by Ford for some other reason.
To the purpose of the thread though, I'm trying to determine which software is right when it comes to the MAF xfer function. By everything I can see, the BE software got it right, and the 5.0L MAF flows 30.69 #/minute. What I can't figure out is how SCT figured it up to be 25,639,993 (or very possibly it was just 25,640,000). Does that number mean anything to anybody? Could they have thought the crystal was 15.384 MHZ? Does the number 1.0256 have any particular meaning? (The number 256 certainly does in the computer world).
And does anyone have any thoughts or info about the other EEC processors speeds?
If it's worth doing, it's probably not easy.
- Pontisteve
- Regular
- Posts: 78
- Joined: Mon May 16, 2011 12:33 pm
- Location: FL
Re: A/D counts vs voltage conversion
Well, so much for shorting VREF to the TPS signal wire. I just ended up with 1.25v in the datalog, because FMEM kicked in. I did check voltages with a DVOM though, and on this car it had 5.06v at the TPS sensor (for VREF).
I suppose all the sensors would do that to me, so we need to find another way. Perhaps I should just datalog TPS voltage with the throttle wide open, and then just measure the voltage at the breakout box with a DVOM.
I suppose all the sensors would do that to me, so we need to find another way. Perhaps I should just datalog TPS voltage with the throttle wide open, and then just measure the voltage at the breakout box with a DVOM.
If it's worth doing, it's probably not easy.
Who is online
Users browsing this forum: No registered users and 52 guests