"Noisy" tpsDOT

This is a forum for discussing the development and testing of alpha MS2/Extra code. Documentation
(Runs on MS2 and Microsquirt)

Moderators: jsmcortina, muythaibxr

Peter Florance
Super MS/Extra'er
Posts: 3653
Joined: Fri Apr 02, 2004 8:40 pm
Location: Virginia Beach, VA
Contact:

Re: "Noisy" tpsDOT

Post by Peter Florance »

dontz125 wrote:Peter - when posting something as critical as that grounding diagram, please include a link to the manual page - it's a new page, and I for one hadn't seen it before (my wife says that means absolutely nothing - thank you for the support, dear :D ). There's a little more info there that makes it a lot clearer. Thank you for bringing it up, though!

http://www.msextra.com/doc/general/grounding.html
Sorry, I was pretty sure James had posted the link earlier which is where I found it.

You're right, it is really good stuff.
Peter Florance
PF Tuning
81 BMW Euro 528i ESP Car
60-2 Wheel LS2 Coils, Low Z Inj
Co-Driver 1999 BMW E46 DSP car.
Peter Florance
Super MS/Extra'er
Posts: 3653
Joined: Fri Apr 02, 2004 8:40 pm
Location: Virginia Beach, VA
Contact:

Re: "Noisy" tpsDOT

Post by Peter Florance »

JasonC SBB wrote:
Peter Florance wrote: Further I have to repeat that as long as sensor ground wire does not carry current, there should not be a issue with noise or voltage offset on it. But if you connect the sensor ground wire to vehicle, you are asking it to help sink current from the MS box and it is no longer a reference, but a conductor.
Correct. But said currents would be the sensor currents (e.g. MAP sensor current as pointed out), and not the large injector/solenoid currents. What makes said large currents even more corrupting is that they have large di/dt.

No not true, because of the common ground plane.
Peter Florance
PF Tuning
81 BMW Euro 528i ESP Car
60-2 Wheel LS2 Coils, Low Z Inj
Co-Driver 1999 BMW E46 DSP car.
JasonC SBB
Helpful MS/Extra'er
Posts: 120
Joined: Wed Oct 26, 2011 7:36 pm

Re: "Noisy" tpsDOT

Post by JasonC SBB »

Peter Florance wrote: I'm concerned that we are causing users to expend a lot of energy on possibly redesigning the MS board
GregG and Gslender have shown that a 10x(?) oversampling ant 10 pt running average helps a lot for their idle.

Some others have shown great improvements with shorting out the polyfuse.

All the above, AFAIK, are wired as per below.
At the very least, I think it's wrong to have 5 ms sampling on TPS, without a much faster time constant RC filter in front of it, and expect to be able to do a dot operation on it and have it respond to TPSdots in the 10 ms - ish range. IMO the right systems approach is to have a slower RC time constant, faster sampling, and some software filtering, before the dot operation.
when all they have to do is install like this:

Image
That's a nice diagram but I would modify it thusly:
1) Also use shielded cable for the O2 sensor (which arguably needs it more)
2) Shield is better grounded to block or head (and again at only one end), rather than at MS2 signal ground.
Last edited by JasonC SBB on Sat Apr 14, 2012 11:46 am, edited 2 times in total.
JasonC SBB
Helpful MS/Extra'er
Posts: 120
Joined: Wed Oct 26, 2011 7:36 pm

Re: "Noisy" tpsDOT

Post by JasonC SBB »

Peter Florance wrote:
JasonC SBB wrote:
Peter Florance wrote: Further I have to repeat that as long as sensor ground wire does not carry current, there should not be a issue with noise or voltage offset on it. But if you connect the sensor ground wire to vehicle, you are asking it to help sink current from the MS box and it is no longer a reference, but a conductor.
Correct. But said currents would be the sensor currents (e.g. MAP sensor current as pointed out), and not the large injector/solenoid currents. What makes said large currents even more corrupting is that they have large di/dt.
No not true, because of the common ground plane.
I may have misunderstood your original post, so I will re-write my reply to it.
Peter Florance wrote:Further I have to repeat that as long as sensor ground wire does not carry current, there should not be a issue with noise or voltage offset on it. But if you connect the sensor ground wire to vehicle, you are asking it to help sink current from the MS box and it is no longer a reference, but a conductor.
Of course you need to connect the sensor ground wire to the sensor ground, and said wire will conduct the sensor ground return currents. For as long as said wire only conducts sensor return currents, it's all good, because those are very small currents, in contrast to solenoid/injector currents, which are not only large, but have large di/dt.
Peter Florance
Super MS/Extra'er
Posts: 3653
Joined: Fri Apr 02, 2004 8:40 pm
Location: Virginia Beach, VA
Contact:

Re: "Noisy" tpsDOT

Post by Peter Florance »

JasonC SBB wrote:
Peter Florance wrote:Further I have to repeat that as long as sensor ground wire does not carry current, there should not be a issue with noise or voltage offset on it. But if you connect the sensor ground wire to vehicle, you are asking it to help sink current from the MS box and it is no longer a reference, but a conductor.
Of course you need to connect the sensor ground wire to the sensor ground, and said wire will conduct the sensor ground return currents. For as long as said wire only conducts sensor return currents, it's all good, because those are very small currents, in contrast to solenoid/injector currents, which are not only large, but have large di/dt.
Agreed.

My points is that if the above is adhered to, the resultant TPS noise is quite low compared to it's normal movement.

The grounding update to the MSExtra docs is huge and should, over time, really clean this up.

Now the RPM averaging stuff I am much more interested in as I tune some cars with very high compression coupled with very low rotating mass on the flywheel clutch assy.

Once disclosure; on my car I run EAE and keep the VE table pretty well maintained. My throttle response is very smooth and crisp.
Peter Florance
PF Tuning
81 BMW Euro 528i ESP Car
60-2 Wheel LS2 Coils, Low Z Inj
Co-Driver 1999 BMW E46 DSP car.
Peter Florance
Super MS/Extra'er
Posts: 3653
Joined: Fri Apr 02, 2004 8:40 pm
Location: Virginia Beach, VA
Contact:

Re: "Noisy" tpsDOT

Post by Peter Florance »

JasonC SBB wrote: That's a nice diagram but I would modify it thusly:
1) Also use shielded cable for the O2 sensor (which arguably needs it more)
2) Shield is better grounded to block or head (and again at only one end), rather than at MS2 signal ground.

Actually none of my 30 yr old harness is shielded except crank and cam sensor wires which I added.
Peter Florance
PF Tuning
81 BMW Euro 528i ESP Car
60-2 Wheel LS2 Coils, Low Z Inj
Co-Driver 1999 BMW E46 DSP car.
piledriver
Super MS/Extra'er
Posts: 1679
Joined: Tue Oct 27, 2009 6:24 am
Location: Van Alstyne, Texas

Re: "Noisy" tpsDOT

Post by piledriver »

One mod I would suggest for the above diagram would be to either use the same block connection for the battery strap or a comment to use battery ground as ground if possible.
I realize on some setups the ms ecu and battery locations may makes that inconvienient, so whichever is closer perhaps?

The block ground connections also see a lot of current and can be problematic due to the environment, so that should be an option of last resort IMHO.
(if the battery is near/next to the ECU, use the battery directly by preference in any case)

The shield on the VR should come all the way to the ecu as shown.

I have actually gotten to the point where I have no intent of using VR sensors in future.
Always doing things the hard way, MS2 sequential w/ v1.01 mainboard, LS2 coils. 80 mile/day commuter status.
robs
Master MS/Extra'er
Posts: 564
Joined: Sun Jan 17, 2010 4:26 pm
Location: Sydney, Australia

Re: "Noisy" tpsDOT

Post by robs »

JasonC SBB wrote: GregG and Gslender have shown that a 10x(?) oversampling ant 10 pt running average helps a lot for their idle.
The idle improvements are due to code changes specifically targeted at getting a steady idle. TPS oversampling wouldn't contribute to this. MAP "oversampling" might contribute, though I would argue that this isn't oversampling at all -- the instantaneous pressure is not of as much interest as the area under the pressure curve; the average MAP essentially is this area.

Have fun,

Rob.
gslender
Super MS/Extra'er
Posts: 1072
Joined: Fri Sep 16, 2011 5:29 am
Location: Brisbane, Australia
Contact:

Re: "Noisy" tpsDOT

Post by gslender »

robs wrote: I would argue that this isn't oversampling at all
It is over sampling.

Samples are taken every 0.128 ms and the main loops cycles between 800 and 1500 microseconds where it then averages the result. So possibly 10 samples are taken and averaged.

G
Mazda MX5 + MS3 Pro
robs
Master MS/Extra'er
Posts: 564
Joined: Sun Jan 17, 2010 4:26 pm
Location: Sydney, Australia

Re: "Noisy" tpsDOT

Post by robs »

Look at it this way: most of the jiggles in the MAP signal are honest to goodness changes in manifold pressure. Cylinders fill better when it jiggles high, less well when it's low. The average of the jiggles is not eliminating noise (which is the purpose of oversampling), but getting a good estimate of how well cylinders will fill over the sampling period; much better than a point pressure sample. The new MAP algorithm is, in effect, estimating the area under the pressure curve by numerical integration.

No doubt there is some electrical noise in the MAP sensor which is being cleaned up in the process. If you had no electrical noise at all, the MS2/Extra code would have no reason to take extra samples of a perfect TPS, but there would still be a very good rationale for averaging multiple perfect MAP samples.

Perhaps you'll see this as a distinction without a difference; nevertheless, I think it's significant.

Have fun,

Rob.
gslender
Super MS/Extra'er
Posts: 1072
Joined: Fri Sep 16, 2011 5:29 am
Location: Brisbane, Australia
Contact:

Re: "Noisy" tpsDOT

Post by gslender »

Ahh, correct. You're saying that oversampling isn't what was needed, as there is no correct sample point in time, just a period to estimate over. I agree with you there.

I was suggesting that compared to the previous MAP sampling frequency (which was as fast as the main loop could cycle) this new method is oversampling greater than the previous frequency and averaging the result.

g
Mazda MX5 + MS3 Pro
Peter Florance
Super MS/Extra'er
Posts: 3653
Joined: Fri Apr 02, 2004 8:40 pm
Location: Virginia Beach, VA
Contact:

Re: "Noisy" tpsDOT

Post by Peter Florance »

gslender wrote:Ahh, correct. You're saying that oversampling isn't what was needed, as there is no correct sample point in time, just a period to estimate over. I agree with you there.

I was suggesting that compared to the previous MAP sampling frequency (which was as fast as the main loop could cycle) this new method is oversampling greater than the previous frequency and averaging the result.

g
Good stuff guys. I have not tried the newer MAP sampling method; methinks it is time I do (and review the development thread) :RTFM: .

Of course my current project is alpha-n, so it might have to wait a little as my own car gets very little tuning love. :(
Peter Florance
PF Tuning
81 BMW Euro 528i ESP Car
60-2 Wheel LS2 Coils, Low Z Inj
Co-Driver 1999 BMW E46 DSP car.
piledriver
Super MS/Extra'er
Posts: 1679
Joined: Tue Oct 27, 2009 6:24 am
Location: Van Alstyne, Texas

Re: "Noisy" tpsDOT

Post by piledriver »

gslender wrote:Ahh, correct. You're saying that oversampling isn't what was needed, as there is no correct sample point in time, just a period to estimate over. I agree with you there.

I was suggesting that compared to the previous MAP sampling frequency (which was as fast as the main loop could cycle) this new method is oversampling greater than the previous frequency and averaging the result.

g
Whatever you did, it works. :yeah!:
Always doing things the hard way, MS2 sequential w/ v1.01 mainboard, LS2 coils. 80 mile/day commuter status.
JasonC SBB
Helpful MS/Extra'er
Posts: 120
Joined: Wed Oct 26, 2011 7:36 pm

Re: "Noisy" tpsDOT

Post by JasonC SBB »

Peter Florance wrote:
JasonC SBB wrote: That's a nice diagram but I would modify it thusly:
1) Also use shielded cable for the O2 sensor (which arguably needs it more)
2) Shield is better grounded to block or head (and again at only one end), rather than at MS2 signal ground.

Actually none of my 30 yr old harness is shielded except crank and cam sensor wires which I added.
I never said it wouldn't work without shielding on some cars.
I think shielding is prudent. It may save setups with gaffes such as running said sensor wires run near coils, the alternator, or other noisy wires.

By the same token, my suggested system (over) sampling, RCRC filtering, and software filtering scheme, would be a very robust system. I don't suggest it is necessary in all setups.
JasonC SBB
Helpful MS/Extra'er
Posts: 120
Joined: Wed Oct 26, 2011 7:36 pm

Re: "Noisy" tpsDOT

Post by JasonC SBB »

piledriver wrote:One mod I would suggest for the above diagram would be to either use the same block connection for the battery strap or a comment to use battery ground as ground if possible.
Totally unnecessary. The battery (-) terminal is no more a "ground" than the chassis or engine block are. It's all relative. What is "Ground" depends on the signal you are looking at.
The shield on the VR should come all the way to the ecu as shown.
If the shielded cable has a single center conductor and thus the shield carries the signal return current, then the shield has to be connected at both ends. The end connected to the ECU has to be connected to the sensor ground.

IF the shielded cable has 2 conductors, which carry the go and return signal currents, then it is best to ground the shield at only one end, and ground it to the block or head, NOT to the ECU. The reason for this is that the shield carries "capacitively coupled displacement currents" and it is better that this said current does NOT flow through the MS. Thus you DON'T want it grounded at the MS.

For those who want to delve deeper into this, the first few chapters in the book "Noise Reduction Techniques in Electronic Systems" by Ott, explains all this.
JasonC SBB
Helpful MS/Extra'er
Posts: 120
Joined: Wed Oct 26, 2011 7:36 pm

Re: "Noisy" tpsDOT

Post by JasonC SBB »

My point re: gslender's oversampling, is that oversampling (relative to the orig sampling rate) in the case of MAP works because the old sampling rate was slower than the actual signal changes.

With TPS, oversampling will ALSO help in the presence of noise because it gives a better picture of what is signal and what is noise.
dontz125
Super MS/Extra'er
Posts: 4200
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: "Noisy" tpsDOT

Post by dontz125 »

In reference to this post,
JasonC SBB wrote:0.1 uF is way too small. The filter can ring given the right load current step.

The inductor in the return leg will only work if the ground on the left and right of it are isolated.
What would you suggest then for the second cap? (some of this really is black magic - I'm a mech eng who's done a little reading :RTFM: )

Not sure by what you mean by your second sentence - if the only things on the "Signal Ground" are the sensors themselves and the MS signal ground pin? Won't the fact that the ground pin is linked to the rest of the outside world at the MS itself then cause a problem?


Edit - added last sentence in 2nd para, added post ref link; this thread is growing fast!
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
JasonC SBB
Helpful MS/Extra'er
Posts: 120
Joined: Wed Oct 26, 2011 7:36 pm

Re: "Noisy" tpsDOT

Post by JasonC SBB »

I would go at least with a 220 uF electrolytic.
robs
Master MS/Extra'er
Posts: 564
Joined: Sun Jan 17, 2010 4:26 pm
Location: Sydney, Australia

Re: "Noisy" tpsDOT

Post by robs »

Peter Florance's postings about grounding convinced me that there must be something up with mine. This was pretty much confirmed when I had a look at a log file he sent me. His CLT and MAT in particular were much smoother than mine. Hard to be sure with TPS because the default log file formatting is just an integer and my TPS didn't jiggle by as much as 1%, but I bet it was smoother too. I also noticed that his Batt.V was smoother, which I put down to his BMW not having ancient French electrics...

Because my MS is buried behind the dash, it took me nearly a day to get the work done, but it is definitely pleasing to see much less jitter in the analog sensors. I was a bit surprised that the Batt.V smoothed out too, but perhaps I have the wrong impression of what this is measuring. Anyhow, a quick synopsis of what I did and I'll also have a go at explaining why this is important in layman's terms -- since those are the only terms I have.

I started with Peter's "quick" check: unplug the MS and check that the ground terminals of each of the engine room sensors -- TPS, MAT, CLT -- have no path to the battery -ve. The only path to ground should be via the MS -- in at the sensor ground pin (pin 19 in my case) and out by the other connected ground pins. So the sensors should be completely isolated if the MS is unplugged. If there is a path to ground, something's wrong.

Sure enough, when I did this test, something was wrong. Nuts.

I knew I had followed the diagram in making the connections from my existing harness. Turns out that what I hadn't done was make the disconnections. It turned out that there was another path to ground through the idle air valve. I just needed to separate the sensor wire grounds from this and all was well. Kind of frustrating that it took a whole day to find the one cut and two solder joints that were needed, but difficult diagnosis and easy fix is nothing new to a programmer.

Moral of the tale:
  • I think the installation manual could be improved by including Peter's simple check when the harness is about to be plugged in.
  • An explanation of exactly why this is important would also be nice. Here is what I think it's all about:
    The MS board maintains a 5V reference voltage which is passed to the sensors. It regulates this voltage continuously so that there is always 5V higher than the MS ground. Perhaps surprisingly, the MS ground can vary appreciably relative to the car's battery -ve. This is not a problem because every jiggle on the ground is matched by a corresponding jiggle on the 5V wire. But by connecting the 5V wire to the sensor and grounding it somewhere else, the jiggles no longer correspond and you get a noisy result.
  • Having someone's known good log file is a worthwhile thing. I've only ever installed this one ECU, so it's a bit hard to know when something isn't right. Perhaps making a "standard" ideal log file available wouldn't be a bad idea.
Does my new noise-free TPS signal negate all the umpteen pages of to and fro in this topic? I don't think so. It is probably true that I wouldn't have posted in the first place if my TPS had looked as good as it now does, but having a minimum significant movement before tpsDOT is calculated gives great sensitivity and I'm very happy with how responsive the car is. AFAICT, the smoother A2D readings haven't made a tangible improvement, but I'm very pleased just to know they're so much better.

Finally, many thanks Peter for the suggestion.

Have fun,

Rob.
gslender
Super MS/Extra'er
Posts: 1072
Joined: Fri Sep 16, 2011 5:29 am
Location: Brisbane, Australia
Contact:

Re: "Noisy" tpsDOT

Post by gslender »

Rob, do you have a before / after log to show how the changes to GNDing all sensors via MS made a difference? Is it just a case of "do it" and you will be amazed?

G
Mazda MX5 + MS3 Pro
Post Reply